Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.

Metadata

Release files for agentinsight 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentinsight 0.1.0a1
File Size Uploaded Provenance Actions
agentinsight-0.1.0a1.tar.gz 9.8 kB Without provenance Details for agentinsight-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentinsight 0.1.0a1
File Interpreter ABI Platform Actions
agentinsight-0.1.0a1-py3-none-any.whl Python 3 none any Details for agentinsight-0.1.0a1-py3-none-any.whl

Total release size: 21.6 kB

Release files / agentinsight-0.1.0a1.tar.gz

Download URL agentinsight-0.1.0a1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
799cc52bd44ebafa98ef1aa3a22f44d115b5d4a35034ba4b88f83f2b2abef109
BLAKE2b-256 checksum
How to use checksums
1c9d4d6d10f8efee8102ad3024a3be317e98b76e9d9bd1c93d7c34389368cd7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / agentinsight-0.1.0a1-py3-none-any.whl

Download URL agentinsight-0.1.0a1-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48914d61c4037bffd4393af9a0d1daa2f2861ac0eda249bd188398209b1c4a9d
BLAKE2b-256 checksum
How to use checksums
f24f4973adad9cbd79237162ac211a0a96e64d931ebe28bf021a0f9bfe7059cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for agentinsight 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page