Catalog PyPI
PACKAGE EXPLORERView in registry

agentinsight

PyPI

Python observability SDK for agentic systems

Versions collected1
Direct dependencies4From release 0.1.0a1
Last observed20 Oct, 22:27 UTC

README

Version 0.1.0a1 documentation

AgentInsight Python SDK

Drop-in observability for agentic systems. The SDK records agent, LLM, tool, retrieval, orchestration, and custom spans, then exports them locally or to an AgentInsight backend.

Install

pip install agentinsight

For local development from this repository:

pip install -e sdk

Quick Start

import agentinsight
import openai

agentinsight.init(
    service_name="support-agent",
    exporter="cloud",
    endpoint="https://your-agentinsight-app.vercel.app",
    api_key="ai_...",
)

client = openai.OpenAI()
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)

OpenAI and Anthropic calls are automatically traced when those packages are installed. Use @observe and trace_context for custom agent logic.

Local Export

import agentinsight
from agentinsight import observe

agentinsight.init(exporter="local", local_path="agentinsight-spans.jsonl")

@observe(kind="agent")
def run_agent(task: str):
    return {"answer": task.upper()}

run_agent("triage this incident")

Manual Spans

from agentinsight import trace_context

with trace_context("plan_trip", kind="agent", attributes={"agent.name": "planner"}) as span:
    span.set_attribute("agent.step", "plan")

LangChain / LangGraph

from agentinsight.integrations.langchain import AgentInsightCallbackHandler

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

LangGraph uses LangChain callbacks, so the same handler works for many LangGraph apps.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.0a121 May 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:27 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b09469e9d6aa2283fe70ffd2455f7f67b5ff515ac3990b849f44954dabd861d0