Bases: ClaudeCodeBaseModel
Wire-format agent definition matching the CLI control protocol.
This is the strict camelCase representation sent over the wire
in the initialize request.
The CLI's public Zod schema (sdk.d.ts) only defines::
description, prompt, tools, disallowedTools, model, mcpServers,
criticalSystemReminder_EXPERIMENTAL, skills, maxTurns
However, the CLI's internal parse schema (Rff / parseAgentFromJson)
also accepts these additional fields, which are fully functional::
memory, background, hooks, effort, permissionMode, isolation
Source code in src/clawd_code_sdk/models/agents.py
| class AgentWireDefinition(ClaudeCodeBaseModel):
"""Wire-format agent definition matching the CLI control protocol.
This is the strict camelCase representation sent over the wire
in the initialize request.
The CLI's *public* Zod schema (``sdk.d.ts``) only defines::
description, prompt, tools, disallowedTools, model, mcpServers,
criticalSystemReminder_EXPERIMENTAL, skills, maxTurns
However, the CLI's *internal* parse schema (``Rff`` / ``parseAgentFromJson``)
also accepts these additional fields, which are fully functional::
memory, background, hooks, effort, permissionMode, isolation
"""
description: str
prompt: str
tools: list[ToolName | str] | None = None
model: ModelName | Literal["inherit"] | str | None = None # noqa: PYI051
memory: SettingSource | None = None
mcp_servers: Sequence[AgentMcpServerSpec] | None = None
disallowed_tools: list[ToolName | str] | None = None
critical_system_reminder_experimental: str | None = Field(
default=None, serialization_alias="criticalSystemReminder_EXPERIMENTAL"
)
skills: list[str] | None = None
initial_prompt: str | None = None
max_turns: int | None = None
background: bool | None = None
hooks: AgentHooksConfig | None = None
effort: ReasoningEffort | int | None = None
permission_mode: PermissionMode | None = None
isolation: Literal["worktree"] | None = None
auto_compact_window: int | None = None
omit_claude_md: bool | None = Field(default=None, serialization_alias="omitClaudeMd")
observer: str | None = None
observer_message: str | None = None
|