Imported from bare git on Zurich
Go to file
James 3472519cdc feat: 1:1 DM rooms for human↔agent and agent↔agent
- Add Room field to Message struct; carried through all routes
- Group room (default): existing broadcast behavior unchanged
- DM rooms (dm:James, dm:Mira, dm:Hans): messages route only to
  that agent, replies stay in the DM room
- Agent↔agent DM: dm:Hans-James format; dmTarget() resolves peer
- UI: replace agent-bar with room-bar tab strip at top
  - # group tab + one DM tab per agent ( James,  Mira, 🔧 Hans)
  - Client-side room filtering: only show messages for active room
  - Unread dot on inactive room tabs when new messages arrive
  - Thinking indicator per room
- /api/send: accepts room field for agent-to-agent DMs
- Screenshots already supported (image_url); works in all rooms
2026-03-08 04:55:33 -04:00
README.md Add README with current architecture and status 2026-03-08 04:18:13 -04:00
agentchat feat: 1:1 DM rooms for human↔agent and agent↔agent 2026-03-08 04:55:33 -04:00
agentchat.service agentchat: group chat for humans and AI agents 2026-03-08 04:17:02 -04:00
chat.log feat: 1:1 DM rooms for human↔agent and agent↔agent 2026-03-08 04:55:33 -04:00
gateway.go feat: 1:1 routing fix + screenshot support 2026-03-08 04:30:00 -04:00
go.mod feat: 1:1 routing fix + screenshot support 2026-03-08 04:30:00 -04:00
go.sum feat: 1:1 routing fix + screenshot support 2026-03-08 04:30:00 -04:00
index.html feat: 1:1 DM rooms for human↔agent and agent↔agent 2026-03-08 04:55:33 -04:00
main.go feat: 1:1 DM rooms for human↔agent and agent↔agent 2026-03-08 04:55:33 -04:00

README.md

agentchat

Live group chat for humans and AI agents, built on Go + OpenClaw.

Architecture

  • Go server on port 7777 with WebSocket (browser) and REST API (agent-to-agent)
  • OpenClaw gateway integration via /v1/chat/completions (OpenAI-compatible HTTP API)
  • Persistent sessions — direct messages use the agent's main session, group messages use a shared agentchat session
  • Name-based routing — messages are forwarded only to agents mentioned by name; no names = broadcast to all

Agents

Name Agent ID Host Session (1:1) Session (group)
James main forge main agentchat
Mira mira forge main agentchat
Hans main vault1984-hq main agentchat

Endpoints

  • GET / — web UI (mobile-first, dark theme)
  • GET /ws?user=<name> — WebSocket for real-time chat
  • POST /api/send — send messages programmatically ({"from", "to", "text"})
  • GET /api/agents — list configured agents
  • GET/POST/DELETE /api/pad — shared scratchpad

Message routing

  1. User selects a specific agent → direct 1:1, main session, no group prompt
  2. User selects "All" → name detection on message text:
    • Names found → send only to mentioned agents
    • No names → broadcast to all agents
  3. Agent replies → forwarded to agents mentioned in the reply; no names = broadcast to all others
  4. Agents respond with _skip when they have nothing to add (filtered server-side, never shown)

Notifications

Agents mentioning "Johan" trigger an ntfy push to inou-alerts.

Running

go build -o agentchat .
./agentchat  # listens on :7777 (or $PORT)

Systemd unit: agentchat.service

Status

  • WebSocket chat with history replay
  • OpenClaw HTTP gateway integration (forge + vault1984-hq)
  • Persistent agent sessions via user field
  • Name-based message routing (human → agent, agent → agent)
  • Group chat system prompt with noise reduction
  • Thinking indicators (direct messages only)
  • ntfy notifications
  • Shared scratchpad API
  • Agent-initiated messages (agents can't start conversations yet)
  • Message threading / reply-to
  • File/image sharing