#7530: feat(agents): add description field for dynamic agent discovery
agents
Cluster:
Compaction Enhancements and Features
## Summary
Adds an optional `description` field to agent config schema that enables dynamic agent discovery in multi-agent orchestration setups.
## Changes
- Add `description?: string` to `AgentConfig` type
- Add `description` to `AgentEntrySchema` (zod validation)
- Include description in `agents_list` tool output
- Add tests for description inclusion/omission
## Use Case
This allows orchestrator agents to understand what each sub-agent specializes in at runtime via `agents_list()`, enabling intelligent dynamic routing without hardcoded catalogs.
Example config:
```json
{
"agents": [
{
"id": "trading",
"name": "Trading Sister",
"description": "Polymarket trading, market analysis, edge detection, bet execution",
"workspace": "..."
}
]
}
```
Example `agents_list` output:
```json
{
"requester": "main",
"allowAny": true,
"agents": [
{
"id": "main",
"name": "Main Agent",
"description": "Orchestrates all sub-agents",
"configured": true
},
{
"id": "trading",
"name": "Trading Sister",
"description": "Polymarket trading, market analysis",
"configured": true
}
]
}
```
Closes #7490
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds an optional `description` field to the agent runtime config/types and threads it through the `agents_list` tool so orchestrators can discover agent capabilities at runtime. The tool now surfaces `name` + `description` for configured agents, and tests were expanded to cover inclusion and omission cases.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- Changes are additive (optional config field), localized to the agents_list tool, and covered by targeted tests; no behavior changes for existing configs beyond adding an extra optional output field.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#10197: fix: add missing allowAgents to agent defaults subagents schema
by Yida-Dev · 2026-02-06
75.0%
#14640: feat(agents): support per-agent temperature and maxTokens in agents...
by lailoo · 2026-02-12
73.0%
#16247: feat(agents): declarative agent definitions for sessions_spawn
by zerone0x · 2026-02-14
72.9%
#12808: docs(subagents): clarify allowAgents is per-agent only
by JBrady · 2026-02-09
72.2%
#8893: fix: enhance subagent error reporting with diagnostic context
by joetomasone · 2026-02-04
71.6%
#17921: feat: add spawnableBy bidirectional sub-agent spawn authorization
by jacobot01 · 2026-02-16
71.4%
#8361: docs: Add subagent configuration and allowlist guide
by soilgrowerx · 2026-02-03
71.4%
#16362: Update session-pruning.md - updated agents.defaults config std
by elliottb · 2026-02-14
70.7%
#19329: feat: add per-agent compaction and context pruning overrides
by curtismercier · 2026-02-17
70.4%
#19560: docs: refactor agent workspace default location & bootstrap configu...
by ashinkuniyil · 2026-02-17
70.3%