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 action2. 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 launch3. List Available Agents
bash
aiv
> /agents
Available agents:
copywriter - Marketing copywriter for engaging content
researcher - Research assistant
...Agent Location
Agents are discovered from:
.claude/agents/in current directory.claude/agents/in parent directories~/.aiv/agents/global agents
Best Practices
- Be specific - Define clear roles and expertise
- Add examples - Show expected output format
- Set constraints - Define what the agent should/shouldn't do
- Choose the right model - Use
haikufor simple tasks,opusfor complex
See Module Overview for more on the agent system.