TMA1

A monolith for your agent's loop. Silent until it talks back.
TMA1 is local-first observability for LLM agents, powered by GreptimeDB.
It records every LLM call on your machine, then routes what it sees back
into the agent's next turn through hooks and MCP tools.
One binary. No Docker. No Grafana. No cloud account.

The name comes from TMA-1 (Tycho Magnetic Anomaly-1) in 2001: A Space
Odyssey: the monolith buried on the moon, silently recording everything
until you dig it out.
Quickstart
curl -fsSL https://tma1.ai/install.sh | TMA1_ADAPTER=claude-code bash
The installer registers TMA1 as a background service and starts it. The
dashboard is at http://localhost:14318.
TMA1_ADAPTER accepts claude-code, codex, or all. See
Install for Windows and for installing without an adapter.
What it does
TMA1 does two things.
It feeds context to the agent. Before each turn the agent receives a
<tma1-context> block: what it has done this session, which files changed
under it, whether the build is broken, and any anomaly worth acting on.
Current anomaly rules provide advisory context and do not block the Stop
hook. Ten MCP tools answer further queries on demand, including
keyword search across every session recorded on the machine.
It reports to you. The dashboard covers token usage, cost, latency,
tool activity, conversation replay, anomaly history, prompt evaluation,
and SQL over the raw tables.
The Overview page combines activity across agents, recent sessions, and
recorded tool failures. Sessions supports side-by-side comparison of two
sessions: reported tokens, cache read share, tool failures, and compaction
events. Missing usage is shown as unavailable. Input tokens include cache;
output tokens include reasoning. Elapsed span includes idle time.
Prompts lists requests without keyword-based scores. On-demand model reviews
send the selected request and bounded conversation excerpts to the configured
provider. Suggestions include source quotes, an impact, and a concrete action,
separating request gaps from agent execution. The model can abstain when context
is missing. AI Insights summarizes a text-only sample, not task outcomes.
Cost estimates use API list prices checked on 2026-10-30, including cache
reads, cache writes by duration, and OpenAI Fast mode (service_tier
priority). Unknown models show no estimate. A request stays unpriced when its
service tier, its cache-write duration, or a price it needs is unavailable, or
when its prompt exceeds the short-context limit (272K tokens for OpenAI models,
200K for Claude Sonnet 4 and 4.5). Claude Code and Codex transcripts record the
tier and write duration from this version on; earlier transcript usage stays
unpriced. GenAI trace aggregates show the uncached standard-tier list-rate
equivalent. Estimates exclude subscription plans, regional premiums, batch and
flex pricing, and historical price changes.
Supported sources
| Source | How TMA1 reads it | What you get |
|---|
| Claude Code | OTel metrics/logs/traces, hooks, JSONL transcripts | Cost, tools, traces, sessions, anomalies, injected context |
| Codex | OTel logs/metrics, hooks, JSONL sessions | Cost, tools, sessions, anomalies, injected context |
| Copilot CLI | JSONL sessions from ~/.copilot/session-state/ | Sessions, tools, cost where available |
| OpenCode | Official v1 session export or idle-event plugin | Sessions, prompts, tools, normalized token usage |
| Any GenAI app | OTel traces using GenAI semantic conventions | Traces, latency, cost aggregation |
All data is stored locally under ~/.tma1/.
How it fits together
Agent -- OTLP/HTTP --+
-- /api/hooks +--> tma1-server (port 14318)
-- MCP stdio --+ |
v
GreptimeDB (port 14000)
|
v
Embedded dashboard