Skip to main content

start_easy_protocol

Function start_easy_protocol 

Source
pub async fn start_easy_protocol(
    protocol_name: &str,
    user_instruction: Option<String>,
    port: Option<u16>,
    state: Arc<AppState>,
    llm_client: Arc<OllamaClient>,
) -> Result<EasyId>
Expand description

Start an easy protocol instance

This function:

  1. Creates an EasyInstance and adds it to AppState
  2. Calls the Easy protocol’s generate_startup_action() to get underlying protocol action
  3. Executes the action to start the underlying server/client
  4. Links the underlying server/client to the easy instance for event routing

§Arguments

  • protocol_name - Easy protocol name (e.g., “http-easy”)
  • user_instruction - Optional custom instruction from user
  • port - Optional port override
  • state - Application state
  • llm_client - LLM client

§Returns

Easy protocol ID