How tashfeenahmed/circlechat works
CircleChat is a team chat where people and sandboxed CLI agents collaborate, with tools mediated by a gateway and risky actions subject to approval. The main workflow is a person messaging in the web chat, the client calling the server API, and the server runtime coordinating agent work, tool access, and shared state. The README also documents substantial side capabilities including tasks and memory, pages, files, browser automation, integrations, mailbox bridges, and schedules. Some feature implementations were not sampled; their placement follows the repository tree and documented capabilities, and uncertain links are omitted or marked dashed.
Main entry points: app.ts Application wiring · runtime.ts Agent runtime · gateway.ts Tool gateway · api.ts API routes
Components 27
Web experience
- Web app and screens
web/src/App.tsx - Group chat
web/src/screens/Chats.tsx - Client state
web/src/store.tsx - JSON API client
web/src/api.ts
Application core
- HTTP server
server/src/server.ts - API routes
server/src/api.ts - Application wiring
server/src/app.ts - Team services
server/src/services.ts - SQLite store
server/src/db.ts - Encrypted vault
server/src/crypto.ts - Live event bus
server/src/bus.ts
Agent execution
- Agent runtime
server/src/agents/runtime.ts - Agent engines
server/src/agents/engines.ts - Tool gateway
server/src/gateway.ts - Action approvals
server/src/approvals.ts
Team capabilities
- Shared files
server/src/files.ts - Living pages
server/src/pages.ts - Schedules and watches
server/src/triggers.ts - Sandboxed browser
server/src/browser/manager.ts - Task board
web/src/screens/Tasks.tsx - Team memory
web/src/screens/Memory.tsx
External connections
- App integrations
server/src/apps.ts - Composio catalog
server/src/composio.ts - Agent mailboxes
server/src/bridges/mailbox.ts - Slack and Telegram
server/src/bridges/slack.ts
Other components
- Team member
- External tools and services
Connections 31
- Team member → Group chat: sends message
- Group chat → Client state: updates state
web/src/screens/Chats.tsx - Client state → JSON API client: calls API
web/src/store.tsx - JSON API client → API routes: sends requests
web/src/api.ts - HTTP server → API routes: routes requests
server/src/server.ts - HTTP server → Application wiring: starts app
server/src/server.ts - Application wiring → Agent runtime: constructs runtime
server/src/app.ts - Agent runtime → Agent engines: selects engines
server/src/agents/runtime.ts - Agent runtime → Tool gateway: requests tools
server/src/agents/runtime.ts - Agent runtime → Team services: uses services
server/src/agents/runtime.ts - Agent runtime → Action approvals: checks actions
server/src/agents/runtime.ts - Application wiring → Tool gateway: constructs gateway
server/src/app.ts - Application wiring → Team services: constructs services
server/src/app.ts - Application wiring → SQLite store: opens database
server/src/app.ts - Application wiring → Encrypted vault: constructs vault
server/src/app.ts - Application wiring → Live event bus: constructs bus
server/src/app.ts - Team services → SQLite store: reads and writes
server/src/services.ts - Team services → Live event bus: publishes events
server/src/services.ts - Tool gateway → Encrypted vault: uses secrets
- Tool gateway → Action approvals: requests approval
- Agent runtime → Shared files: handles agent files
server/src/agents/runtime.ts - Application wiring → Living pages: constructs page store
server/src/app.ts - Application wiring → Schedules and watches: wires triggers
server/src/app.ts - Application wiring → Sandboxed browser: wires browser
server/src/app.ts - API routes → Task board: serves task features
- API routes → Team memory: serves memory features
- Tool gateway → App integrations: dispatches app tools
- App integrations → Composio catalog: offers extended catalog
- Agent mailboxes → External tools and services: connects mail
- Slack and Telegram → External tools and services: bridges messaging
- Tool gateway → External tools and services: mediates tool access