{"id":47261439,"url":"https://github.com/inbharatai/agent-arcade-gateway","last_synced_at":"2026-03-14T23:11:14.010Z","repository":{"id":343417467,"uuid":"1177623130","full_name":"inbharatai/agent-arcade-gateway","owner":"inbharatai","description":"Real-time AI agent telemetry gateway with live visualizer. Ingest, route \u0026 display LLM tool calls, errors, and metrics.","archived":false,"fork":false,"pushed_at":"2026-03-10T13:03:38.000Z","size":1580,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T15:54:04.554Z","etag":null,"topics":["agent","ai","dashboard","llm","monitoring","nextjs","observability","opentelemetry","real-time","telemetry","typescript","websocket"],"latest_commit_sha":null,"homepage":"https://github.com/inbharatai/agent-arcade-gateway","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inbharatai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-10T07:52:27.000Z","updated_at":"2026-03-10T13:03:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/inbharatai/agent-arcade-gateway","commit_stats":null,"previous_names":["inbharatai/agent-arcade-gateway"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/inbharatai/agent-arcade-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbharatai%2Fagent-arcade-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbharatai%2Fagent-arcade-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbharatai%2Fagent-arcade-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbharatai%2Fagent-arcade-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inbharatai","download_url":"https://codeload.github.com/inbharatai/agent-arcade-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inbharatai%2Fagent-arcade-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30520884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-14T19:51:21.629Z","status":"ssl_error","status_checked_at":"2026-03-14T19:51:12.959Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","dashboard","llm","monitoring","nextjs","observability","opentelemetry","real-time","telemetry","typescript","websocket"],"created_at":"2026-03-14T23:11:09.022Z","updated_at":"2026-03-14T23:11:13.996Z","avatar_url":"https://github.com/inbharatai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"docs/assets/logo.png\" alt=\"Agent Arcade Logo\" width=\"120\" /\u003e\n\n# Agent Arcade\n\n### Universal AI Agent Observability Platform\n\n[![GitHub](https://img.shields.io/badge/GitHub-Repository-181717?logo=github\u0026style=for-the-badge)](https://github.com/inbharatai/agent-arcade-gateway)\n[![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)\n[![Version](https://img.shields.io/badge/Version-3.0.0-blue?style=for-the-badge)](https://github.com/inbharatai/agent-arcade-gateway/releases)\n[![Made by InBharat AI](https://img.shields.io/badge/Made_by-InBharat_AI-ff6b35?style=for-the-badge)](https://github.com/inbharatai)\n\n**Watch any AI agent work in real-time. Plug \u0026 play with every framework.**\n\n\u003cbr /\u003e\n\n![Agent Arcade v3.0](docs/assets/arcade-retro-theme.png)\n\n*Multi-agent session: OpenAI, Claude, OpenClaw, LangChain, and CrewAI agents collaborating — live cost tracking, XP leveling, and achievement unlocks*\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n### Now with OpenClaw Integration\n\n\u003cimg src=\"docs/assets/openclaw-integration.svg\" alt=\"OpenClaw + Agent Arcade Integration\" width=\"800\" /\u003e\n\n*Full observability into OpenClaw's Brain, Skills, Memory, Heartbeat, and Channel systems — one line of code*\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n[![Open Issues](https://img.shields.io/github/issues/inbharatai/agent-arcade-gateway?style=flat-square)](https://github.com/inbharatai/agent-arcade-gateway/issues)\n[![Pull Requests](https://img.shields.io/github/issues-pr/inbharatai/agent-arcade-gateway?style=flat-square)](https://github.com/inbharatai/agent-arcade-gateway/pulls)\n[![CI](https://img.shields.io/github/actions/workflow/status/inbharatai/agent-arcade-gateway/ci.yml?style=flat-square\u0026label=CI)](https://github.com/inbharatai/agent-arcade-gateway/actions)\n[![Security](https://img.shields.io/badge/Security-Policy-blue?style=flat-square)](SECURITY.md)\n[![Contributing](https://img.shields.io/badge/Contributing-Guide-success?style=flat-square)](CONTRIBUTING.md)\n\n\u003c/div\u003e\n\n---\n\n## Why Agent Arcade?\n\nMost AI observability tools give you logs after the fact. Agent Arcade gives you a **live command center** — see every agent, every tool call, every token spent, **as it happens**.\n\n\u003e **One platform. Every AI framework. Zero code changes.**\n\n```\n                    ┌─── OpenAI ───┐\n                    ├── Anthropic ──┤\n                    ├── OpenClaw ───┤\n Your AI Agents ────├── LangChain ──┼───▶ Agent Arcade ───▶ Live Dashboard\n                    ├── CrewAI ─────┤       Gateway           + Achievements\n                    ├── AutoGen ────┤       + Proxy           + XP System\n                    ├── LlamaIndex ─┤       + Watchers        + Cost Tracking\n                    └── Any HTTP AI ┘                         + Replay\n```\n\n---\n\n## What's New in v3.0\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n### Plug \u0026 Play Adapters\n7 framework adapters — wrap any AI SDK in one line\n\n### Zero-Code Proxy\nChange your base URL, get full telemetry. No SDK needed.\n\n### Gamification Engine\n32 achievements, 12 XP levels, streaks, leaderboards\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n### Cost Intelligence\nReal-time spend tracking for 25+ models with budget alerts\n\n### Session Replay\nRecord, playback, seek, and share debugging sessions\n\n### Multi-Channel Alerts\nSlack, Discord, Email, WhatsApp notifications\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n---\n\n## Supported Frameworks\n\n| Framework | Package | Integration | Language |\n|-----------|---------|-------------|----------|\n| **OpenAI** | `@agent-arcade/adapter-openai` | `wrapOpenAI(client)` — one line | TypeScript |\n| **Anthropic/Claude** | `@agent-arcade/adapter-anthropic` | `wrapAnthropic(client)` — one line | TypeScript |\n| **OpenClaw** | `@agent-arcade/adapter-openclaw` | `wrapOpenClaw(claw)` — one line | TypeScript |\n| **LangChain** | `@agent-arcade/adapter-langchain` | Callback handler | TypeScript |\n| **LlamaIndex** | `@agent-arcade/adapter-llamaindex` | Callback handler | TypeScript |\n| **CrewAI** | `agent-arcade-crewai` | `arcade_crew(crew)` decorator | Python |\n| **AutoGen** | `agent-arcade-autogen` | `wrap_autogen_agents(agents)` | Python |\n| **Any AI API** | `@agent-arcade/proxy` | Just change your base URL | Any |\n| **Claude Code** | `@agent-arcade/cli` | `agent-arcade hook claude-code` | Shell |\n| **Aider / Cursor** | `@agent-arcade/watcher` | Auto-detected from processes | Any |\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n| Requirement | Version |\n|-------------|---------|\n| [Bun](https://bun.sh) | 1.3+ |\n| [Node.js](https://nodejs.org) | 20+ |\n\n### Option A: CLI (Recommended)\n\n```bash\n# Install and start everything\nnpx @agent-arcade/cli init\nnpx @agent-arcade/cli start\n\n# Run an interactive demo with 4 simulated agents\nnpx @agent-arcade/cli demo\n```\n\n### Option B: Manual Setup\n\n```bash\n# Clone and install\ngit clone https://github.com/inbharatai/agent-arcade-gateway.git\ncd agent-arcade-gateway\nnpm ci\ncd packages/gateway \u0026\u0026 bun install \u0026\u0026 cd ../..\ncd packages/web \u0026\u0026 npm ci \u0026\u0026 cd ../..\n\n# Start services (two terminals)\nnpm run dev:gateway    # Gateway on :8787\nnpm run dev:web        # Dashboard on :3000\n```\n\n### Option C: One Command\n\n```bash\nnpm run dev:arcade\n```\n\n### Open the Dashboard\n\n| Endpoint | URL |\n|----------|-----|\n| **Dashboard** | http://localhost:3000 |\n| **Gateway Health** | http://localhost:8787/health |\n| **Gateway Capabilities** | http://localhost:8787/v1/capabilities |\n| **AI Proxy** | http://localhost:8788 |\n\n---\n\n## Integration Examples\n\n### OpenAI — One Line\n\n```typescript\nimport OpenAI from 'openai'\nimport { wrapOpenAI } from '@agent-arcade/adapter-openai'\n\nconst client = wrapOpenAI(new OpenAI(), {\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'my-app',\n})\n\n// Use OpenAI exactly as before — telemetry is automatic\nconst response = await client.chat.completions.create({\n  model: 'gpt-4o',\n  messages: [{ role: 'user', content: 'Hello!' }],\n})\n```\n\n### Anthropic/Claude — One Line\n\n```typescript\nimport Anthropic from '@anthropic-ai/sdk'\nimport { wrapAnthropic } from '@agent-arcade/adapter-anthropic'\n\nconst client = wrapAnthropic(new Anthropic(), {\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'my-app',\n})\n\n// All calls — streaming, tool use, extended thinking — tracked automatically\nconst message = await client.messages.create({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 1024,\n  messages: [{ role: 'user', content: 'Explain quantum computing' }],\n})\n```\n\n### OpenClaw — One Line\n\n```typescript\nimport { wrapOpenClaw } from '@agent-arcade/adapter-openclaw'\n\nconst claw = wrapOpenClaw(openClawInstance, {\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'my-claw',\n})\n\n// OpenClaw runs normally — Brain, Skills, Memory, Heartbeat all visualized\n// Every ReAct loop step, skill execution, and memory operation appears live\n```\n\nOr use event hooks for granular control:\n\n```typescript\nimport { createOpenClawHooks } from '@agent-arcade/adapter-openclaw'\n\nconst hooks = createOpenClawHooks({\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'my-claw',\n})\n\nclaw.on('brain:think', hooks.onThink)\nclaw.on('brain:act', hooks.onAct)\nclaw.on('skill:start', hooks.onSkillStart)\nclaw.on('skill:end', hooks.onSkillEnd)\n```\n\n### Zero-Code Proxy — Any Language\n\n```bash\n# Start the proxy\nbun run packages/proxy/src/index.ts\n\n# Python — just change the base URL\nOPENAI_BASE_URL=http://localhost:8788/openai python my_app.py\n\n# Node.js\nANTHROPIC_BASE_URL=http://localhost:8788/anthropic node my_app.js\n\n# Ollama\nOLLAMA_HOST=http://localhost:8788/ollama ollama run llama3\n```\n\nSupported proxy targets: **OpenAI, Anthropic, Google Gemini, Ollama, Mistral**\n\n### LangChain\n\n```typescript\nimport { createArcadeCallback } from '@agent-arcade/adapter-langchain'\n\nconst callback = createArcadeCallback({\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'langchain-app',\n})\n\n// Pass as callback to any LangChain chain, agent, or tool\nconst result = await chain.invoke({ input: \"...\" }, { callbacks: [callback] })\n```\n\n### CrewAI (Python)\n\n```python\nfrom crewai import Crew, Agent, Task\nfrom agent_arcade_crewai import arcade_crew\n\ncrew = Crew(agents=[...], tasks=[...])\ncrew = arcade_crew(crew, gateway_url=\"http://localhost:8787\", session_id=\"crewai-app\")\ncrew.kickoff()  # All agent/task lifecycle events tracked automatically\n```\n\n### AutoGen (Python)\n\n```python\nfrom autogen import AssistantAgent, UserProxyAgent\nfrom agent_arcade_autogen import wrap_autogen_agents\n\nassistant = AssistantAgent(\"coder\", llm_config={...})\nuser_proxy = UserProxyAgent(\"user\", code_execution_config={...})\n\nwrap_autogen_agents([assistant, user_proxy],\n    gateway_url=\"http://localhost:8787\",\n    session_id=\"autogen-app\"\n)\nuser_proxy.initiate_chat(assistant, message=\"Write a web scraper\")\n```\n\n### Node.js SDK (Manual)\n\n```typescript\nimport { AgentArcade } from '@agent-arcade/sdk-node'\n\nconst arcade = new AgentArcade({ url: 'http://localhost:8787', sessionId: 'my-session' })\n\nconst agentId = arcade.spawn({ name: 'My Agent', role: 'coder' })\narcade.state(agentId, 'thinking', { label: 'Planning...' })\narcade.tool(agentId, 'read_file', { path: 'src/index.ts' })\narcade.state(agentId, 'writing', { label: 'Implementing feature' })\narcade.end(agentId, { reason: 'Task complete', success: true })\narcade.disconnect()\n```\n\n### Python SDK (Manual)\n\n```python\nfrom agent_arcade import AgentArcade\n\narcade = AgentArcade(url=\"http://localhost:8787\", session_id=\"my-session\")\n\nagent_id = arcade.spawn(name=\"My Agent\", role=\"coder\")\narcade.state(agent_id, \"thinking\", label=\"Planning...\")\narcade.tool(agent_id, \"read_file\", path=\"src/main.py\")\narcade.state(agent_id, \"writing\", label=\"Implementing feature\")\narcade.end(agent_id, reason=\"Task complete\", success=True)\narcade.disconnect()\n```\n\n---\n\n## OpenClaw Integration Guide\n\nOpenClaw (163K GitHub stars) is the hottest open-source AI agent framework in 2026. Agent Arcade provides **first-class integration** with all 5 OpenClaw components.\n\n### What Gets Tracked\n\n| OpenClaw Component | Tracked Events | Arcade Visualization |\n|--------------------|---------------|---------------------|\n| **Brain** (ReAct loop) | `think`, `plan`, `act`, `observe`, `respond`, `error` | Thinking/tool/writing state transitions |\n| **Skills** (5,700+ plugins) | `start`, `end`, `error` | Each skill spawns a child agent with parent link |\n| **Memory** (Markdown files) | `read`, `write`, `search` | Tool events with key names and sizes |\n| **Heartbeat** (scheduler) | `start`, `end` | Each scheduled task spawns a child agent |\n| **Gateway** (channels) | `receive`, `send` | Reading/writing states per channel message |\n\n### Integration Methods\n\n**Method 1: One-Line Wrap** (recommended)\n\n```typescript\nimport { wrapOpenClaw } from '@agent-arcade/adapter-openclaw'\n\n// Wrap your OpenClaw instance — auto-instruments everything\nconst claw = wrapOpenClaw(openClawInstance, {\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'my-claw-session',\n  agentName: 'MyClaw',         // optional: custom agent name\n  trackMemory: true,           // optional: track memory ops (default: true)\n  trackHeartbeat: true,        // optional: track scheduled tasks (default: true)\n  trackSkills: true,           // optional: track skill executions (default: true)\n})\n\n// Use OpenClaw normally — all activity appears in the Arcade dashboard\n// When done:\nclaw.arcadeDisconnect()\n```\n\n**Method 2: Event Hooks** (granular control)\n\n```typescript\nimport { createOpenClawHooks } from '@agent-arcade/adapter-openclaw'\n\nconst hooks = createOpenClawHooks({\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'my-claw-session',\n})\n\n// Attach only the events you want to track\nclaw.on('brain:think', hooks.onThink)\nclaw.on('brain:plan', hooks.onPlan)\nclaw.on('brain:act', hooks.onAct)\nclaw.on('brain:observe', hooks.onObserve)\nclaw.on('brain:respond', hooks.onRespond)\nclaw.on('brain:error', hooks.onBrainError)\n\nclaw.on('skill:start', hooks.onSkillStart)\nclaw.on('skill:end', hooks.onSkillEnd)\nclaw.on('skill:error', hooks.onSkillError)\n\nclaw.on('memory:read', hooks.onMemoryRead)\nclaw.on('memory:write', hooks.onMemoryWrite)\nclaw.on('memory:search', hooks.onMemorySearch)\n\nclaw.on('heartbeat:start', hooks.onHeartbeatStart)\nclaw.on('heartbeat:end', hooks.onHeartbeatEnd)\n\n// Cleanup\nhooks.onEnd('Session complete')\nhooks.disconnect()\n```\n\n**Method 3: Gateway Middleware**\n\n```typescript\nimport { openClawMiddleware } from '@agent-arcade/adapter-openclaw'\n\n// Instruments all incoming channel messages automatically\nclaw.gateway.use(openClawMiddleware({\n  gatewayUrl: 'http://localhost:8787',\n  sessionId: 'production',\n}))\n```\n\n### How It Works Under the Hood\n\n```\nOpenClaw Instance\n  ├── brain.think(\"What's the weather?\")\n  │     └── Arcade: spawn agent → state(thinking)\n  ├── brain.act(\"weather_skill\", { city: \"NYC\" })\n  │     └── Arcade: tool(\"weather_skill\") → state(tool)\n  ├── skills.execute(\"weather_skill\")\n  │     └── Arcade: spawn child → link to parent → state(tool) → end\n  ├── memory.write(\"last_query\", \"weather NYC\")\n  │     └── Arcade: tool(\"memory:write\", { key: \"last_query\" })\n  ├── brain.respond(\"It's 72F and sunny!\")\n  │     └── Arcade: state(writing) → end(success)\n  └── heartbeat.run(\"check_inbox\")\n        └── Arcade: spawn child → link to parent → end\n```\n\n---\n\n## Architecture\n\n```mermaid\nflowchart LR\n  subgraph Adapters[\"Plug \u0026 Play Adapters\"]\n    OA[OpenAI Adapter]\n    AA[Anthropic Adapter]\n    OC[OpenClaw Adapter]\n    LC[LangChain Adapter]\n    LI[LlamaIndex Adapter]\n    CR[CrewAI Adapter]\n    AG[AutoGen Adapter]\n  end\n\n  subgraph ZeroCode[\"Zero-Code Tools\"]\n    PX[AI Proxy :8788]\n    PW[Process Watcher]\n    GW[Git Watcher]\n    LT[Log Tailer]\n  end\n\n  subgraph Core[\"Core Platform\"]\n    GY[Gateway :8787]\n    CC[Cost Calculator]\n    NR[Notification Router]\n  end\n\n  subgraph Dashboard[\"Web Dashboard :3000\"]\n    LV[Live Visualization]\n    ACH[Achievements]\n    XP[XP \u0026 Leveling]\n    LB[Leaderboard]\n    RP[Session Replay]\n    CD[Cost Dashboard]\n  end\n\n  Adapters --\u003e|telemetry events| GY\n  ZeroCode --\u003e|telemetry events| GY\n  GY --\u003e CC\n  GY --\u003e NR\n  GY --\u003e|SSE + Socket.IO| Dashboard\n```\n\n---\n\n## Gamification System\n\n### Achievements (32 Unlockable)\n\n| Category | Examples | Tiers |\n|----------|----------|-------|\n| **Speed** | Lightning Reflexes, Speed Demon, Time Lord | Bronze → Diamond |\n| **Reliability** | Error Free, Rock Solid, Perfectionist | Bronze → Diamond |\n| **Tooling** | Tool User, Swiss Army, Tool Master | Bronze → Diamond |\n| **Endurance** | Marathon Runner, Iron Will, Unstoppable | Bronze → Diamond |\n| **Teamwork** | Team Player, Hivemind, Swarm Intelligence | Bronze → Diamond |\n| **Special** | First Blood, Night Owl, Early Bird, Century | Bronze → Diamond |\n\n### XP \u0026 Leveling\n\n12 RPG-style levels with streak multipliers:\n\n| Level | Title | XP Required | Color |\n|-------|-------|-------------|-------|\n| 1 | Novice | 0 | Gray |\n| 2 | Apprentice | 500 | Green |\n| 3 | Journeyman | 1,500 | Blue |\n| 4 | Adept | 3,500 | Purple |\n| 5 | Expert | 7,000 | Amber |\n| 6 | Master | 12,000 | Red |\n| 7 | Grandmaster | 20,000 | Pink |\n| 8 | Champion | 32,000 | Orange |\n| 9 | Legend | 50,000 | Teal |\n| 10 | Mythic | 80,000 | Gold |\n| 11 | Transcendent | 120,000 | Diamond |\n| 12 | Godlike | 200,000 | Magenta |\n\n**XP Sources:** Task completion (100), speed bonuses (50-200), error-free runs (25), tool diversity (10/tool), error recovery (50), achievement unlocks (200-2500)\n\n**Streak Multiplier:** +0.1x per consecutive day, up to 3.0x\n\n### Leaderboard\n\nSortable rankings across 5 categories: Overall, Speed, Reliability, Tooling, Endurance. Top 3 agents get medal icons.\n\n---\n\n## Cost Intelligence\n\nReal-time cost tracking for 25+ AI models:\n\n| Provider | Models Tracked |\n|----------|---------------|\n| **Anthropic** | Claude Opus 4, Sonnet 4, Haiku 3.5 |\n| **OpenAI** | GPT-4o, GPT-4o-mini, o1, o1-mini, GPT-4 Turbo |\n| **Google** | Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini 2.0 |\n| **Mistral** | Mistral Large, Mistral Medium, Mistral Small |\n| **DeepSeek** | DeepSeek V3, DeepSeek R1 |\n| **OpenClaw** | Local agent (free — runs on your hardware) |\n| **Local** | Ollama, llama.cpp (free) |\n\nFeatures:\n- Per-agent and per-session cost breakdown\n- Model-colored cost bars in the dashboard\n- Budget threshold alerts (warning at 80%, critical at 95%)\n- Fuzzy model name matching (handles versioned names like `gpt-4o-2024-08-06`)\n- Export cost reports as JSON\n\n---\n\n## Session Replay\n\nRecord and replay agent sessions for debugging and sharing:\n\n- **Record** — Captures all events with relative timestamps\n- **Playback** — Speed control: 0.25x, 0.5x, 1x, 2x, 4x, 8x\n- **Seek** — Scrub to any point in the timeline\n- **Pause/Resume** — Stop and continue playback\n- **Save** — Persist up to 50 recordings in localStorage\n- **Import/Export** — Share sessions as JSON files\n\n---\n\n## Notifications\n\nMulti-channel alert system:\n\n| Channel | Transport | Setup |\n|---------|-----------|-------|\n| **Slack** | Webhook | Paste incoming webhook URL |\n| **Discord** | Webhook | Paste channel webhook URL |\n| **Email** | SMTP (nodemailer) | Configure SMTP credentials |\n| **WhatsApp** | API (planned) | Coming soon |\n\n### Alert Types\n\n- **Cost threshold** — Alert when spend exceeds budget percentage\n- **Error rate** — Alert when agent error rate spikes\n- **Agent errors** — Immediate notification on agent failure\n- **Agent waiting** — Alert when agent is blocked too long\n- **Session complete** — Summary notification when session ends\n\nRate limiting prevents notification spam (configurable cooldown per channel).\n\n---\n\n## Zero-Code Instrumentation\n\n### AI Proxy\n\nIntercepts AI API calls without touching your code:\n\n```bash\n# Start proxy\nbun run packages/proxy/src/index.ts\n\n# Route any AI SDK through it\nOPENAI_BASE_URL=http://localhost:8788/openai python app.py\nANTHROPIC_BASE_URL=http://localhost:8788/anthropic node app.js\nOLLAMA_HOST=http://localhost:8788/ollama ollama run llama3\n```\n\nTracks: model name, token usage, latency, streaming vs non-streaming, errors.\n\n### Process Watcher\n\nAuto-detects running AI agents by scanning system processes:\n\n| Detected Process | Agent Type |\n|-----------------|------------|\n| `claude` | Claude Code |\n| `aider` | Aider |\n| `cursor` | Cursor |\n| `devin` | Devin |\n| `copilot` | GitHub Copilot |\n| `ollama` | Ollama |\n| `langchain` | LangChain |\n| `crewai` | CrewAI |\n| `autogen` | AutoGen |\n| `llamaindex` | LlamaIndex |\n\nInfers agent state from CPU usage: \u003e50% = thinking, \u003e20% = writing, \u003e5% = reading.\n\n### Git Watcher\n\nMonitors your git index and emits file change events every 5 seconds. Automatically detects new, modified, and deleted files.\n\n### Log Tailer\n\nWatches AI tool log files with parsers for Claude Code, Aider, and generic formats. Auto-detects tool calls, thinking states, errors, and writing events.\n\n### Claude Code Hooks\n\n```bash\nagent-arcade hook claude-code\n```\n\nGenerates `pre-tool.sh` and `post-tool.sh` scripts that emit telemetry for every tool invocation in Claude Code.\n\n---\n\n## CLI\n\n```bash\n# Initialize — scans for AI tools and generates config\nagent-arcade init\n\n# Start all services (gateway + web + optional proxy)\nagent-arcade start\n\n# Check status\nagent-arcade status\n\n# Run a 4-agent simulation demo\nagent-arcade demo\n\n# Install Claude Code hooks\nagent-arcade hook claude-code\n```\n\n### Config File\n\nCreate `arcade.config.json` in your project root:\n\n```json\n{\n  \"gateway\": { \"port\": 8787 },\n  \"web\": { \"port\": 3000 },\n  \"proxy\": { \"enabled\": true, \"port\": 8788 },\n  \"agents\": [\n    { \"name\": \"Claude Code\", \"type\": \"claude-code\", \"auto\": true },\n    { \"name\": \"GPT Assistant\", \"type\": \"openai\", \"model\": \"gpt-4o\" }\n  ],\n  \"alerts\": {\n    \"slack\": { \"webhook\": \"https://hooks.slack.com/...\" },\n    \"costThreshold\": 10.00\n  }\n}\n```\n\n---\n\n## Protocol Reference\n\n### Event Types\n\n| Event | Description | When to Emit |\n|-------|-------------|--------------|\n| `agent.spawn` | New agent created | AI worker starts |\n| `agent.state` | State transition | Status changes |\n| `agent.tool` | Tool invocation | Tool called |\n| `agent.message` | Status message | User-facing updates |\n| `agent.link` | Parent-child link | Agent creates sub-agent |\n| `agent.position` | Layout position | For scene rendering |\n| `agent.end` | Agent completed | Task done or failed |\n| `session.start` | Session begins | App starts |\n| `session.end` | Session ends | App shuts down |\n\n### Agent States\n\n| State | Icon | Description |\n|-------|------|-------------|\n| `idle` | `idle` | Waiting for work |\n| `thinking` | `thinking` | Processing / reasoning |\n| `reading` | `reading` | Reading files / context |\n| `writing` | `writing` | Writing code / content |\n| `tool` | `tool` | Executing a tool |\n| `waiting` | `waiting` | Waiting for external input |\n| `moving` | `moving` | Navigating / transitioning |\n| `error` | `error` | Error occurred |\n| `done` | `done` | Task completed |\n\n### Ingest Payload\n\n```json\n{\n  \"v\": 1,\n  \"sessionId\": \"my-session\",\n  \"agentId\": \"agent-001\",\n  \"type\": \"agent.state\",\n  \"ts\": 1773120000000,\n  \"payload\": {\n    \"state\": \"writing\",\n    \"label\": \"Implementing feature\",\n    \"progress\": 0.62\n  }\n}\n```\n\n---\n\n## API Endpoints\n\n### Gateway (`:8787`)\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/v1/ingest` | Ingest telemetry events |\n| GET | `/v1/stream?sessionId=...` | SSE event stream |\n| GET | `/v1/connect?sessionId=...` | WebSocket (Socket.IO) |\n| GET | `/v1/capabilities` | Server capabilities |\n| GET | `/health` | Health check |\n| GET | `/ready` | Readiness probe |\n\n### AI Proxy (`:8788`)\n\n| Path | Target |\n|------|--------|\n| `/openai/*` | api.openai.com |\n| `/anthropic/*` | api.anthropic.com |\n| `/gemini/*` | generativelanguage.googleapis.com |\n| `/ollama/*` | localhost:11434 |\n| `/mistral/*` | api.mistral.ai |\n\n---\n\n## Monorepo Map\n\n```\nagent-arcade-gateway/\n├── packages/\n│   ├── gateway/             # Bun telemetry gateway (HTTP + Socket.IO + SSE)\n│   ├── web/                 # Next.js dashboard with gamification UI\n│   ├── proxy/               # Zero-code AI API proxy\n│   ├── cli/                 # CLI tool (init, start, demo, hooks)\n│   ├── core/                # Shared types and utilities\n│   ├── embed/               # Embeddable widget\n│   │\n│   ├── adapter-openai/      # OpenAI SDK wrapper\n│   ├── adapter-anthropic/   # Anthropic/Claude SDK wrapper\n│   ├── adapter-openclaw/    # OpenClaw agent framework wrapper\n│   ├── adapter-langchain/   # LangChain callback handler\n│   ├── adapter-llamaindex/  # LlamaIndex callback handler\n│   ├── adapter-crewai/      # CrewAI Python adapter\n│   ├── adapter-autogen/     # AutoGen Python adapter\n│   │\n│   ├── sdk-node/            # Node.js client SDK\n│   ├── sdk-browser/         # Browser client SDK\n│   ├── sdk-python/          # Python client SDK\n│   │\n│   ├── watcher/             # AI process auto-detector\n│   ├── git-watcher/         # Git index change watcher\n│   ├── log-tailer/          # AI log file parser\n│   └── notifications/       # Multi-channel alert router\n│\n├── scripts/                 # Load testing, simulation, dev tools\n├── docs/                    # Runbooks, architecture, guides\n├── docker-compose.yml       # Production deployment\n└── arcade.config.example.json  # Config template\n```\n\n---\n\n## Production Deployment\n\n### Docker Compose\n\n```bash\ndocker compose up -d --build\n```\n\n### PM2 (VM/Bare Metal)\n\n```bash\nnpm run build:web\nnpm run prod:start    # Start with PM2\nnpm run prod:status   # Check status\nnpm run prod:logs     # View logs\n```\n\n### Environment Variables\n\n| Variable | Default | Purpose |\n|----------|---------|---------|\n| `PROXY_PORT` | `8788` | AI Proxy port |\n| `GATEWAY_URL` | `http://localhost:8787` | Gateway URL for proxy |\n| `SESSION_ID` | Auto-generated | Default session |\n| `JWT_SECRET` | — | Auth token signing |\n| `SESSION_SIGNING_SECRET` | — | Session validation |\n| `REQUIRE_AUTH` | `0` | Enable JWT auth |\n| `ALLOWED_ORIGINS` | `*` | CORS allowlist |\n\n---\n\n## Security\n\n| Feature | Details |\n|---------|---------|\n| JWT auth | Optional, enable with `REQUIRE_AUTH=1` |\n| Session signing | Required in production |\n| CORS | Configurable allowlist with ReDoS protection |\n| Input validation | Names ≤200, roles ≤100, labels ≤500, messages ≤4000 chars |\n| Rate limiting | Flood and payload-size controls |\n| HTTPS | Configure at reverse proxy |\n\nSee [SECURITY.md](SECURITY.md) for the full security policy.\n\n---\n\n## Testing\n\n```bash\n# Run all tests\nnpm run ci           # lint → typecheck → build → test\n\n# Individual suites\nnpm run test:gateway  # 25 gateway tests\nnpm run test:store    # Store tests\nnpm run test:sdk      # SDK tests\nnpm run lint:web      # ESLint\nnpm run typecheck:web # TypeScript check\n```\n\n---\n\n## Contributing\n\nContributions are welcome!\n\n1. Fork the repository\n2. Create a feature branch\n3. Run `npm run ci` to verify\n4. Open a pull request\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.\n\n---\n\n## License\n\nMIT License — see [LICENSE](LICENSE)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Built with intensity by [InBharat AI](https://github.com/inbharatai)**\n\n**Agent Arcade v3.0 — See every AI agent. Track every token. Level up.**\n\n*Now with first-class OpenClaw, OpenAI, Anthropic, LangChain, LlamaIndex, CrewAI, and AutoGen support.*\n\n[Report Bug](https://github.com/inbharatai/agent-arcade-gateway/issues) | [Request Feature](https://github.com/inbharatai/agent-arcade-gateway/issues) | [Discussions](https://github.com/inbharatai/agent-arcade-gateway/discussions)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbharatai%2Fagent-arcade-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finbharatai%2Fagent-arcade-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finbharatai%2Fagent-arcade-gateway/lists"}