# A2A from the CLI Source: https://docs.ideharmony.com/a2a/cli Agent-to-agent messaging lives in the daemon, so it is reachable from a plain terminal with no desktop or TUI running. That makes it scriptable, and it makes supervision possible from a second window. ## Sending and asking Two verbs that differ in commitment: ```powershell harmony agent send "" harmony agent ask "" ``` `send` delivers a message. `ask` expects an answer back. Neither creates durable work — for that you delegate a task. ## Reading the inbox ```powershell harmony agent inbox harmony agent reply "" harmony agent ack ``` Acknowledging is distinct from replying. An acknowledgement records that a message was seen; it does not answer it. ## Delivery status is its own question ```powershell harmony agent delivery-status ``` > [!IMPORTANT] > A successful `send` means the message was accepted for delivery. It does not > mean an agent started work. The reported state is one of > `received_and_started`, `queued_behind`, `received_not_started`, `idle`, > `needs_enter`, or `unknown` — and only the first means a turn began. See > [delivery lifecycle](/docs/a2a/delivery-lifecycle). `needs_enter` deserves particular attention from a script: the text reached the agent's composer and was never submitted. Nothing will happen, and the agent looks alive. ## Listing agents ```powershell harmony agent list harmony agent get ``` > [!WARNING] > The fleet roster can report more agents live than actually exist. Confirm > against task state before a script concludes work is in progress. See > [known limitations](/docs/reference/known-limitations). ## Channels ```powershell harmony channel list harmony channel unread harmony channel read harmony channel post "" harmony channel ack harmony channel join ``` > [!NOTE] > Cross-workspace mention delivery has a known open defect. A mention raised in > one workspace may not reach a member scoped to another. ## Scripting guidance **Poll task state, not delivery state, to decide whether work finished.** Delivery answers "did it arrive"; the task answers "is it done". ```powershell harmony tasks list ``` **Do not re-send on silence.** Re-sending a message that is `queued_behind` simply queues it twice. Check the state first. **Treat `unknown` as unknown.** It means the daemon could not gather evidence, not that the message failed. Retrying on `unknown` can duplicate work. ## Permissions A2A has a workspace-level mode — `Off`, `Connect`, or `Orchestrate` — that governs whether agents may message each other at all. CLI sends are subject to the same policy as UI sends. > [!SECURITY] > Messages arriving from peer machines over LAN Link render as text only. They > are never pasted into a PTY and never routed to an execute path, so a remote > peer cannot cause a command to run by messaging you. ## Related - [A2A overview](/docs/a2a) - [Delivery lifecycle](/docs/a2a/delivery-lifecycle) - [CLI command index](/docs/cli/command-index)