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="...",
)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
| Key | Install | Notes |
|---|---|---|
openai | pip install "neatlogs[openai]" | openai>=1.0.0. Also covers AzureOpenAI. |
azure_openai | pip install "neatlogs[azure-openai]" | openai>=1.0.0 |
azure_ai_inference | pip install "neatlogs[azure-ai-inference]" | Azure AI Inference SDK. Required when CrewAI dispatches to Azure. |
anthropic | pip install "neatlogs[anthropic]" | anthropic>=0.75.0 |
google_genai | pip install "neatlogs[google-genai]" | google-genai>=1.55.0. Construct the client after init(). |
google_generativeai | — | Legacy google.generativeai SDK. |
vertex_ai | pip install "neatlogs[vertex-ai]" | Vertex AI via the google-genai SDK in Vertex mode. |
vertexai | pip install "neatlogs[vertexai]" | google-cloud-aiplatform>=1.38.0 |
bedrock | pip install "neatlogs[bedrock]" | boto3>=1.42.11 |
litellm | pip install "neatlogs[litellm]" | litellm>=1.80.11 |
cohere | — | Cohere SDK. |
groq | pip install "neatlogs[groq]" | groq>=0.37.1 |
mistralai | pip 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. |
portkey | pip install "neatlogs[portkey]" | portkey-ai>=1.0.0 |
Agent frameworks
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.
| Key | Install | Notes |
|---|---|---|
crewai | pip 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_agents | pip install "neatlogs[openai-agents]" | openai-agents>=0.6.5 |
pydantic_ai | pip install "neatlogs[pydantic-ai]" | pydantic-ai>=0.7.5 |
dspy | pip install "neatlogs[dspy]" | dspy>=2.6.13 (OpenInference; silent no-op below this — use wrap() instead). |
agno | pip install "neatlogs[agno]" | agno>=2.3.13 |
google_adk | pip install "neatlogs[google-adk]" | google-adk>=1.14.1 |
strands | pip install "neatlogs[strands]" | strands-agents>=1.19.0 (also neatlogs.strands_hooks(agent)). |
autogen | pip install "neatlogs[autogen-agentchat]" | autogen-agentchat>=0.4.0 |
haystack | pip install "neatlogs[haystack]" | haystack-ai>=2.0.0 |
llamaindex | pip install "neatlogs[llama-index]" | llama-index>=0.14.10 |
smolagents | pip install "neatlogs[smolagents]" | smolagents>=1.0.0 |
hermes | pip install "neatlogs[hermes]" | hermes-agent>=0.15.1; Python 3.11+ (the extra installs nothing on 3.10). |
claude_agent_sdk | pip install neatlogs claude-agent-sdk | Also available as neatlogs.wrap(claude_agent_sdk). See the Claude Agent SDK integration. |
beeai | — | BeeAI framework. |
pipecat | — | Pipecat voice agents. |
promptflow | — | Microsoft Promptflow. |
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
| Key | Install | Notes |
|---|---|---|
chromadb | pip install "neatlogs[langchain]" (bundled) or chromadb | Auto-instrumented when installed. |
pinecone | — | Auto-instrumented when installed. |
qdrant | — | Auto-instrumented when installed. |
weaviate | — | Auto-instrumented when installed. |
milvus | pip 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. |
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
| Key | Install | Notes |
|---|---|---|
mcp | pip install "neatlogs[mcp]" | mcp>=1.0.0. Model Context Protocol tools. |
instructor | pip install "neatlogs[instructor]" | instructor>=1.0.0 |
guardrails | pip install "neatlogs[guardrails]" | guardrails-ai>=0.4.0 |
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.
