Installation
Authentication
Supported Models
AgentUse supports multiple AI providers with the format provider:model-name. Examples:
anthropic:claude-sonnet-4-5
openai:gpt-5.2
openrouter:minimax/minimax-m2.1
Any model available from Anthropic, OpenAI, or OpenRouter can be used. You can also specify custom API keys: anthropic:claude-sonnet-4-5:CUSTOM_API_KEY
Your First Agent
Create hello.agentuse:
---
model: anthropic:claude-haiku-4-5
description: "Simple greeting agent that welcomes users"
---
Greet the user.
Run it:
agentuse run hello.agentuse
# Or run with additional instructions
agentuse run hello.agentuse "speak like a pirate"
# Run with options
agentuse run hello.agentuse --verbose
agentuse run hello.agentuse --quiet
agentuse run hello.agentuse --no-tty
agentuse run hello.agentuse --timeout 600
# Override the model at runtime
agentuse run hello.agentuse --model openai:gpt-5-mini
agentuse run hello.agentuse -m anthropic:claude-sonnet-4-5
File System Agent
Create project-analyzer.agentuse:
---
model: anthropic:claude-haiku-4-5
description: "Analyzes project structure and identifies key components"
mcpServers:
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "."]
---
You are a code analyzer. When asked about a project:
1. List the main files and folders
2. Identify the project type (Node.js, Python, etc.)
3. Summarize what the project does based on README or package.json
Run it:
agentuse run project-analyzer.agentuse
Model Override
Override the model at runtime without editing agent files:
agentuse run analyzer.agentuse --model anthropic:claude-sonnet-4-5
agentuse run analyzer.agentuse -m openai:gpt-5-mini
Sub-agents Support
AgentUse supports calling other agents as sub-agents:
---
model: anthropic:claude-haiku-4-5
description: "Orchestrates tasks by delegating to specialized sub-agents"
subagents:
- path: "./helper-agent.agentuse"
name: "helper"
maxSteps: 50
---
You can call the helper agent using the sub-agent tools.
Remote Agents
You can run agents directly from HTTPS URLs:
# AgentUse will prompt for confirmation before executing remote agents
agentuse run https://example.com/path/to/agent.agentuse
# Preview the agent content first
# Choose 'p' when prompted to preview before execution
Only HTTPS URLs with .agentuse extensions are supported for security. Always review remote agents before execution.
Environment Variables
Configure API keys and behavior via environment variables or .env files:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-proj-..."
Schedule Your Agent
Add a schedule to run agents automatically:
---
model: anthropic:claude-sonnet-4-5
schedule: "1h" # Or cron: "0 * * * *"
---
Check system status and send a summary report.
Start the server to enable scheduling:
What’s Next?