subagentpython

.com pydantic model catalog

Pydantic models this repo actually defines

3 real types, all from one file — scripts/agents/schema.py — added 2026-07-01. See why just one file.

BaseModel 6 fields

AgentConfig

scripts/agents/schema.py

validators: field_validator on name (regex [a-z0-9-]), Field min_length on description/system_prompt, Field gt=0 on max_turns

mirrors: crates/schema/src/agent.rs::AgentConfig; scripts/agents/schema.ts::AgentConfig

Pydantic v2 (model_config = {"use_enum_values": True}). Round-trips to the same .claude/agents/*.yaml shape as the Rust/Zod editions.

Enum 4 fields

AgentModel

scripts/agents/schema.py

mirrors: crates/schema/src/agent.rs::AgentModel; scripts/agents/schema.ts::AgentModel

str Enum with 4 members: OPUS_4_8, SONNET_4_6, HAIKU_4_5, FABLE_5. Written current with agent.rs (includes Fable5), unlike the TS mirror which had drifted until fixed the same session.

Enum 21 fields

AgentTool

scripts/agents/schema.py

mirrors: crates/schema/src/agent.rs::AgentTool; scripts/agents/schema.ts::AgentTool

21-member str Enum, one entry per built-in Claude Code tool.