Expand description
Subagent configuration schema and parsing
Subagents are specialized AI agents that can be invoked for specific tasks. They are defined as Markdown files with YAML frontmatter and loaded from:
- Project level:
.vtcode/agents/(highest priority) - User level:
~/.vtcode/agents/(lower priority) - Built-in: shipped with the binary (lowest priority)
§Example subagent file
---
name: code-reviewer
description: Expert code review specialist. Use after writing or modifying code.
tools: read_file, grep_file, list_files
model: inherit
permission_mode: default
skills: rust-patterns, security-review
---
You are a senior code reviewer ensuring high standards of code quality.
Focus on readability, security, and best practices.Structs§
- Subagent
Config - Complete subagent configuration
- Subagent
Frontmatter - YAML frontmatter parsed from subagent markdown file
- Subagents
Config - Configuration for the subagent system in vtcode.toml
Enums§
- Subagent
Model - Model selection for subagent
- Subagent
Parse Error - Errors that can occur when parsing subagent configurations
- Subagent
Permission Mode - Permission mode for subagent tool execution
- Subagent
Source - Source location of a subagent definition
Functions§
- discover_
subagents_ in_ dir - Discover all subagent files in a directory
- load_
subagent_ from_ file - Load subagent from a markdown file