ccglass  by jianshuo

Inspect AI agent interactions locally

Created 5 days ago

New!

302 stars

Top 88.0% on SourcePulse

GitHubView on GitHub
Project Summary

ccglass provides a local reverse-proxy and web dashboard to visualize the internal workings of AI coding agents like Claude Code, Codex, Kimi, and others. It targets developers and researchers who need to understand precisely what prompts, tool schemas, and message histories are being sent to LLMs, offering real-time insights into token usage, caching, and estimated costs. The primary benefit is enhanced transparency and debugging capabilities for AI-assisted development workflows.

How It Works

ccglass operates as a lightweight, local HTTP proxy that intercepts traffic between supported coding agents and their respective LLM APIs. Unlike traditional proxies, it sidesteps common issues with Node/native applications that ignore standard proxy settings or break with tool updates. By intercepting the plain HTTP hop to localhost, it avoids the need for CA certificates or TLS pinning, simplifying setup and ensuring broader compatibility. The intercepted data is then streamed to a real-time web dashboard for analysis.

Quick Start & Requirements

  • Install: npm install -g ccglass
  • Run: Execute ccglass interactively or specify a client (e.g., ccglass claude, ccglass codex).
  • Requirements: Node.js version 18 or higher. Optional dependencies (@modelcontextprotocol/sdk, zod) are pulled in for the self-inspection feature.
  • Links: Usage examples and provider details are extensively documented within the README.

Highlighted Details

  • Live request streaming with detailed views of system prompts, messages, and tool calls.
  • Conversation flow visualization as a sequence diagram, highlighting tool usage and results.
  • Turn-to-turn diffs to pinpoint context additions and cache breakpoints.
  • Accurate token counts, cache hit rates, and per-request cost estimations.
  • IDE support (Cursor, Cline, Continue) via ccglass proxy for BYOK configurations.
  • Optional self-inspection (MCP) allows agents to query their own previous requests.

Maintenance & Community

Issues are automatically routed to Claude, which can investigate and propose fix Pull Requests. Notable contributions include DeepSeek-TUI support by @zhuangbiaowei. No explicit community channels (like Discord/Slack) are listed.

Licensing & Compatibility

The project is licensed under the MIT license, permitting commercial use and integration with closed-source applications. Specific provider notes detail authentication requirements (e.g., Codex API-key mode).

Limitations & Caveats

ccglass cannot intercept Codex traffic when authenticated via ChatGPT login (WebSocket), only API-key mode. For IDEs like Cursor, interception is limited to BYOK (Bring Your Own Key) configurations; built-in subscription models are not supported. The log directory should be treated as sensitive.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
33
Issues (30d)
18
Star History
302 stars in the last 5 days

Explore Similar Projects

Starred by Dan Guido Dan Guido(Cofounder of Trail of Bits), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
4 more.

opcode by winfunc

0.3%
22k
GUI for Claude Code
Created 11 months ago
Updated 7 months ago
Feedback? Help us improve.