Python Auto-Instrumentation

Documented Python instrumentation keys, install commands, and version requirements.

This page describes Python auto-instrumentation in the latest published stable neatlogs release on Python 3.10–3.14. On Python 3.14, neatlogs does not install the OpenInference adapters for CrewAI and Instructor. TypeScript does not accept instrumentation keys; use its explicit integration table. Go currently provides explicit helpers and the Gemini wrapper.

Pass a documented Python key to instrumentations in neatlogs.init(). Install the matching extra first (or the library itself — the extra pins a compatibility baseline).

neatlogs.init(
    instrumentations=["openai", "chromadb"],
    api_key="...",
)
Note

Many of these libraries also work with neatlogs.wrap(client) instead of an instrumentations key — wrap() has no import-order rule. See the Python SDK and per-library Integrations for runnable examples.

LLM providers

KeyInstallNotes
openaipip install "neatlogs[openai]"openai>=1.0.0. Also covers AzureOpenAI.
azure_openaipip install "neatlogs[azure-openai]"openai>=1.0.0
azure_ai_inferencepip install "neatlogs[azure-ai-inference]"Azure AI Inference SDK. Required when CrewAI dispatches to Azure.
anthropicpip install "neatlogs[anthropic]"anthropic>=0.75.0
google_genaipip install "neatlogs[google-genai]"google-genai>=1.55.0. Construct the client after init().
google_generativeai—Legacy google.generativeai SDK.
vertex_aipip install "neatlogs[vertex-ai]"Vertex AI via the google-genai SDK in Vertex mode.
vertexaipip install "neatlogs[vertexai]"google-cloud-aiplatform>=1.38.0
bedrockpip install "neatlogs[bedrock]"boto3>=1.42.11
litellmpip install "neatlogs[litellm]"litellm>=1.80.11
cohere—Cohere SDK.
groqpip install "neatlogs[groq]"groq>=0.37.1
mistralaipip install "neatlogs[mistralai]"mistralai>=1.0.0
together—Together AI.
ollama—Local Ollama models.
replicate—Replicate.
openrouter—OpenRouter (also via neatlogs.wrap).
huggingface_hub—Hugging Face Hub inference.
alephalpha—Aleph Alpha.
watsonx—IBM watsonx.
sagemaker—AWS SageMaker.
portkeypip install "neatlogs[portkey]"portkey-ai>=1.0.0

Agent frameworks

Warning

LangChain / LangGraph are not in this table on purpose. instrumentations=["langchain"] has no self-rooting and is not offered — use neatlogs.langchain_handler() instead. Install with pip install "neatlogs[langchain]" (the package extra name is unrelated to the removed instrumentations key). See LangChain.

KeyInstallNotes
crewaipip install "neatlogs[crewai]" (or pip install neatlogs crewai)Class-level hooks cover crew/agents/tasks/tools/LLM on crewai 0.130.x–1.15.x, so a bare crew traces fully. Add neatlogs.wrap(...) for workflow metadata, or for a Flow / standalone Agent.
openai_agentspip install "neatlogs[openai-agents]"openai-agents>=0.6.5
pydantic_aipip install "neatlogs[pydantic-ai]"pydantic-ai>=0.7.5
dspypip install "neatlogs[dspy]"dspy>=2.6.13 (OpenInference; silent no-op below this — use wrap() instead).
agnopip install "neatlogs[agno]"agno>=2.3.13
google_adkpip install "neatlogs[google-adk]"google-adk>=1.14.1
strandspip install "neatlogs[strands]"strands-agents>=1.19.0 (also neatlogs.strands_hooks(agent)).
autogenpip install "neatlogs[autogen-agentchat]"autogen-agentchat>=0.4.0
haystackpip install "neatlogs[haystack]"haystack-ai>=2.0.0
llamaindexpip install "neatlogs[llama-index]"llama-index>=0.14.10
smolagentspip install "neatlogs[smolagents]"smolagents>=1.0.0
hermespip install "neatlogs[hermes]"hermes-agent>=0.15.1; Python 3.11+ (the extra installs nothing on 3.10).
claude_agent_sdkpip install neatlogs claude-agent-sdkAlso available as neatlogs.wrap(claude_agent_sdk). See the Claude Agent SDK integration.
beeai—BeeAI framework.
pipecat—Pipecat voice agents.
promptflow—Microsoft Promptflow.
Note

CrewAI: instrumentations=["crewai"] is a valid zero-touch path for a bare Crew and does not need a provider key. Prefer neatlogs.wrap(crew) when you want workflow metadata; wrap() is required for a Flow or standalone Agent. Do not combine CrewAI with a provider instrumentation key—the CrewAI hook already patches LLM.call. See the CrewAI integration.

Vector databases

KeyInstallNotes
chromadbpip install "neatlogs[langchain]" (bundled) or chromadbAuto-instrumented when installed.
pinecone—Auto-instrumented when installed.
qdrant—Auto-instrumented when installed.
weaviate—Auto-instrumented when installed.
milvuspip install "neatlogs[milvus]"pymilvus>=2.4.0,<2.5.0
elasticsearch—Auto-instrumented when installed.
redis—Auto-instrumented when installed (vector search).
marqo—Auto-instrumented when installed.
Note

If you use LangChain retrievers wrapping these (common for RAG), the langchain_handler() callback already captures the retrieval spans — a dedicated vector-DB key is only needed when you call the DB client directly.

Other

KeyInstallNotes
mcppip install "neatlogs[mcp]"mcp>=1.0.0. Model Context Protocol tools.
instructorpip install "neatlogs[instructor]"instructor>=1.0.0
guardrailspip install "neatlogs[guardrails]"guardrails-ai>=0.4.0
Warning

A library version below its instrumentor's minimum may silently emit no spans (notably dspy < 2.6.13). If a provider isn't traced, check the version, confirm the key is in instrumentations=[], and ensure init() runs before the import. See Python SDK → Auto-instrumentation.

On this page

neatlogs
neatlogs

Ask neatlogs AI

Answers grounded in the docs

neatlogs

How can I help?

Ask anything about Incidents, Experiments, tracing, or the neatlogs dashboard.