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
Protocol Structure
yaml
File Structure
Each agent is a folder with:
text
settings.json
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 generation (background) |
Naming Conventions
- Slugs:
lowercase-with-dashes - Variables:
UPPERCASE_SNAKE_CASE - Prompts:
lowercase-with-dashes.md - Tools:
lowercase-with-dashes - Triggers:
lowercase-with-dashes
Variables in Prompts
Reference variables with {{VARIABLE_NAME}}:
markdown
Variables are replaced with their values at runtime. If a variable is not provided, it's replaced with an empty string.
Next Steps
- Input & Resources — Defining agent inputs
- Triggers — How agents are invoked
- Tools — External capabilities
- Skills — Code execution and knowledge packages
- Handlers — Execution blocks
- Agent Config — Model and settings
- Provider Options — Provider-specific features