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

# Creating Your First Agent

> Step-by-step guide to building AI agents with markdown files - define purpose, inputs, outputs, and prompts

## Overview

Agents are markdown files that define AI workers. No code required—just structured prompts.

## Step 1: Create the File

Create a new agent in your squad directory:

```bash theme={null}
touch .agents/squads/research/summarizer.md
```

## Step 2: Define the Agent

```markdown theme={null}
# Content Summarizer

## Purpose
Summarize long documents into actionable insights.

## Inputs
- Document or URL to summarize
- Target length (brief/detailed)
- Focus areas (optional)

## Outputs
- Executive summary (3-5 bullet points)
- Key takeaways
- Action items (if applicable)

## Instructions
1. Read the full document carefully
2. Identify the main thesis and supporting points
3. Extract actionable insights
4. Format as structured markdown
5. Keep summaries concise but complete
```

## Step 3: Run Your Agent

```bash theme={null}
squads run research/summarizer
```

## Agent Structure Explained

| Section          | Purpose                            |
| ---------------- | ---------------------------------- |
| **Purpose**      | What the agent does (one sentence) |
| **Inputs**       | What it needs to work              |
| **Outputs**      | What it produces                   |
| **Instructions** | Step-by-step prompt                |

## Best Practices

<AccordionGroup>
  <Accordion title="Keep it focused">
    One agent, one job. Don't try to make agents do everything.
  </Accordion>

  <Accordion title="Be specific in instructions">
    Vague instructions = unpredictable results. List concrete steps.
  </Accordion>

  <Accordion title="Define output format">
    Specify exactly how you want results formatted (markdown, JSON, etc).
  </Accordion>

  <Accordion title="Test iteratively">
    Run, review, refine. Agents improve with feedback.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Add to a Squad" icon="users" href="/guides/organizing-squads">
    Organize agents into teams
  </Card>

  <Card title="Use Memory" icon="brain" href="/guides/using-memory">
    Give agents persistent context
  </Card>
</CardGroup>
