> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artaios.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Types

> Understand different agent types and when to use each

The Artaios Multi-Agent System provides different agent types, each optimized for specific use cases and interaction patterns. This guide helps you choose the right agent type for your needs.

## Available Agent Types

### LLM Agent

**Type identifier**: `llm_agent`

The most basic agent type, powered by a large language model. Best for conversational interactions and tasks that don't require external tools or complex reasoning patterns.

<CardGroup cols={2}>
  <Card title="Best For" icon="comments">
    * Conversational assistants
    * Content generation
    * Question answering
    * Text summarization
    * General chat interactions
  </Card>

  <Card title="Capabilities" icon="check">
    * ✅ Streaming support
    * ✅ Knowledge base integration
    * ✅ Memory support
    * ❌ No tool calling
    * Configurable LLM parameters
    * Multi-turn conversations
  </Card>
</CardGroup>

#### Configuration Example

```yaml theme={null}
agents:
  - name: "assistant"
    agent_type: "llm_agent"
    description: "A helpful conversational assistant"
    
    prompt_config:
      system_prompt: |
        You are a helpful AI assistant. Provide clear, accurate, 
        and friendly responses to user questions.
    
    llm_config:
      model: "gpt-4o"
      temperature: 0.7
      max_tokens: 1000
    
    streaming_config:
      enable_streaming: true
      show_output_to_user: true
```

#### When to Use

<Check>Use LLM agents when you need straightforward conversational interactions without external tool access</Check>

<Check>Ideal for customer support, content creation, or general Q\&A scenarios</Check>

***

### ReAct Agent

**Type identifier**: `react_agent`

Implements the ReAct (Reasoning + Acting) pattern, enabling agents to use tools and external resources. The agent reasons about what actions to take, executes tools, and incorporates results into its responses.

<CardGroup cols={2}>
  <Card title="Best For" icon="screwdriver-wrench">
    * Web search and research
    * Data retrieval and analysis
    * Multi-step problem solving
    * Tasks requiring external information
    * Any task needing tool integration
  </Card>

  <Card title="Capabilities" icon="check">
    * ✅ **Tool calling and execution**
    * ✅ Knowledge base integration
    * ✅ Memory support
    * ❌ Streaming disabled
    * Iterative reasoning loops
    * Thought process visibility
  </Card>
</CardGroup>

#### Configuration Example

```yaml theme={null}
agents:
  - name: "research_assistant"
    agent_type: "react_agent"
    description: "AI assistant with research and analysis capabilities"
    
    prompt_config:
      system_prompt: |
        You are a research assistant with access to web search and calculation tools.
        
        When solving problems:
        1. Break down the task into steps
        2. Use tools to gather information
        3. Analyze the results
        4. Provide a comprehensive answer
    
    tools:
      - "tavily_search"
      - "tavily_extract"
      - "calculator"
    
    max_iterations: 10
    
    llm_config:
      model: "gpt-4o"
      temperature: 0.1
      max_tokens: 2000
    
    streaming_config:
      enable_streaming: true
      show_output_to_user: true
      show_reasoning: true
      show_tool_to_user: true
```

#### ReAct Pattern Flow

```
User Query → Agent Reasoning → Tool Selection → Tool Execution → 
Result Analysis → More Tools? → Final Response
```

#### When to Use

<Check>Use ReAct agents when tasks require external information or computations</Check>

<Check>Perfect for research, data analysis, fact-checking, or complex problem-solving</Check>

<Warning>
  Set appropriate `max_iterations` to prevent infinite reasoning loops. Recommended: 5-15 iterations.
</Warning>

***

### Supervisor Agent

**Type identifier**: `supervisor`

Coordinates multiple specialized worker agents, routing tasks to the most appropriate agent and managing multi-agent workflows. Acts as an intelligent orchestrator.

<CardGroup cols={2}>
  <Card title="Best For" icon="users">
    * Multi-domain systems
    * Complex workflows
    * Task delegation
    * Team coordination
    * Specialized agent teams
  </Card>

  <Card title="Capabilities" icon="check">
    * ✅ Streaming support
    * ✅ Tool calling (for handoffs)
    * ✅ Memory support
    * Dynamic agent routing
    * Agent handoffs
    * Workflow coordination
  </Card>
</CardGroup>

#### Configuration Example

```yaml theme={null}
agents:
  - name: "team_supervisor"
    agent_type: "supervisor"
    description: "Coordinates specialized team members"
    
    # Define which agents this supervisor manages
    supervised_agents: 
      - "research_agent"
      - "analysis_agent"
      - "writer_agent"
    
    # Control coordination flow
    return_to_supervisor: true
    max_handoffs: 15
    
    prompt_config:
      system_prompt: |
        You are a team supervisor coordinating specialized agents.
        
        Your team:
        - research_agent: Gathers information via web search
        - analysis_agent: Analyzes data and identifies patterns
        - writer_agent: Creates polished written content
        
        INSTRUCTIONS:
        - Immediately delegate tasks to the appropriate specialist
        - Use transfer tools to hand off work
        - Provide clear context when transferring
        - Evaluate results and decide next steps
    
    streaming_config:
      enable_streaming: true
      show_output_to_user: true
```

#### Supervisor Coordination Patterns

**Iterative Coordination** (`return_to_supervisor: true`, the default):

```
User → Supervisor → Worker 1 → Supervisor → Worker 2 → Supervisor → User
```

Supervisor evaluates each step and orchestrates multi-agent workflows.

**One-Way Delegation** (`return_to_supervisor: false`):

```
User → Supervisor → Worker Agent → User
```

Simple routing where workers respond directly to users.

#### When to Use

<Check>Use supervisors when you have multiple specialized agents that need coordination</Check>

<Check>Ideal for complex systems requiring task decomposition and delegation</Check>

<Tip>
  Combine different agent types under a supervisor: use ReAct agents for research, LLM agents for synthesis.
</Tip>

***

## Agent Type Comparison

| Feature            | LLM Agent     | ReAct Agent | Supervisor       |
| ------------------ | ------------- | ----------- | ---------------- |
| **Tool Calling**   | ❌ No          | ✅ Yes       | ✅ Yes (handoffs) |
| **Streaming**      | ✅ Yes         | ❌ No        | ✅ Yes            |
| **Knowledge Base** | ✅ Yes         | ✅ Yes       | ✅ Yes            |
| **Memory**         | ✅ Yes         | ✅ Yes       | ✅ Yes            |
| **Reasoning Loop** | ❌ Single pass | ✅ Iterative | ✅ Coordination   |
| **Multi-Agent**    | ❌ No          | ❌ No        | ✅ Yes            |
| **Complexity**     | Low           | Medium      | High             |
| **Best Use Case**  | Chat          | Research    | Orchestration    |

## Choosing the Right Agent Type

### Decision Tree

<Steps>
  <Step title="Do you need multiple specialized agents?">
    **Yes** → Use **Supervisor Agent**

    **No** → Continue to next question
  </Step>

  <Step title="Do you need external tools or data?">
    **Yes** → Use **ReAct Agent**

    **No** → Continue to next question
  </Step>

  <Step title="Do you need basic conversation?">
    **Yes** → Use **LLM Agent**
  </Step>
</Steps>

### Use Case Examples

<AccordionGroup>
  <Accordion title="Customer Support Chatbot">
    **Recommended**: `llm_agent`

    Simple conversational interface for answering common questions. No external tools needed.
  </Accordion>

  <Accordion title="Research Assistant">
    **Recommended**: `react_agent`

    Needs web search, knowledge base access, and multi-step reasoning to gather and synthesize information.
  </Accordion>

  <Accordion title="Content Creation Team">
    **Recommended**: `supervisor` + multiple `llm_agent` workers

    Supervisor coordinates research, writing, and editing agents for comprehensive content creation.
  </Accordion>

  <Accordion title="Data Analysis System">
    **Recommended**: `react_agent` with calculator and database tools

    Performs calculations, queries databases, and generates insights from data.
  </Accordion>

  <Accordion title="Multi-Domain Expert System">
    **Recommended**: `supervisor` + specialized `react_agent` workers

    Routes technical, business, or creative questions to domain-specific agents with appropriate tools.
  </Accordion>
</AccordionGroup>

## Configuration Best Practices

### LLM Agent Best Practices

<Tip>
  **Temperature**: Use 0.7-1.0 for creative tasks, 0.1-0.3 for factual responses
</Tip>

<Tip>
  **System Prompt**: Be specific about tone, style, and response format
</Tip>

### ReAct Agent Best Practices

<Tip>
  **Max Iterations**: Set to 5-10 for most tasks. Higher values (15+) only for complex research.
</Tip>

<Tip>
  **Tool Selection**: Only include tools the agent actually needs. More tools = more complexity.
</Tip>

<Tip>
  **Show Reasoning**: Enable `show_reasoning: true` during development to debug tool usage patterns.
</Tip>

### Supervisor Best Practices

<Tip>
  **Clear Delegation**: Write explicit instructions in `prompt_config.system_prompt` about when to use each worker.
</Tip>

<Tip>
  **Return Strategy**: Use `return_to_supervisor: true` (the default) for quality control and multi-step workflows. Set to `false` for simple one-way delegation.
</Tip>

<Warning>
  **Max Handoffs**: Set reasonable limits (10-20) to prevent infinite coordination loops.
</Warning>

## Advanced Patterns

### Hybrid Teams

Combine multiple agent types for sophisticated systems:

```yaml theme={null}
agents:
  # Supervisor coordinates the team
  - name: "supervisor"
    agent_type: "supervisor"
    supervised_agents: ["researcher", "analyst", "writer"]
  
  # ReAct agent for research
  - name: "researcher"
    agent_type: "react_agent"
    tools: ["tavily_search", "tavily_extract"]
  
  # ReAct agent for analysis
  - name: "analyst"
    agent_type: "react_agent"
    tools: ["calculator"]
  
  # LLM agent for final synthesis
  - name: "writer"
    agent_type: "llm_agent"
    llm_config:
      temperature: 0.8  # More creative for writing
```

### Specialized Workers

Create domain-specific agents by customizing system prompts:

```yaml theme={null}
- name: "technical_expert"
  agent_type: "react_agent"
  prompt_config:
    system_prompt: |
      You are a senior software engineer specializing in Python and system architecture.
      Provide technical, detailed responses with code examples.
  tools: ["tavily_search"]

- name: "business_expert"
  agent_type: "llm_agent"
  prompt_config:
    system_prompt: |
      You are a business strategy consultant with MBA-level expertise.
      Focus on ROI, market analysis, and strategic recommendations.
```

## Next Steps

<CardGroup cols={2}>
  <Card title="YAML Configuration" icon="file-code" href="/documentation/yaml-configuration">
    Learn the complete YAML configuration syntax
  </Card>

  <Card title="Agent Capabilities" icon="wand-magic-sparkles" href="/documentation/agent_config/agent-capabilities">
    Explore tools, streaming, and other capabilities
  </Card>
</CardGroup>
