Agent Creation and Configuration Workflow

Creating an effective multi-agent system requires a methodical approach. This guide outlines the recommended workflow for planning, creating, and configuring your agents in Kodey.ai.

Follow this workflow for the best results:

  1. Plan your agent system
  2. Create sub-agents first
  3. Configure the supervisor last
  4. Test and refine iteratively

How to Plan Your Agent System

  1. Identify the distinct functions your system needs to perform

    • List all the different types of tasks your system should handle
    • Group similar tasks that could be handled by the same agent
    • Identify any specialized knowledge domains required
  2. Determine how many agents you need based on these functions

    • Start with fewer agents and add more if needed
    • Consider creating specialized agents for complex or knowledge-intensive tasks
    • Look for natural divisions in responsibilities
  3. Define clear, non-overlapping responsibilities for each agent

    • Create a brief description of each agent's purpose
    • Establish boundaries between agent responsibilities
    • Identify when each agent should be activated
  4. Plan the conversation flows and transitions between agents

    • Map out typical user journeys through your system
    • Identify trigger points for transitions between agents
    • Consider how context will be maintained during transitions
  5. Document your plan before beginning implementation

    • Create a simple diagram of your agent system
    • List each agent with its key responsibilities
    • Define the criteria for selecting each agent

How to Create and Configure Sub-Agents

  1. Navigate to your team's agents section

    • Log into your Kodey.ai dashboard
    • Select your team
    • Go to the "Agents" section
  2. Click "Create New Agent" (or similar)

    • Look for a button or option to create a new agent
    • Click it to start the agent creation process
  3. Give your agent a descriptive name that reflects its purpose

    • Choose a name that clearly indicates the agent's function
    • Remember that this name will be used in routing, so keep it concise
    • Avoid spaces in names if possible to prevent routing issues
  4. Create the agent's prompt following the three-part structure

    • Start with a description of the agent's identity and purpose
    • Add notes with guidelines, constraints, or additional context
    • Include actions that detail specific behaviors or responses
    • Use XML tags to organize different sections of your prompt
  5. Configure any additional settings (knowledge base access, tools, etc.)

    • Connect relevant knowledge bases if applicable
    • Enable any tools the agent might need
    • Set any other agent-specific configurations
  6. Test the agent individually before integrating it with the supervisor

    • Use the agent preview or test interface
    • Try various inputs that the agent should handle
    • Refine the prompt based on your testing results

How to Configure the Supervisor

  1. After creating all your sub-agents, navigate to the supervisor settings

    • Go to your team settings
    • Find the "Supervisor" tab or section
  2. Start with the default supervisor prompt

    • Keep the core functionality intact
    • Use this as the foundation for your customizations
  3. Add context about your agents and their specialties

    • Briefly describe each agent's purpose
    • Explain when each agent should be selected
    • Use XML tags to organize different routing conditions
  4. Configure any custom routing logic needed for your use case

    • Set up any persistent agent selections if needed
    • Define specific routing conditions for special cases
    • Ensure agent names match exactly in your routing configuration
  5. Test the complete system with various user inputs

    • Try inputs that should trigger different agents
    • Test transitions between agents
    • Verify that the correct agent is selected each time
  6. Refine your configuration based on testing results

    • Adjust routing criteria if needed
    • Modify agent prompts to better handle their assigned tasks
    • Iterate until you achieve the desired behavior

How to Iterate and Improve Your System

  1. Test your system with real-world scenarios

    • Use actual questions or tasks your system will face
    • Have different people test the system
    • Collect a variety of inputs and interaction patterns
  2. Identify any routing issues or agent limitations

    • Note any cases where the wrong agent is selected
    • Identify scenarios where agents struggle to respond effectively
    • Look for edge cases that aren't handled well
  3. Collect user feedback on the system's performance

    • Ask testers about their experience
    • Note any confusion or friction points
    • Identify areas where responses could be improved
  4. Make targeted improvements to specific prompts or routing logic

    • Address the most significant issues first
    • Make incremental changes rather than wholesale revisions
    • Focus on improving one aspect at a time
  5. Test again after each change to verify improvements

    • Compare performance before and after changes
    • Ensure changes don't create new issues
    • Verify that the targeted issues are resolved
  6. Document successful configurations for future reference

    • Keep notes on what works well
    • Record any particular prompt structures that are effective
    • Document any issues you encountered and how you resolved them

Why This Order Matters

Creating sub-agents first ensures:

  • Each agent has a well-defined purpose before routing logic is established
  • You understand each agent's capabilities when designing the supervisor
  • The supervisor can be configured to route to fully functional agents
  • You can test individual components before testing the complete system

Next Steps

After setting up your agent system, review our best practices to optimize your prompts and system performance.