CoAgents (Early Access)
Advanced Usage
Router Mode & Agent Lock

Router-Mode and Agent-Lock mode

CopilotKit can be used in router-mode, and in agent-lock mode.

CopilotKit can operate in two distinct modes:

Router Mode:

In router mode, CopilotKit acts as a central hub, dynamically selecting and routing to different agents or actions based on the user’s input. This mode offers flexibility and allows for a more diverse range of interactions.

To use router mode, configure your CopilotKit component like this:

<CopilotKit runtimeUrl="<copilot-runtime-url>">
  {/* Your application components */}
</CopilotKit>

In this mode, CopilotKit will intelligently route requests to the most appropriate agent or action based on the context and user input.

Agent-Lock Mode:

In agent-lock mode, CopilotKit is configured to work exclusively with a specific agent. This mode is useful when you want to focus on a particular task or domain, ensuring all interactions are handled by a dedicated agent.

To use agent-lock mode, specify the agent name in the CopilotKit component:

<CopilotKit runtimeUrl="<copilot-runtime-url>" agent="<agent-name>">
  {/* Your application components */}
</CopilotKit>

In this mode, all interactions will be directed to the specified agent, bypassing the router and other agents.

Choose the mode that best suits your application’s needs. Router mode offers versatility, while agent-lock mode provides focused interactions with a specific agent.


© Tawkit, Inc. All rights reserved.