Skip to content

API Reference parrot.integrations.agentd.proxy

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.integrations.agentd.proxy

View source

DaemonAgentProxy + daemon slash commands for AgentREPL.

Implements Module 7 of sdd/specs/agent-cli-daemon.spec.md. The Rich console is the EXISTING parrot.cli.repl.AgentREPL — this module supplies a third loader strategy (daemon over UDS), mirroring parrot.cli.loaders.ServerAgentProxy/_ServerBotProxy EXACTLY so AgentREPL sees an interchangeable loader, plus daemon-only slash commands (/status, /schedules, /invoke) and a queued job-event display drained between conversation turns.

Class DaemonAgentProxy

Loader strategy: proxy agent interactions to a running agentd daemon.

Mirrors ServerAgentProxy's shape (load/list_agents/close) but talks JSON-RPC over a Unix domain socket instead of HTTP.

Parameter Type Default Description
name_or_socket str

Attributes:

Attribute Type Description
name_or_socket Service name or explicit socket path (resolved via resolve_socket()).

Method DaemonAgentProxy.load

Connect to the daemon and return a proxy bot for name.

load(name: str) -> _DaemonBotProxy

Parameter Type Default Description
name str Agent name (used only for display -- the daemon serves exactly one agent, per spec §1 "1 daemon = 1 agent").

Returns: _DaemonBotProxy — A _DaemonBotProxy, with its tool list already cached.

Method DaemonAgentProxy.list_agents

Return the single agent this daemon serves, via agent.info.

list_agents() -> list[dict[str, Any]]

Returns: list[dict[str, Any]] — A one-element list with the daemon's agent.info payload.

Raises:

  • RuntimeError — If called before load().

Method DaemonAgentProxy.close

Close the underlying daemon connection.

close() -> None

Method DaemonAgentProxy.drain_events

Return and clear all queued, formatted job-event lines.

Meant to be called between conversation turns only (never mid-stream) -- the drain point is orchestrated by the attach command wiring (TASK-2216).

drain_events() -> list[str]

Returns: list[str] — The queued lines, in arrival order. The queue is empty afterwards.

Function register_daemon_commands

Register /status, /schedules, /invoke onto a CommandContext.

register_daemon_commands(ctx: 'CommandContext', proxy: DaemonAgentProxy) -> None

Parameter Type Default Description
ctx 'CommandContext' The command context (inline AgentREPL or the TUI adapter) to register commands on.
proxy DaemonAgentProxy The DaemonAgentProxy backing this session -- its AgentDaemonClient is what the handlers call.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally