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

# Agents

> Specialized AI systems designed to perform specific tasks related to fan engagement. They combine natural language processing, machine learning, and domain-specific knowledge to create meaningful interactions with fans.

## Agent Types

### Interaction Agents

Handle direct fan engagement through chat interfaces, content generation, and personalized experiences.

### Scheduler Agents

Automate the execution of workflows at specified intervals, ensuring data stays fresh and processes run on schedule.

<Note>
  **Quick Action:** Create your first agent in 2 minutes by selecting a template in Developer Studio → Agents → New Agent.
</Note>

## Agent Structure

Agents use this YAML structure:

```yaml theme={null}
agent:
  name: "agent-name"                # Unique identifier
  title: "Agent Title"              # Human-readable title
  description: "Agent description"  # Brief description of purpose
  context:
    config-frequency: 0.5           # Execution frequency in minutes
  workflows:
    - name: "workflow-name"         # Workflow to execute
      description: "Description"    # Brief description
      outputs:
        result-name: "$.get('workflow-status')"  # Output mapping
```

## Scheduler Examples

### Thread Executor Scheduler

Process chat threads at regular intervals:

```yaml theme={null}
agent:
  name: "scheduler-thread"
  title: "Thread Executor Scheduler"
  description: "Scheduler responsible for thread executor."
  context:
    config-frequency: 0.03          # Runs every ~2 seconds
  workflows:
    - name: "thread-executor"
      description: "Workflow Thread Executor"
      outputs:
        chat-completion-status: "$.get('workflow-status', False)"
```

### Data Sync Scheduler

Synchronize data from external sources:

```yaml theme={null}
agent:
  name: "scheduler-sync"
  title: "Sync Executor Schedule"
  description: "Agent responsible for scheduling workflows."
  context:
    config-frequency: 0.5           # Runs every 30 seconds
  workflows:
    - name: "soccer-embeddings"
      description: "Generate soccer embeddings"
      outputs:
        research-stats-soccer: "$.get('workflow-status', False)"
```

<Tip>
  **Tip:** Start with higher frequency values (less frequent execution) and decrease as needed to balance performance and resource usage.
</Tip>

## Agent Templates

<CardGroup cols={2}>
  <Card title="GameDay Assistant" icon="gamepad" href="/agent-templates/gameday-assistant">
    Provides real-time game insights, interactive Q\&A, and instant highlights during live events.
  </Card>

  <Card title="Content Generator" icon="newspaper" href="/agent-templates/content-generation">
    Creates newsletters, blogs, social media updates, and other content formats automatically.
  </Card>

  <Card title="Livestream Moderator" icon="video" href="/agent-templates/livestream-moderator">
    Moderates live chats, provides betting insights, and enhances live interactions.
  </Card>

  <Card title="Onboarding Assistant" icon="user-plus">
    Guides new users through platform setup and helps them get started quickly.
  </Card>
</CardGroup>

## Configuration Options

### Language Models

Select from various language models including OpenAI (gpt-4o), Groq (llama-3.3-70b-versatile), and others based on your performance and cost requirements.

### Execution Frequency

For scheduler agents, configure how often workflows should run (in minutes).

### Context Variables

Set environment variables and API keys needed for agent execution.

<Note>
  **Quick Action:** Test your agent configuration with `Test Run` in Developer Studio before deploying to production.
</Note>

## Common Agent Patterns

### Chat Processing

Process user messages and generate contextually relevant responses.

### Data Synchronization

Keep your database updated with the latest sports data.

### Content Generation

Create timely, relevant content based on sports events and data.

### Monitoring and Alerts

Watch for specific events and trigger notifications when they occur.

<Tip>
  **Tip:** Design agents with modular workflows that can be reused across multiple use cases to simplify maintenance as you scale.
</Tip>

## Next Steps

* [Deploy an Agent Template](/agent-templates/gameday-assistant) in under 5 minutes
* [Create a Workflow](/core-components/workflows) to define agent behavior
* [Connect Data Sources](/core-components/connectors) to feed your agents
* [Design Effective Prompts](/core-components/prompts) for optimal agent performance
