On-chain messaging between agents and humans, powered by Algorand.
CorvidAgent works fully without AlgoChat. Without an ALGOCHAT_MNEMONIC, the on-chain bridge stays disabled. All features — sessions, councils, work tasks, the web UI — work via HTTP/WebSocket + SQLite. AlgoChat adds on-chain identity, encrypted remote messaging, and wallet-based authentication.
Agents default to AGENT_NETWORK=localnet. Localnet auto-generates test wallets and funds them with 10 ALGO — zero real crypto needed. Test the full AlgoChat flow (PSK encryption, slash commands, agent-to-agent messaging) without spending a single ALGO. The server and agents can even run on different networks (e.g., mainnet for the server, localnet for agents).
Messages are Algorand transactions. Every message has a verifiable sender, timestamp, and on-chain receipt. No centralized servers.
Pre-shared key encryption for private conversations. Messages are encrypted before broadcast and only readable by intended recipients.
Every agent has an Algorand wallet. Their public key is their identity. Messages are cryptographically signed and verifiable.
The DiscoveryService polls the Algorand indexer for new transactions sent to the agent’s wallet. It tracks the last round per conversation to avoid reprocessing.
Incoming transactions are decoded from hex. If PSK encryption is configured, messages are decrypted using the pre-shared key with counter-mode replay protection.
Messages are routed to either the CommandHandler (for /slash commands) or to an agent session. Conversation history (last 10 exchanges, 8K char limit) is injected as context.
The ResponseFormatter delivers responses on-chain. Long messages are chunked into 800-byte segments with inter-chunk delays. ALGO spending is tracked with daily limits.
server/algochat/
├── bridge.ts # Orchestrates all services
├── config.ts # Env vars & network config
├── agent-messenger.ts # Agent-to-agent routing
├── agent-wallet.ts # Wallet creation & funding
├── agent-directory.ts # Agent metadata lookup
├── command-handler.ts # Slash command parsing
├── response-formatter.ts # On-chain message delivery
├── discovery-service.ts # Indexer polling
├── subscription-manager.ts# Session management
└── psk.ts # Pre-shared key encryption
Pre-Shared Key (PSK) encryption provides private messaging over Algorand’s public ledger. Both parties share a secret key out-of-band, then encrypt all messages before broadcasting.
# PSK URI format
algochat-psk://v1?addr=ALGO_ADDR&psk=BASE64URL_KEY
Send these commands via AlgoChat to control your agent remotely. Requires ALGOCHAT_OWNER_ADDRESSES authorization.
/status
Check agent status and active sessions
/stop
Stop the currently running session
/mode <mode>
Set permission mode (default, plan, auto-edit, full-auto)
/agent <name>
Switch to a different agent
/approve
Approve a pending tool-use request
/deny
Deny a pending tool-use request
/work <desc>
Create a work task (branch + PR)
/council <prompt>
Launch a multi-agent council deliberation
/balance
Check agent wallet & credit balance
Agents communicate with each other using the corvid_send_message MCP tool. Messages are routed through the AgentMessenger service which handles thread tracking, deduplication, and optional ALGO payments.
// Agent calls MCP tool
corvid_send_message({
to_agent: "researcher",
message: "Analyze this data...",
thread: "abc123" // optional
})