File Format
AgentUse agents are markdown files with YAML frontmatter.Frontmatter Reference
Required Fields
AI model to use for the agent.Format: You can also specify a custom environment variable suffix:
provider:model-name
Supported providers:anthropic
- Anthropic Claude modelsopenai
- OpenAI GPT modelsopenrouter
- OpenRouter models
Optional Fields
A brief description of what the agent does.This description is used in multiple contexts:
- As subagent tool description: When this agent is used as a subagent, this becomes the tool description that parent agents see
- CLI output: Displayed when running the agent to provide context
- Plugin events: Available to plugins for logging or monitoring
- Documentation: Self-documenting agents for teams
- Keep it concise (80-120 characters recommended)
- Be action-oriented (describe what the agent does, not what it is)
- Focus on the primary capability or purpose
Configuration for Model Context Protocol (MCP) servers that provide tools and resources to the agent.Each server is defined as a key-value pair where the key is the server name and the value is the server configuration.
Array of sub-agent configurations that this agent can delegate tasks to.Each sub-agent must specify a
path
to the .agentuse
file, with optional name
and maxSteps
parameters.Path Resolution: Subagent paths are resolved relative to the parent agent file’s directory, not the current working directory. This ensures portability and consistency.OpenAI-specific options for GPT-5 and other OpenAI models.Supported Options:
reasoningEffort
: Controls the computational effort for reasoning models ('low'
,'medium'
,'high'
)textVerbosity
: Controls response length and detail ('low'
,'medium'
,'high'
)
These options are particularly useful with GPT-5 models to balance between response quality, speed, and cost.
Tools Configuration
AgentUse currently supports tools through MCP servers and sub-agents only.
Direct tool definitions are not yet implemented.
- MCP Servers - Connect to any Model Context Protocol server
- Sub-Agents - Delegate tasks to other agents
MCP Servers
Stdio MCP Configuration
HTTP MCP Configuration
Multiple MCP Servers
Note: The
mcp_servers
field uses a map format where each server has a name as the key.Sub-Agents
Sub-Agent Configuration
Remote Sub-Agents
Sub-agents can call the main agent or other sub-agents, enabling complex multi-agent workflows.
Environment Variables in MCP Configuration
Security by Design: AgentUse prevents hardcoding secrets in agent files. Use
requiredEnvVars
and allowedEnvVars
to control which environment variables are passed to MCP servers.MCP Server Configuration Fields
Common Fields (All Server Types)
requiredEnvVars
: Array of environment variables that MUST exist. Agent fails immediately if any are missing.allowedEnvVars
: Array of environment variables to pass through if they exist. Warns if missing but continues.disallowedTools
: Array of tool names or patterns to exclude from this server. Supports wildcards (e.g.,delete_*
).
Stdio Server Fields
command
: Executable command to start the MCP server (required)- Can be an absolute path or a command in PATH
- Relative paths (containing
/
or\
) are resolved from the agent file’s directory
args
: Array of command-line arguments (optional)env
: Object of additional environment variables to set (optional)
HTTP Server Fields
url
: HTTPS URL of the MCP server (required, must use HTTPS)sessionId
: Optional session identifier for the connectionauth
: Authentication configuration object (optional)type
: Currently only"bearer"
is supportedtoken
: Bearer token value, can reference environment variables with${VAR_NAME}
headers
: Object of custom HTTP headers to send (optional)
Direct value assignment (e.g.,
GITHUB_TOKEN: "abc123"
) is intentionally not supported to prevent secrets in code.System Prompt Sections
Basic Structure
Using Context in Prompts
Direct variable interpolation in prompts is not currently supported. Context should be provided through conversation or MCP tools.
Conditional Sections
Special Syntax
Commands
Structured Output
Complete Example
Validation Rules
- File Extension: Agent files must use
.agentuse
extension - Model: Must be a non-empty string (required field)
- MCP Server Configuration:
- Stdio servers: Must have
command
field - HTTP servers: Must have
url
field withhttp://
orhttps://
protocol - Cannot have both
command
andurl
in the same server config
- Stdio servers: Must have
- Environment Variables:
requiredEnvVars
andallowedEnvVars
must be arrays of strings- Environment variable names in
${VAR_NAME}
format are validated at runtime
- Sub-agents:
- Must be an array of objects
- Each object must have a
path
field (string) - Optional
name
(string) andmaxSteps
(number) fields
- Authentication: Only
bearer
type is supported for HTTP MCP servers - Tool Restrictions:
disallowedTools
must be an array of strings (supports wildcards) - OpenAI Options:
openai
field is only valid for OpenAI modelsreasoningEffort
must be one of:'low'
,'medium'
,'high'
textVerbosity
must be one of:'low'
,'medium'
,'high'
- No other options are allowed under
openai