Protocol Overview
Agent protocols define how an AI agent behaves. They're written in YAML and specify inputs, triggers, tools, and execution handlers.
Why Protocols?
Protocols provide:
- Declarative definition — Define behavior, not implementation
- Portable agents — Move agents between projects
- Versioning — Track changes with git
- Validation — Catch errors before runtime
- Visualization — Debug execution flows
Agent Formats
Octavus supports two agent formats:
| Format | Use Case | Structure |
|---|---|---|
interactive | Chat and multi-turn dialogue | triggers + handlers + agent |
worker | Background tasks and pipelines | steps + output |
Interactive agents handle conversations — they respond to triggers (like user messages) and maintain session state across interactions.
Worker agents execute tasks — they run steps sequentially and return an output value. Workers can be called independently or composed into interactive agents.
See Workers for the worker protocol reference.
Interactive Protocol Structure
File Structure
Each agent is a folder with:
Prompts can be organized in subdirectories. In the protocol, reference nested prompts by their path relative to prompts/ (without .md): shared/company-info.
References are markdown files with YAML frontmatter that the agent can fetch on demand during execution. See References.
settings.json
| Field | Required | Description |
|---|---|---|
slug | Yes | URL-safe identifier (lowercase, digits, dashes) |
name | Yes | Human-readable name |
description | No | Brief description |
format | Yes | interactive (chat) or worker (background) |
Naming Conventions
- Slugs:
lowercase-with-dashes - Variables:
UPPERCASE_SNAKE_CASE - Prompts:
lowercase-with-dashes.md(paths use/for subdirectories) - Tools:
lowercase-with-dashes - Triggers:
lowercase-with-dashes
Variables in Prompts
Reference variables with {{VARIABLE_NAME}}:
Variables are replaced with their values at runtime. If a variable is not provided, the placeholder is kept as-is.
Prompt Interpolation
Include other prompts inside a prompt with {{@path.md}}:
The referenced prompt content is inserted before variable interpolation, so variables in included prompts work the same way. Circular references are not allowed and will be caught during validation.
Next Steps
- Input & Resources — Defining agent inputs
- Triggers — How agents are invoked
- Tools — External capabilities
- MCP Servers — Remote services and device capabilities via MCP
- Skills — Code execution and knowledge packages
- References — On-demand context documents
- Handlers — Execution blocks
- Agent Config — Model and settings
- Workers — Worker agent format
- Provider Options — Provider-specific features
- Types — Custom type definitions