send-message

Send messages between agent sessions through a machine-wide SQLite message bus.

2|Updated Jul 18, 2026
One-click install
npx skills add https://github.com/Arasz/ai-badger --skill send-message-arasz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: send-message
Source: https://github.com/Arasz/ai-badger/tree/main/features/common/skills/send-message
Command: npx skills add https://github.com/Arasz/ai-badger --skill send-message-arasz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When multiple AI agent sessions run on the same machine, coordinating them normally requires the human to relay information between windows. This Skill lets one agent session send a message directly to another session, to every session in a project, or to every session on the machine, with delivery handled automatically by each session's hook. ## Core Features & Use Cases - Three send shapes: 1:1 sends via --session-id, project broadcasts via --project-id, and machine broadcasts when neither target is given; if both are given, the session target wins. - Mandatory sender identity: session and project ids are derived from harness environment variables, pid ancestry, and the .ai-badger/project-id walk, or passed explicitly; unresolvable identity refuses the send with a non-zero exit. - Target validation: a --project-id target is checked against projects resolvable on this machine before anything is written, so undeliverable rows are never stored. - Use Case: An agent finishes investigating a bug and runs the send script with another session's id and the message "found it, see src/bus.py"; the receiving session's delivery hook injects the message into its context on its next turn. ## Quick Start Ask the agent to send a message to another session by running the send_message.py script with --content and the target --session-id.

Frequently Asked Questions about send-message

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send a message from one AI agent session to another?

Run send_message.py with --content and the target's --session-id for a 1:1 send. The script prints "sent <row id>" on success, and the receiving session's delivery hook injects the message into its context on its next delivery event.

How do I broadcast a message to all agent sessions in a project?

Pass --project-id with the project's minted id instead of --session-id. The target is validated against projects resolvable on the machine before anything is written; omitting both target flags sends a machine-wide broadcast.

Why does send_message.py refuse with "missing sender identity"?

Both sender sessionId and projectId are required. The session id derives from harness env vars (CLAUDE_CODE_SESSION_ID, PI_SESSION_ID, HERMES_SESSION_ID), pid ancestry, or a unique cwd match; the project id comes from AI_BADGER_PROJECT_ID or the nearest .ai-badger/project-id file. Pass --sender-session and --sender-project explicitly when neither can be derived.

What happens if I pass both --session-id and --project-id?

The session target wins: the row is stored as a 1:1 send and the project half is dropped at write time. Dual-flag sends also skip project-target validation since no project target is ever stored.

Does the message bus work with the pi harness?

Yes, pi has a native message-bus extension tool that speaks to the same user-DB bus with automatic sender identity derivation. If the extension is not installed, fall back to the send_message.py script, which remains the transport for all other harnesses.

Why does a --project-id send refuse even though the project exists?

The machine scan validating targets is bounded: it walks at most four directory levels under the store's home, skips noise trees like node_modules and .git, and never follows symlinks. A project outside that budget is invisible; use the minted id from its .ai-badger/project-id file.