Introduction
When your app talks to an AI model, a lot happens that you can't see: what prompt was actually sent, what the model replied, which tools it called, how long it took, and how much it cost. Neatlogs records all of that and shows it to you in a dashboard — so when something goes wrong (a weird answer, a slow response, a surprising bill) you can look at exactly what happened, step by step.
You add a few lines to your code once; from then on every AI call is captured automatically. It works with Python and TypeScript, and with the OpenAI, Anthropic, and Google models you're probably already using — no AI-framework experience required.
New here? Three words to know
You'll see these throughout the docs. They're simpler than they sound:
- Trace — the full record of one run of your app (e.g. answering one user's question). Think of it as one "story" from start to finish.
- Span — a single step inside that story: one call to an AI model, one tool/function call, one retrieval. A trace is made of spans nested inside each other.
- Instrument — the setup that tells Neatlogs what to record. Initialize once, then use the wrapper, handler, processor, hook, or plugin documented for your library.
That's the whole mental model: you instrument once, your app produces traces made of spans, and you read them in the dashboard.
This is all it takes
Initialize Neatlogs, then wrap the client you already use:
import os
import neatlogs
from openai import OpenAI
neatlogs.init(
api_key=os.environ["NEATLOGS_API_KEY"], # from your Neatlogs dashboard
workflow_name="my-agent", # any name for this app
)
client = neatlogs.wrap(OpenAI())Calls through client are now captured and sent to your dashboard.
Don't use OpenAI? Follow the integration page for your library. Some use neatlogs.wrap(...); LangChain/LangGraph use a callback handler; OpenAI Agents uses a processor; Strands uses hooks. TypeScript likewise uses explicit helpers rather than instrumentation keys. See Integrations.
Or let the wizard do it
You don't have to wire this up by hand. From your project root:
npx @neatlogs/wizardThe wizard detects your stack, installs the right SDK, and instruments your code for you — all you need is your API key. See Instrument with the Wizard, or Your First Trace for the manual walkthrough.
Why Neatlogs
Agent failures don't throw exceptions. They produce wrong outputs, miss tool calls, or hallucinate. Diagnosing them requires seeing what the model was given, what it decided, and what each step returned. That context lives in traces.
Neatlogs is built around traces as the primary debugging artifact. Every run is fully captured. Engineers can inspect raw span data; non-engineers can search, comment, and flag issues without needing to understand the underlying data model.
Get started
Instrument with the Wizard
One command to detect your stack and instrument it automatically.
Python SDK
Install Neatlogs and send your first trace from a Python app.
TypeScript SDK
Using Node.js? Instrument your TypeScript app with the neatlogs npm package.
Explore the Dashboard
See what Neatlogs shows you once traces are coming in.
Integrations
Trace OpenAI, Anthropic, CrewAI, LangChain, Claude Code, Codex, and more — with Python + TS examples.
Import Traces
Bring traces from Langfuse, LangSmith, Braintrust, Raindrop, Phoenix, or Laminar into Neatlogs.
How to use these docs
The docs are organized into these sections:
Quickstart: start here if you're new — what Neatlogs is, the core ideas, and the wizard that instruments your project automatically.
Features: everything the Neatlogs dashboard gives you and how to use it — traces, detections, analytics, Fixes, evals, and more.
Integrations: every provider, agent framework, and agent SDK Neatlogs supports — OpenAI, Anthropic, Bedrock, Vertex, LangChain, CrewAI, Mastra, and more — plus hooks for Claude Code and Codex, opencode, Agent Skills, and the MCP server. Each page shows Python + TypeScript where both exist.
Python SDK: the core Python SDK — quickstart, instrumenting your own code with @span/trace(), prompt templates, and reference.
TypeScript SDK: the same for Node.js apps — quickstart, span()/trace(), prompt templates, and reference.
Guides: end-to-end examples for common agent patterns and use cases.
Reference: cross-language concepts — span kinds, sessions, tags, workflow names, and PII redaction.
