Skip to main content

SEND_MESSAGE_TOOL

Constant SEND_MESSAGE_TOOL 

Source
pub(crate) const SEND_MESSAGE_TOOL: &str = r#"{
  "name": "SendMessage",
  "description": "Send a message to another agent by name. The message is injected as input into the target agent's active conversation. Use for agent-to-agent coordination — handoff, task delegation, status notifications. Delivery tries local → same-host → LAN → cloud relay in order. The answer starts with what happened and ends with the message id (id=…, the MSGID= the receiver sees): \"Delivered to X\" means it was injected into X's running conversation (a live agent gets messages at once, even mid-turn); \"QUEUED for X — their agent is starting up, restarting or stopping\" means X's AgentMux has it and delivers it as soon as X's agent is up; \"HELD for X (not_running)\" means X is a known agent that is not running, and this AgentMux keeps the message for up to 24 h and delivers it when X starts; \"HELD for X (needs_login)\" means X's agent is not signed in, and this AgentMux keeps the message for up to 24 h and delivers it once X signs in; \"QUEUED for X via the cloud relay (unconfirmed, expires in 30 min)\" means only the relay has it — an agent name that exists nowhere also gets this answer, so check DiscoverAgents if you expected local delivery, and it adds \"No agent of that name has signed in from your account\" when the relay says the target is not one of your agents (a likely typo); \"Message delivery failed (needs_login)\" means X's agent is not signed in and the message was not kept (only where it cannot be held); \"Message delivery failed (not_found)\" means no agent of that name was reachable. Do not resend a QUEUED or HELD message.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "to":      { "type": "string", "description": "Name of the target agent (its AGENTMUX_AGENT_ID value)" },
      "message": { "type": "string", "description": "Message text to inject into the target agent's conversation" }
    },
    "required": ["to", "message"]
  }
}"#;