← All Diagrams
System Overview
vibex is a multi-channel AI coding agent platform. Users interact through Telegram, a Web UI, or MCP clients.
Three AI backends (Claude, Codex, Gemini) run as CLI subprocesses — either as single agents or collaborating in group chats.
Two MCP servers enable tool-based communication: vibex-subagents (:7891) for external orchestration, group-chat (:7892) for inter-agent messaging.
USER INTERFACES
APPLICATION LAYER
MCP PROTOCOL LAYER
AI BACKENDS (CLI Subprocesses)
PERSISTENCE
Telegram Bot
Forum Topics + tmux
bot.py
Web UI
Next.js SPA at /ui
web/frontend/*
MCP Clients
Claude Code, etc.
POST /mcp :7891
Cron Scheduler
Background tasks
scheduler.py
FastAPI :8100
web/app.py
api/conversations.py
api/group_chat.py
api/mcp.py
api/schedules.py
api/browse.py · api/git.py
api/agent_definitions.py
Agent Executor
web/agent_executor.py
run_agent() → DomainEvents
Subprocess shell spawn
JSONL stdout parser
cancel_agent() SIGTERM
MCP config writer
Timeout: 300s/600s
Group Orchestrator
web/group_chat.py
spawn/kill/restart agents
Watchdog: 10s health check
GroupChatStore: queues
Session resumption
Dynamic agent configs
SSE broadcast
Telegram Bot Engine
bot.py · python-telegram-bot
SessionManager
TmuxManager
SessionMonitor (2s poll)
MessageQueue + merge
InteractiveUI
MarkdownV2 output
vibex-subagents :7891
run_agent · agent_result · sessions
mcp_server.py · Bearer auth
group-chat MCP :7892
get_new_messages · post_message · reply_to_thread
group_mcp_server.py · 127.0.0.1
MCP Config Writer
.mcp.json · .gemini/settings.json
mcp_config.py · .codex/config.toml
Claude Code CLI
claude -p --stream-json · 200K
OpenAI Codex CLI
codex exec --json · 400K
Google Gemini CLI
gemini -p --stream-json · 1M
web.db
SQLite WAL · 14 tables
state.json
Thread bindings
session_map.json
Hook-written
*.jsonl transcripts
~/.claude/projects/
mcp_sessions
.json persistence
User interfaces
Application logic
Orchestration
MCP protocol
Backends
Storage
Scheduler
Solid flow — direct calls (UI → App)
Dashed — async spawn (App → Backend)
Long dash — orchestrator control
Dotted — MCP tool calls