Reconstruct agent architecture. Track runtime executions. Debug nodes in isolation.

Cohzen (cz) statically scans LangGraph AST and captures zero-code execution telemetry. Run cz runs to inspect timeline waterfalls, and cz node run to debug handlers directly in isolation.

$pip install cohzen|
Read Documentation
Follow updates:Twitter / X•LinkedIn•GitHub
100% Static AST
LangGraph Discovery
Telemetry & Gaps Audit
Immutable Manifest v0.1
cohzen-cli — scan
cz scan .Reconstruct Architecture from Python AST (0 Runtime Execution)
LangGraph · StateGraph · Nodes · Edges · ToolNodes · Models
cz v0.3.4 release·Static AST Analysis & Zero-Code Telemetry Engine
Scroll to explore the AI system
THE AI SYSTEM

AI isn't a model anymore.
It's a system.

Models, prompts, context, tools, memory, and agents work together.

Change one—and the behavior can change everywhere.

MODEL
The Model: Simple input in, output out.

Hover over any node to inspect real-time latency, token budgets, and runtime boundaries.

WHEN THINGS GO WRONG

AI agents fail differently.

Traditional software gives you a stack trace.

Agents give you a trail of decisions.

01 — The Hidden Failure

The error isn’t where it started.

01
→
04
→
08
→
12
Actual Cause
→
19
→
31
→...→
47✕
Failure
STEP 12·Unexpected tool result
missing 'currency'
STEP 19·Context changed (fallback injected)
+380 tokens
STEP 31·Wrong routing decision dispatched
branch #8f31
STEP 47·✕ Execution Halted (Runtime 500)
CRASH
Step 1 of 5: The error isn’t where it started.

You shouldn't have to
reconstruct the story.

Cohzen keeps the whole execution together.

Observe↓Understand↓Replay↓Fix↓Prevent
CORE ARCHITECTURE

The control layer for your AI system.

Observe it. Replay it. Evaluate it. Prevent it.

Pipeline Flow5 PHASES
01 / 05
SCENE 01 — STATIC DISCOVERY

See your actual agent graph architecture.

01 Prompt
02 Router
Step 12: Tool
Context State
Step 47
47
cz scan [path]
THE RESULT

One layer. One execution. One source of truth.

The Workflow

From production failure to verified fix.

Cohzen turns a difficult production failure into an execution you can inspect, replay, change, evaluate, and verify.

01Scan

Reconstruct your agent architecture from AST.

Run cz scan in any repository. Zero code rewrites, zero package imports, zero API keys. Cohzen builds a complete graph model in milliseconds.

scan
$ cz scan .
 
✓ Discovered StateGraph in src/workflow.py
✓ Resolved 14 nodes and 6 tool boundaries
✓ Reconstructed conditional edge branch routing
02Audit

Audit telemetry coverage and eliminate blind spots.

cz audit cross-references package manifests, environment configurations, and function-level decorators to show which agent nodes lack tracing before shipping.

audit
$ cz audit .
 
✓ LangSmith detected in package manifests
✖ Node 'assistant' missing @traceable decorator
⚠ .env missing 'LANGCHAIN_TRACING_V2=true'
03Visualize

Inspect in your browser or generate Mermaid flowcharts.

Explore your agent graph topology with pan/zoom, handler line spans, and tool schemas locally, or export Mermaid flowcharts for PR documentation.

visualize
$ cz view .
 
✓ Compiled standalone HTML viewer (0 runtime deps)
✓ Launched interactive browser visualizer
✓ Mermaid diagram: cz scan . --mermaid
04Initialize & Track

Initialize zero-code execution tracking with cz init.

Run cz init once in your repository. In v0.3.4, it renders a slim topology report, installs a zero-overhead virtualenv .pth startup hook, and records LangGraph executions into local SQLite with zero network egress.

init
$ cz init
 
✓ Cohzen initialized at ./
✓ Manifest: .cohzen/manifest.json
✓ Telemetry DB: .cohzen/executions.db
✓ Startup hook: cohzen_startup.pth (0 app code changes)
✓ Graph topology & routing edges rendered
✓ Run workflow normally, then inspect with 'cz runs'
05Contract

Emit the immutable CohzenManifest schema.

cz scan --json emits a canonical, machine-readable JSON contract with stable IDs and precise source locations for compliance and reporting.

StateGraph & MessageGraph topology
graph
Registered nodes & lambda routers
nodes
LLM providers & tool bindings
models
Checkpointer persistence metadata
state
Static analysis completeness audit
meta
06Gate

Enforce architectural gates in CI/CD.

Add Cohzen to your GitHub Actions workflow. Block PRs that introduce uninstrumented LLM caller nodes, missing tracing keys, or unmapped conditional routes.

GitHub Action: pip install cohzen
setup
Run cz scan . --json -o manifest.json
scan
Run cz audit . --json -o audit.json
audit
Gate: Fail PR if uninstrumented nodes exist
gate
Architecture verified & merged to main
pass
THE OUTCOME

Every failure makes your system smarter.

The execution that broke in production doesn't disappear. It becomes something you can understand, replay, evaluate, and turn into a guardrail.

THE CLOSED LOOP:FailureUnderstandingFixKnowledgePrevention
Transformation Loop
CONTINUOUS FLOW
LOOP CLOSES → BACK TO PRODUCTION
Phase 1 of 7
LIVE RUNTIME•Live Traffic Serving
Step 47 Incident Lifecycle

Live agent serving real user requests.

Agents process multi-step workflows, orchestrate tools, and mutate context in production. Every execution boundary is instrumented with zero latency overhead.

RUNTIME CLUSTER: us-east-prod-agent-04SERVING TRAFFIC
Throughput1,842 runs/hr
Deterministic Cache94.2% hit rate
Active Guardrails47 regression shields
Execution stream attached · zero performance penalty
LIVE
The Core Principle

Your production data shouldn't just tell you what went wrong.

It should make your AI better.

Every edge case crystallized into a test. Every regression prevented before merge.

CLI Command Suite

Scan and audit in your terminal first.

Cohzen v0.3.4 pairs static LangGraph AST scanning with zero-egress runtime capture, virtualenv startup hooks, and CI/CD audit gates. Map graphs with cz scan, initialize transparent capture with cz init, trace executions with cz runs, and inspect detailed spans with cz run.

cz scan .Reconstruct AST in milliseconds

Statically reconstructs LangGraph workflows directly from Python AST without executing any runtime code or importing unverified packages.

cohzen-cli (v0.3.4) — scan
$ cz scan .
 
╭─────────────── Cohzen Architecture Scan (v0.1) ────────────────╮
│ Scanned Target: ./examples/langgraph-tools │
│ Frameworks: ✓ langgraph │
│ Files Examined: 2 total (1 Python files) │
│ Scan Duration: 1.69 ms (Zero runtime execution) │
│ Graphs: 1 • Nodes: 2 • Edges: 3 • Tools: 2 • Models: 1 │
╰────────────────────────────────────────────────────────────────╯
 
Registered Nodes & Handlers:
🤖 assistant --> handler: assistant (line 20-23) | LLM: langchain.invoke | bound: search_docs
🤖 tools --> handler: tool_node (line 29-29) | ToolNode(search_docs, calculate_metrics)
 
Graph Topology & Routing Edges:
DIRECT START ────> assistant
CONDITIONAL assistant ──?─> lambda state: tools if has_tool_calls else finish -> [END]
DIRECT tools ────> assistant
 
✓ Architecture discovered • Run 'cz audit' to inspect telemetry coverage.
Capabilities:✓ Zero runtime code execution✓ Exact file & line span tracking✓ First-class inline lambda & ToolNode resolution
Under The Hood

Deterministic static analysis, zero runtime execution.

Cohzen reconstructs what can be determined statically from the codebase directly from Python AST. Zero imports. Zero API keys. Zero side effects.

100% Static AST Reconstruction

Cohzen traverses Python source code using Python’s native ast parser. It never imports untested code, never executes closures, and never requires active secrets like OPENAI_API_KEY.

DISCOVERY PIPELINE
Python Files→AST Parse→LangGraph Detectors→Symbol Resolution→CohzenManifest
Zero network callsSafe in any CI sandbox

The Immutable System Manifest (v0.1)

The canonical CohzenManifest represents graphs, nodes, tools, and models with exact source line spans, resolution states, and completeness metadata decoupled from presentation formats.

MANIFEST MULTI-FORMAT SYNTHESIS
Terminal Flow•Mermaid TD•HTML Visualizer•Audit Reports
Canonical schemaImmutable JSON specification
cohzen-pipeline · v0.1.0-engine
DETERMINISTIC PIPELINE
$ cz scan .
1. Parses repository source files into AST syntax trees (Python ast stdlib).
2. Dispatches StateGraph, MessageGraph, and Graph class instantiations.
3. Resolves registered nodes, inline lambda expressions, and ToolNode instances.
4. Traces LLM provider call sites (OpenAI, Anthropic, Google, Groq, LiteLLM).
✓ Emits formatted architecture flowchart & Rich terminal dashboard in < 2ms.
Works With Your Stack

Keep the tools you already use.

Cohzen is designed to be composable. Keep your agent framework. Keep your observability platform. Keep your evaluation tools. Cohzen connects the debugging loop between them.

AGENT FRAMEWORKS
LangGraph logo
LangGraph
CrewAI logo
CrewAI
PydanticAI logo
PydanticAI
Observability
Langfuse logo
Langfuse
LangSmith logo
LangSmith
Phoenix logo
Phoenix
Cohzen
COHZEN
Control Layer
Evaluation
DeepEval logo
DeepEval
Braintrust logo
Braintrust
Ragas logo
Ragas
YOUR AI SYSTEM

The framework may change. The debugging problem doesn't.

Philosophy

Not another dashboard.

Cohzen isn't trying to become the place where every metric, trace, and log lives. There are already excellent tools for that. Cohzen focuses on the gap between:

FROM

“Something failed in production.”

TO

“I understand why it failed. I've reproduced it. I've fixed it. And I've made sure it won't happen again.”

OBSERVE↓UNDERSTAND↓REPLAY↓FIX↓VERIFY↓PREVENT

That's the loop Cohzen is built to close.

Open by design

Your AI infrastructure should be inspectable.

Cohzen is open source and self-hostable. Inspect the code. Understand how executions are captured. Run the infrastructure where your systems run.

Apache 2.0 Licensed · Self-hostable · Developer first
Roadmap

Building the reliability layer for AI systems.

v0.1.0SHIPPED
STATIC SCAN & AUDIT

100% static LangGraph AST scanner (cz scan), telemetry audit (cz audit), CohzenManifest v0.1.0, Mermaid export, HTML UI (cz view).

v0.2.0SHIPPED
RUNTIME TRACKING & AUDITING

Observability gap auditing (cz audit), standalone interactive HTML visualizer (cz view), and initial runtime telemetry models.

v0.3.4SHIPPED
ZERO-EGRESS CAPTURE & CI GOVERNANCE

Virtualenv .pth hooks, slim cz init topology output, lifecycle controls (cz on/off/status/deinit), one-off capture, SQLite secret redaction, and CI audit gates (--min-coverage, --fail-on-empty).

v0.4.0IN PROGRESS
FRAMEWORK EXPANSION

Static architecture & runtime instrumentation for LlamaIndex Workflows, CrewAI, AutoGen, and multi-agent coordination.

v1.0.0FUTURE
REPLAY & REGISTRY

Deterministic execution replay, failure boundary isolation, automated regression generation, and centralized manifest registry.

Active development · 2026
FAQ

Frequently asked questions.

Your agent already ran.
Now understand why.

Stop reproducing production failures from scratch.
Record the execution.
Replay what happened.
Change what matters.
Verify the fix.
Turn the lesson into a test.

Open source · Developer first · Built for AI systems