Skip to content

AgentWireDefinition

Base classes

Name Children Inherits
ClaudeCodeBaseModel
clawd_code_sdk.models.base
Base model for all Claude Code Pydantic models.

⋔ Inheritance diagram

graph TD
  1299908109["agents.AgentWireDefinition"]
  2604142835["base.ClaudeCodeBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  2604142835 --> 1299908109
  3879467795 --> 2604142835
  2751680898 --> 3879467795

🛈 DocStrings

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

:fa-brands-github: Show source on GitHub