Python SDK + LangChain + LangGraph + prerun

AI agent audit logging. From pip install to first trace in under 2 minutes.

The SDK is Python-first: install lookover, add direct event capture or a framework listener, and start recording tool calls, model inferences, decisions, and human handoffs with compliance context attached.

Install

pip install lookover

Install

pip install "lookover[langgraph]"

Install

pip install "lookover[all]"
QuickstartPython SDK
from lookover_sdk import LookoverClient, AgentEvent, EventType

client = LookoverClient(
    api_key="lk_...",
    agent_id="support-agent",
    base_url="https://your-lookover-backend.run.app",
)

client.track(AgentEvent(
    event_type=EventType.TOOL_CALL,
    payload={"tool": "crm.lookup", "input": {"account_id": "acct_123"}},
    outcome="success",
))
client.flush()

Captured spans

Tool calls, model runs, decisions, and human approvals.

Scanner output

Findings, readiness score, controls, and evidence before rollout.

Integration Paths

Instrument the stack you already have.

The current SDK supports a direct client, LangChain callbacks, LangGraph listeners, and a prerun CLI for static governance scans.

Direct SDK

Drop in `LookoverClient`, send `AgentEvent` records, and flush to `/v1/events` when you need manual control.

Direct SDKPython SDK
from lookover_sdk import LookoverClient, AgentEvent, EventType

client = LookoverClient(
    api_key="lk_...",
    agent_id="support-agent",
    base_url="https://your-lookover-backend.run.app",
)

client.track(AgentEvent(
    event_type=EventType.TOOL_CALL,
    payload={"tool": "crm.lookup", "input": {"account_id": "acct_123"}},
    outcome="success",
))
client.flush()

LangChain callback

Capture chains, tools, LLM calls, and agent finishes with a callback handler that also accepts purpose and lawful-basis metadata.

LangChain callbackPython SDK
from lookover_sdk.langchain import LookoverCallbackHandler

handler = LookoverCallbackHandler(
    api_key="lk_...",
    agent_id="support-agent",
    purpose="customer support triage",
    lawful_basis="contract",
)

chain.invoke(payload, config={"callbacks": [handler]})

LangGraph listener

Wrap a graph invocation to emit per-node spans, structured tool-call output, and PII-aware traces for more complex workflows.

LangGraph listenerPython SDK
from lookover_sdk.langgraph import LookoverLangGraphListener

listener = LookoverLangGraphListener(
    api_key="lk_...",
    agent_id="support-graph",
    purpose="customer support triage",
    model_provider="googleai",
    model_version="gemini-2.5-flash",
)

result = listener.invoke(graph, {"messages": messages})

prerun scanner

Scan a project before rollout to surface missing governance fields, risky calls, prompt-injection text, and framework evidence.

prerun scannerPython SDK
prerun scan ./agent.py --strict
prerun run ./agents \
  --tenant-id acme \
  --system-id support-bot \
  --environment prod

What gets captured

  • TOOL_CALL for side effects, inputs, and outputs.
  • MODEL_INFERENCE for prompts, responses, token count, and duration.
  • DECISION for routing or control-flow decisions.
  • HUMAN_HANDOFF when a person approves or intervenes.
  • DECISION_COMPLETE to close the trace cleanly.

What makes the logs useful later

  • Purpose, lawful basis, and consent reference for attributable logging.
  • Agent version, model provider, and model version for rollout traceability.
  • Tool scope, disclosure, and data-transfer fields for governance review.
  • PII flags and output detection signals for sensitive workflows.
  • Retention class and structured payloads for downstream evidence handling.

Example coverage

The example set in lookover/sdk/python/examples spans the workflows most teams ask about first:

  • Single LLM chains and prompt templates.
  • Tool-calling agents with calculator, datetime, and utility tools.
  • RAG, memory, checkpointed graphs, and nested subgraphs.
  • Human-in-the-loop approval flows before tool execution.

Rollout Sequence

The 2-minute path is simple because the primitives already exist.

You are not wiring a new logging platform from scratch. You are choosing a supported integration surface, adding metadata, and running a scan before the rollout gets reviewed.

01

Install the package

Start with the base SDK or add the optional LangGraph and LangChain extras depending on your stack.

02

Wire one integration path

Choose direct events, a LangChain callback, or a LangGraph listener instead of building custom logging middleware.

03

Attach governance context

Add purpose, lawful basis, consent references, and version metadata while you instrument the agent.

04

Run prerun before rollout

Scan the codebase for gaps and publish a readiness snapshot before security or compliance reviews begin.

Start with the SDK docs if you are integrating now.

Book the review if you need governance help.

The architecture review covers governance fields, rollout sequencing, and mapping the trace model into a larger enterprise control plane.

GDPR Art. 30 · SOC2 Type II · EU AI Act · Tamper-proof logs