Agent commands let you create, list, spawn, chat with, and terminate agents in your AgentOS deployment.
agent new
Create a new agent from a template.
agentos agent new [template]
Template name to use (defaults to “assistant”)
Available Templates
AgentOS includes 45+ pre-built agent templates:
Development
Research & Analysis
Business
Creative
Productivity
Specialized
coder - Full-stack coding agent
debugger - Debug and fix issues
architect - System design and architecture
code-reviewer - Code review and analysis
doc-writer - Documentation generation
test-engineer - Test creation and execution
devops-lead - DevOps and infrastructure
ai-engineer - AI/ML development
researcher - Research and information gathering
analyst - Data analysis
data-scientist - Data science and ML
trend-researcher - Trend analysis
evidence-collector - Evidence gathering
reality-checker - Fact checking
orchestrator - Multi-agent coordination
planner - Project planning
customer-support - Customer service
sales-assistant - Sales support
recruiter - Recruiting and HR
legal-assistant - Legal document review
personal-finance - Financial planning
writer - Content writing
content-creator - Content creation
brand-guardian - Brand consistency
image-prompt-engineer - Image prompt generation
ux-architect - UX design
assistant - General assistant
email-assistant - Email management
meeting-assistant - Meeting notes and summaries
translator - Language translation
tutor - Educational tutoring
travel-planner - Travel planning
security-auditor - Security auditing
health-tracker - Health tracking
home-automation - Smart home control
social-media - Social media management
growth-hacker - Growth strategies
app-store-optimizer - App store optimization
Example:
Output:
✓ Created agent: agent-coder-1
agent list
List all active agents.
Example output:
ID STATUS NAME
default active Default Assistant
agent-coder-1 active Code Agent
agent-researcher-2 active Research Agent
agent chat
Start an interactive chat session with a specific agent.
agentos agent chat < agen t >
Example:
agentos agent chat agent-coder-1
Interactive session:
→ Chatting with agent-coder-1. Type 'exit' to quit.
you> Write a function to validate email addresses
agent> I'll create an email validation function for you:
```javascript
function validateEmail(email) {
const pattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return pattern.test(email);
}
This function uses a regex pattern to validate basic email format.
you> exit
<Tip>
Use `agentos chat [agent]` as a shorthand for quick chat sessions.
</Tip>
## agent kill
Terminate a running agent.
```bash
agentos agent kill <agent>
Example:
agentos agent kill agent-coder-1
Output:
✓ Agent agent-coder-1 terminated
Killing an agent terminates it immediately. Any ongoing operations will be stopped.
agent spawn
Spawn a new agent instance from a template.
agentos agent spawn < templat e >
Template name to spawn from
Difference between new and spawn:
agent new - Create a new agent definition (can be customized before running)
agent spawn - Instantly create and start a new agent instance
Example:
agentos agent spawn researcher
Output:
✓ Spawned: agent-researcher-3
Quick Chat & Message
Two additional commands for interacting with agents:
chat
Shorthand for agent chat.
Agent ID (defaults to “default”)
Example:
# Chat with default agent
agentos chat
# Chat with specific agent
agentos chat coder
message
Send a single message without starting an interactive session.
agentos message < agen t > < tex t > [--json]
Return response in JSON format
Example:
agentos message coder "Explain the factory pattern"
Output:
The factory pattern is a creational design pattern that provides
an interface for creating objects without specifying their exact class...
JSON output:
agentos message coder "Explain the factory pattern" --json
{
"agentId" : "coder" ,
"content" : "The factory pattern is a creational design pattern..." ,
"tokens" : 245 ,
"model" : "claude-opus-4-6" ,
"timestamp" : "2026-03-09T10:30:00Z"
}
Agent Lifecycle
Typical agent workflow:
Examples
Quick Start
One-off Message
Multiple Agents
Cleanup
# Create and chat with a coder agent
agentos agent new coder
agentos agent chat agent-coder-1
Integration with Workflows
Agents can be invoked from workflows:
{
"steps" : [
{
"type" : "agent" ,
"agentId" : "researcher" ,
"input" : "Research topic: ${input.topic}"
},
{
"type" : "agent" ,
"agentId" : "writer" ,
"input" : "Write article based on: ${steps[0].output}"
}
]
}
See Workflow Commands for more details.
Agent Configuration
Agents inherit configuration from:
Global config (~/.agentos/config.toml)
Agent-specific config (~/.agentos/agents/<agent-id>/config.toml)
Runtime parameters
See Config Commands for configuration management.
Next Steps
Workflow Commands Create workflows with multiple agents
Security Commands Set up agent permissions and approvals
Config Commands Configure agent behavior and models
Sessions View and manage agent sessions