Purpose: Understanding how agents work in OpenAgents
Priority: CRITICAL - Load this before working with agents
Agents are AI prompt files that define specialized behaviors for different tasks. They are:
---
description: "Brief description of what this agent does"
category: "category-name"
type: "agent"
tags: ["tag1", "tag2"]
dependencies: ["subagent:tester"]
---
# Agent Name
[Agent prompt content - instructions, workflows, constraints]
Frontmatter (YAML metadata)
description: Brief descriptioncategory: Category name (core, development, content, etc.)type: Always "agent"tags: Optional tags for discoverydependencies: Optional dependencies (e.g., subagents)Prompt Content
Agents are organized by domain expertise:
core/)Purpose: Essential system agents (always available)
Agents:
openagent.md - General-purpose orchestratoropencoder.md - Development specialistsystem-builder.md - System generationWhen to use: System-level tasks, orchestration
development/)Purpose: Software development specialists
Agents:
frontend-specialist.md - React, Vue, modern CSSbackend-specialist.md - APIs, databases, serversdevops-specialist.md - CI/CD, deployment, infrastructurecodebase-agent.md - Codebase exploration and analysisWhen to use: Building applications, dev tasks
content/)Purpose: Content creation specialists
Agents:
copywriter.md - Marketing copy, persuasive writingtechnical-writer.md - Documentation, technical contentWhen to use: Writing, documentation, marketing
data/)Purpose: Data analysis specialists
Agents:
data-analyst.md - Data analysis, visualizationWhen to use: Data tasks, analysis, reporting
product/)Purpose: Product management specialists
Status: Ready for agents (no agents yet)
When to use: Product strategy, roadmaps, requirements
learning/)Purpose: Education and coaching specialists
Status: Ready for agents (no agents yet)
When to use: Teaching, training, curriculum
Location: .opencode/agent/subagents/
Purpose: Delegated specialists for specific subtasks
code/ - Code-related specialists
tester.md - Test authoring and TDDreviewer.md - Code review and securitycoder-agent.md - Focused implementationsbuild-agent.md - Type checking and buildscodebase-pattern-analyst.md - Pattern analysiscore/ - Core workflow specialists
task-manager.md - Task breakdown and managementdocumentation.md - Documentation generationsystem-builder/ - System generation specialists
agent-generator.md - Generate agent filescommand-creator.md - Create slash commandsdomain-analyzer.md - Analyze domainscontext-organizer.md - Organize contextworkflow-designer.md - Design workflowsutils/ - Utility specialists
image-specialist.md - Image editing and analysis| Aspect | Category Agents | Subagents |
|---|---|---|
| Purpose | User-facing specialists | Delegated subtasks |
| Invocation | Direct by user | Via task tool |
| Scope | Broad domain | Narrow focus |
| Example | frontend-specialist |
tester |
OpenAgents can pair with Claude Code for local workflows and distribution:
.claude/agents/.claude/skills/Use this when you want Claude Code to follow OpenAgents standards or to ship reusable helpers.
The system supports multiple path formats for backward compatibility:
# Short ID (backward compatible)
"openagent" → resolves to → ".opencode/agent/core/openagent.md"
# Category path
"core/openagent" → resolves to → ".opencode/agent/core/openagent.md"
# Full category path
"development/frontend-specialist" → resolves to → ".opencode/agent/development/frontend-specialist.md"
# Subagent path
"TestEngineer" → resolves to → ".opencode/agent/TestEngineer.md"
/ → use as category path/ → check core/ first (backward compat)Location: .opencode/prompts/{category}/{agent}/
Purpose: Model-specific prompt optimizations
gemini.md - Google Gemini optimizationsgrok.md - xAI Grok optimizationsllama.md - Meta Llama optimizationsopenrouter.md - OpenRouter optimizationsIf no variant exists for a model, the base agent file is used.
Agents should load relevant context files based on task type:
<!-- Context: standards/code | Priority: critical -->
Loads: .opencode/context/core/standards/code-quality.md
<!-- Context: development/react-patterns | Priority: high -->
Loads: .opencode/context/development/react-patterns.md
<!-- Context: standards/code, standards/tests | Priority: critical -->
# Create agent file
touch .opencode/agent/{category}/{agent-name}.md
# Add frontmatter and content
# (See guides/adding-agent.md for details)
# Create test structure
mkdir -p evals/agents/{category}/{agent-name}/{config,tests}
# Run tests
cd evals/framework && npm run eval:sdk -- --agent={category}/{agent-name}
# Auto-detect and add to registry
./scripts/registry/auto-detect-components.sh --auto-add
# Validate
./scripts/registry/validate-registry.sh
# Users install via install.sh
./install.sh {profile}
✅ Single responsibility - One domain, one agent
✅ Clear instructions - Explicit workflows and constraints
✅ Context-aware - Load relevant context files
✅ Testable - Include eval tests
✅ Well-documented - Clear description and usage
{domain}-specialist.md (e.g., frontend-specialist.md){name}.md (e.g., openagent.md){purpose}.md (e.g., tester.md)---
description: "Required - brief description"
category: "Required - category name"
type: "Required - always 'agent'"
tags: ["Optional - for discovery"]
dependencies: ["Optional - e.g., 'subagent:tester'"]
---
When task requires testing:
1. Implement feature
2. Delegate to TestEngineer for test creation
Before implementing:
1. Load core/standards/code-quality.md
2. Load category-specific context if available
3. Apply standards to implementation
Before execution:
1. Present plan to user
2. Request approval
3. Execute incrementally
guides/adding-agent.mdguides/testing-agent.mdcore-concepts/categories.mdlookup/file-locations.md../to-be-consumed/claude-code-docs/create-subagents.md../to-be-consumed/claude-code-docs/agent-skills.md../to-be-consumed/claude-code-docs/hooks.md../to-be-consumed/claude-code-docs/plugins.mdLast Updated: 2026-01-13
Version: 0.5.1