agent-comm

v1.3.12
io.github.keshrath/agent-comm Checked 1 day ago Published 2 months ago

Agent intercommunication - messaging, channels, shared state, and real-time events

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

comm_register

Register this agent with the communication hub. Returns the agent identity.

ParameterTypeDescription
name *stringHuman-readable agent name (2-64 chars, alphanumeric with . _ -)
capabilitiesarrayCapability tags (e.g. "code-review", "testing")
channelsarrayChannels to auto-create and join after registration (e.g. ["general"]). Non-existent channels are created on the fly.
metadataobjectArbitrary metadata (JSON object)
skillsarraySkills this agent provides (for skill-based discovery)

comm_agents

Agent management. Actions: "list" (list agents, filter by status/capability/stuck), "discover" (find by skill/tag), "whoami" (return identity), "heartbeat" (keep alive + optional status), "status" (set status text), "unregister" (go offline).

ParameterTypeDescription
action *stringAction to perform (see enum for options)
capabilitystring[list] Filter by capability keyword
include_offlineboolean[list] Include offline agents (default: false)
skillstring[discover] Skill ID or name to search for
statusstring[list] Filter by status
status_textstring[heartbeat/status] Status text (max 256 chars, omit or null to clear)
stuck_threshold_minutesnumber[list] When provided, only returns agents alive but inactive for this many minutes (1-1440)
tagstring[discover] Tag to search for across all agent skills

comm_send

Send a message. Modes: direct (set "to"), channel (set "channel"), broadcast (set "broadcast":true), reply (set "reply_to"), forward (set "forward"). Only one mode at a time.

ParameterTypeDescription
content *stringMessage content
ack_requiredbooleanWhether the recipient must acknowledge (direct only)
broadcastbooleanSend to all online agents
channelstringChannel name to post to
commentstringOptional comment to add when forwarding
forwardnumberForward this message ID (must also set "to" or "channel")
importancestringMessage importance level (default: "normal")
reply_tonumberReply to this message ID (auto-threads, auto-routes to same target)
thread_idnumberReply to this thread (for direct/channel sends)
tostringRecipient agent name or ID (direct message)

comm_poll

Block until a new inbox message arrives or timeout_ms elapses. Replaces busy-poll loops (comm_inbox + sleep). Returns immediately if the inbox already has matches. Max timeout: 60000ms.

ParameterTypeDescription
importancestringOnly return messages at this importance level
limitnumberMax messages (default: 50, max: 500)
timeout_msnumberMaximum wait time in ms (default: 5000, max: 60000)
unread_onlybooleanOnly unread messages (default: true)

comm_inbox

Read messages in your inbox (direct + channel messages). Set thread_id to get a specific thread instead. Filter by importance to find urgent messages cheaply.

ParameterTypeDescription
importancestringOnly return messages at this importance level
limitnumberMax messages (default: 50, max: 500)
thread_idnumberWhen provided, returns the full thread for this message ID instead of the inbox
unread_onlybooleanOnly unread messages (default: true)

comm_channel

Channel management. Actions: "create", "list", "join", "leave", "archive", "update", "members", "history".

ParameterTypeDescription
action *stringAction to perform (see enum for options)
channelstringChannel name (required for all actions except "list")
descriptionstring[create/update] Channel description
include_archivedboolean[list] Include archived channels
limitnumber[history] Max messages (default: 50, max: 500)

comm_state

Shared key-value state. Actions: "set" (optionally with ttl_seconds for auto-expiry), "get", "list", "delete", "cas" (atomic compare-and-swap). Use ttl_seconds when claiming locks (e.g. playwright instances) so a dead agent does not hold the lock forever.

ParameterTypeDescription
action *stringAction to perform (see enum for options)
expectedstring | null[cas] Expected current value (null if key should not exist)
keystringKey name (required for set/get/delete/cas)
namespacestringNamespace (default: "default")
new_valuestring[cas] New value (empty string to delete)
prefixstring[list] Filter by key prefix
ttl_secondsnumber[set] Optional TTL in seconds. Entries past their TTL are lazy-deleted on the next get/list. Recommended for locks.
valuestring[set] Value (JSON as string if needed)