Skip to main content
Tell your coding agent “add Failproof AI Observability to this agent” and let it read your loop, work out where the instrumentation belongs, write it, and verify the events before it calls the job done. The Python SDK skill (agenteye-python-sdk) is an Agent Skill: a folder of instructions that a coding agent such as Claude Code or Codex loads on demand when a task matches it. It teaches the agent to use the Python SDK — it is not a library, and it changes nothing about how the SDK works.

Instrumentation is easy to write and easy to get quietly wrong

The SDK is small: thirteen event methods, all keyword-only. A coding agent can read the Python SDK reference and produce plausible instrumentation in a minute. The catch is that this SDK does not raise when you get it wrong, and wrong instrumentation looks exactly like right instrumentation until someone opens a dashboard and finds it empty. The mistakes that cost real time are all silences: None of these raise. None show up in tests. Every one is in the skill, stated as a contract with the check that catches it.

What it does, in order

The skill runs the same three steps a careful engineer would:
  1. Plan. It reads your agent loop and asks the two questions only you can answer: what counts as one run (your session_id), and who the distinguishable actors are (your agent_id). It gets those agreed before writing code, because changing them later splits your history and breaks the trends.
  2. Write. It binds identity once per run rather than threading it through every call site, and it picks a concurrency-safe shape — a detail that matters, because the obvious shortcut silently mixes two overlapping runs into one session.
  3. Verify. It runs your agent and reads the resulting event files, checking that agent_start is present, the environment is right, and one run produced one session.
That third step is the one people skip. The SDK writes events to local files, so a complete integration can be proven on a laptop with no server, no API key, and no network — which is exactly why the skill insists on doing it.

How it relates to the other skills

Three skills, one clean split: They hand off in that order: this skill gets events flowing, the evaluator scores them, the CLI reads them back. There is nothing to evaluate and nothing to read until your agent emits sessions, so if you are starting from scratch, start here.

Prerequisites

  1. Python 3.10+ and the agent codebase you want to instrument.
  2. The SDK. It is distributed to customers as a private wheel rather than from a public index — your onboarding covers how to get it and install it. The skill knows the install path and will ask you rather than guess if it cannot find it.
  3. Nothing else. No dashboard login, no API key, no network. The skill verifies against the event files the SDK writes, so it can finish and prove its work offline.

Where to get it

The skill lives in the public FailproofAI/skills collection:
Add -g to install it for every project instead of just the current one, and --copy if your environment does not follow symlinks. For Codex, pass -a codex.

Installing it by hand

Agent Skills are folders containing a SKILL.md plus references. If you would rather not use the installer:
  • Claude Code: copy the agenteye-python-sdk/ folder into ~/.claude/skills/ (every project) or <your-repo>/.claude/skills/ (that repo only). Claude Code discovers it automatically — check the /skills list, or just ask something that matches it.
  • Codex: Codex reads the same SKILL.md. The bundled agents/openai.yaml sets allow_implicit_invocation: true, so it is auto-selected when a task matches; otherwise invoke it as $agenteye-python-sdk.
Run your agent in the repository holding the code you want instrumented — the skill reads your agent loop before it proposes anything.

What a session looks like

The pattern to notice: it read the code before proposing, asked only the questions you can answer, reused an id you already had, chose the concurrency-safe shape because it saw a thread pool, and verified by reading the actual events rather than declaring success — then flagged the one place it knew would fail quietly.

What you can ask it

  • “Why isn’t my agent showing up on the dashboard?” → walks the ladder: are events being written, is agent_start there, is the environment right, is the collector reading the same place.
  • “Everything’s landing under dev.” → the environment was never set, or was reset by a later call.
  • “Add token tracking.” → finds your LLM wrapper and records model, stop reason, and usage.
  • “Instrument the sub-agents too.” → one session, distinct agent labels, nested under their parent.
  • “Write tests for the instrumentation.” → points the SDK at a temporary directory and asserts on the events it wrote.

What to watch for

Let it verify. The step that makes this skill worth using is the last one — running your agent and reading the events back. An agent that writes instrumentation and stops has done the easy half, and the half that fails silently is the other one. Agree the names before the code. session_id and agent_id are the axes every surface groups by. Renaming them later splits the history: old runs keep the old labels and your trends break. The skill will ask; the answer is worth a minute’s thought. If your agent proposes installing the SDK from a public index, the skill did not load. The SDK is distributed privately. That proposal is a reliable tell that your coding agent is guessing rather than following the skill — stop it there and check the skill is installed. Beyond that its blast radius is small: it writes code in your working directory and event files where you tell it. It reads nothing from your deployment and changes nothing about it.

Next steps

  • Python SDK: the complete event reference — every event type and field — behind what this skill automates.
  • Sessions: what your instrumentation produces once events land.
  • Evaluator Agent Skill: the next step once runs are landing — scoring them.
  • CLI Agent Skill: reading your telemetry back.