Last updated: 2026-06-24
Codag compresses 1.2M log lines to 3,300 tokens (8,021x) so AI agents diagnose incidents fast. Free 50 MB/month; Hobby $19/mo. MIT-licensed CLI and MCP server.
Codag compresses 1.2 million log lines down to 3,300 tokens (8,021x reduction) so AI agents get only the lines that matter, tagged by role as root_cause, trigger, or consequence. Founded in San Francisco in 2026 as a Y Combinator S26 company, it costs $0 for 50 MB/month, $19/month for Hobby, and $199/month plus usage for Team. The MIT-licensed CLI and MCP server work with Claude Code, Codex, and Cursor.
Codag is a log compression service for AI agents built by Codag Inc., a Y Combinator Summer 2026 company based in San Francisco. The problem it solves is real and expensive: when an AI agent needs to diagnose a production incident, a raw log file can contain millions of lines that consume hundreds of thousands of tokens per query. Codag sits in front of the agent and compresses 1.2 million raw log lines down to 3,300 tokens, an 8,021-times reduction, while retaining every line that actually matters. The compression is not summarization. Codag keeps the actual log lines and tags each retained line by causal role: root_cause, trigger, or consequence. Every output line includes a citation pointing to the original line number in the raw file, so agents can trace evidence without inventing context. Output is schema-valid JSON, compatible with Claude, GPT, Gemini, and self-hosted local models. The hosted service uses fine-tuned proprietary models benchmarked against Drain3 and raw-log controls on the LogHub-2.0 dataset with a blind agent-diagnosis evaluation. Codag targets backend developers and SREs who run AI coding agents against production infrastructure. If your agent debugs failing Kubernetes pods, traces errors in AWS CloudWatch, or reviews Vercel build logs, Codag preprocesses those streams so the agent reads only the lines that matter. It handles JSON logs, syslog, Hadoop, Spark, HDFS, and unstructured application logs with no format configuration. PII is redacted during preprocessing before any log content leaves the local system. Pricing is based on compute consumed rather than seats. The Free plan covers 50 MB of compressed logs per month at no cost. Hobby costs $19/month with expanded limits. Team costs $199/month plus usage, suited for platform teams with high log volumes. The open-source CLI (Go, MIT licensed) and codag-drain log templating library (Rust, MIT licensed) are available on GitHub under the codag-megalith organization and can be run locally with no usage caps. Codag joined Y Combinator's Summer 2026 batch and integrates natively with Claude Code and Codex via a single `codag setup` command that registers its MCP server automatically. For teams running Datadog, Sentry, or journalctl pipelines, Codag wraps those commands as a drop-in replacement. A separate VS Code extension, codag-visualizer, with over 500 GitHub stars, provides live LLM workflow diagram visualization inside the editor.
Free: 50 MB/month at no cost. Hobby: $19/month. Team: $199/month plus usage-based compute charges. Pricing is by compute, not seats. Open-source CLI and drain library are free with no usage limits.
Codag is a log compression service for AI agents that reduces 1.2 million raw log lines to 3,300 tokens, an 8,021-times reduction, so agents can diagnose incidents without burning large token budgets. It is built by Codag Inc., a Y Combinator Summer 2026 company based in San Francisco with one employee, founded in 2026. Instead of summarizing logs and risking lost evidence, Codag keeps the actual log lines and tags each one by causal role: root_cause, trigger, or consequence. Every retained line includes a citation pointing back to the original line number so agents can trace exact evidence. It supports JSON logs, syslog, Kubernetes, Hadoop, Spark, HDFS, and unstructured application logs with no format configuration. The output is schema-valid JSON, compatible with Claude, GPT, Gemini, and local LLMs. PII is redacted during preprocessing before any content leaves the local system.
Codag offers three pricing tiers based on compute consumed rather than user seats. The Free plan costs $0 per month and includes 50 MB of compressed logs, suitable for occasional incident debugging. The Hobby plan costs $19 per month with expanded limits, designed for individual developers running regular agent workflows. The Team plan costs $199 per month plus usage-based charges, intended for platform teams with high log volumes. There are no per-seat fees, which keeps the Team plan cost-effective for larger engineering organizations. The open-source CLI client and codag-drain library are free to use under the MIT license with no usage caps when running locally. Overage pricing for the Team plan is not publicly listed, so contact Codag directly for high-volume estimates.
Codag's primary feature is 8,021x log compression, converting 1.2 million lines into 3,300 schema-valid JSON tokens in seconds. Role-based evidence tagging marks each retained line as root_cause, trigger, or consequence, giving AI agents a causal map of the incident rather than raw noise. Line-number citations in every output record let agents point to exact evidence without hallucinating context. The MCP server integrates with Claude Code, Codex, and Cursor via a single `codag setup` command requiring no manual configuration. PII redaction runs as a preprocessing step before any log content is transmitted to the hosted service. Codag also ships codag-drain, an MIT-licensed Rust library for deterministic log templating without inference, and the codag-visualizer VS Code extension for live LLM workflow diagrams, which has over 500 GitHub stars.
Yes, Codag has a permanent free tier that includes 50 MB of compressed logs per month at no cost and no credit card required. For most developers, 50 MB covers 2 to 4 typical incident investigations depending on log verbosity. The free tier has no time limit and activates immediately on sign-up. Beyond 50 MB per month, users need to upgrade to the Hobby plan at $19/month. Additionally, the open-source components, including codag-drain in Rust and codag-cli in Go, both MIT licensed, can be used without any account or usage cap since they run locally without calling the hosted API. The codag-visualizer VS Code extension is also free and available on the VS Code Marketplace.
There are no direct log-compression-for-AI-agents tools with the same scope as of mid-2026, placing Codag in a category it largely created. The closest alternative for token management is Compresr (YC W26), which focuses on boosting model context rather than structured log analysis with causal tagging. For broader AI agent observability, teams often pair raw log access with LangSmith or Arize Phoenix for tracing, though neither compresses logs before they reach the model. For traditional log management, Datadog and Grafana Loki handle ingestion and search but require the agent to process full log volumes at full token cost. Drain3, the open-source Python log parser on which codag-drain is modeled, provides templating without inference but does not output schema-valid JSON or causal role tags. For teams wanting full self-hosting, the MIT-licensed codag-cli and codag-drain repositories provide complete code visibility.
Codag is best for backend developers and SREs who run AI coding agents (Claude Code, Codex, Cursor) against production logs as part of incident response workflows. It fits teams where AI agents are already used for debugging but token costs or context-window limits are a bottleneck. Platform engineers at companies using AWS CloudWatch, Kubernetes, Vercel, Railway, or Docker will find the out-of-the-box integrations immediately useful. It is not a good fit for non-technical users without terminal experience, since setup and usage are CLI-first with no web dashboard. Teams that need SOC 2 Type II or HIPAA compliance should wait until Codag publishes formal certifications, as none are currently available. Codag is also not suitable for organizations that require guaranteed uptime SLAs, given its current one-person team structure.
Getting started requires running the installation script from codag.ai, which downloads the codag-cli Go binary for your platform (macOS, Windows, or Linux). After installation, run `codag setup` to authenticate with OAuth; this also registers the MCP server with supported agents like Claude Code and Cursor automatically. Use `codag wrap <command>` to pipe any existing log command through the compressor, such as `codag wrap docker logs my-container`. For AWS CloudWatch, the built-in `tail_aws_logs` tool fetches and compresses logs from a specified log group. For Vercel, `tail_vercel` does the same from the Vercel API. The free tier activates immediately on sign-up with no credit card required, giving 50 MB/month of compressed output to test the workflow before upgrading.
The core difference is token cost and signal-to-noise ratio. A raw 1.2-million-line log fed directly to an AI agent consumes roughly 1.2 million tokens, which at GPT-4o input pricing ($5 per million tokens) costs $6 per diagnostic session. Codag reduces that same log to 3,300 tokens, bringing the cost to under $0.02. Beyond cost, raw logs include large volumes of normal, non-anomalous lines that agents must filter through, increasing the chance of missing the actual root cause. Codag's role tagging (root_cause, trigger, consequence) pre-structures the causal chain so the agent can focus immediately on relevant evidence without wading through noise. The tradeoff is that Codag's compression may not retain every edge-case line a human engineer would want to see, though citations to original line numbers allow manual verification. Benchmarked against Drain3 and raw-log controls on LogHub-2.0, Codag's accuracy on blind agent-diagnosis tasks exceeds both baselines according to its published results.