Skip to content

Your First Agent

Learn how to create and use a custom AI agent.

What is an Agent?

An agent is a specialized AI assistant with a focused role and capabilities. Agents are defined in Markdown files with YAML frontmatter.

Creating an Agent

1. Create the Agent File

Create .claude/agents/copywriter.md:

markdown
---
name: copywriter
description: "Marketing copywriter for engaging content"
model: sonnet
---

# Marketing Copywriter

## Role
You are an experienced marketing copywriter specializing in
engaging, conversion-focused content.

## Expertise
- Headlines and taglines
- Email marketing copy
- Social media content
- Landing page copy
- Blog posts

## Style Guidelines
- Clear and concise
- Action-oriented
- Audience-focused
- Emotionally engaging

## Output Format
Always structure content with:
1. Headline/Hook
2. Body content
3. Call to action

2. Use Your Agent

bash
# Reference by name
aiv "@copywriter Write a headline for our new AI product"

# Or switch to the agent
aiv
> /agent copywriter
> Write 5 email subject lines for a product launch

3. List Available Agents

bash
aiv
> /agents

Available agents:
  copywriter - Marketing copywriter for engaging content
  researcher - Research assistant
  ...

Agent Location

Agents are discovered from:

  1. .claude/agents/ in current directory
  2. .claude/agents/ in parent directories
  3. ~/.aiv/agents/ global agents

Best Practices

  1. Be specific - Define clear roles and expertise
  2. Add examples - Show expected output format
  3. Set constraints - Define what the agent should/shouldn't do
  4. Choose the right model - Use haiku for simple tasks, opus for complex

See Module Overview for more on the agent system.

Released under the MIT License.