一键导入
neatlogs-py-strands
Use when adding neatlogs observability to a Python project that uses Strands Agents (imports `strands`, builds a Strands `Agent`).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adding neatlogs observability to a Python project that uses Strands Agents (imports `strands`, builds a Strands `Agent`).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when adding neatlogs observability to a Python project that uses LangChain or LangGraph (imports `langchain*` / `langgraph`, builds chains, runnables, or a graph).
Use when adding neatlogs observability to a TypeScript/Node.js project that uses LangChain or LangGraph (depends on `@langchain/*` / `@langchain/langgraph`).
Use when adding neatlogs observability to a Python project that uses CrewAI (imports `crewai`, builds a Crew/Flow with agents and tasks).
Use when adding neatlogs observability to a Go project — Google Gemini (genai), Google ADK agents, or custom code. Covers Init, WrapGenAI, ADK passthrough, Trace, and Identify (sessions & end-users).
Use when adding neatlogs observability to a Python project that uses the Agno agent framework (imports `agno`, constructs Agno `Agent`s).
Use when adding neatlogs observability to a Python project that uses DSPy (imports `dspy`, defines `dspy.Module`s / signatures).
| name | neatlogs-py-strands |
| description | Use when adding neatlogs observability to a Python project that uses Strands Agents (imports `strands`, builds a Strands `Agent`). |
| compatibility | Neatlogs Wizard Agent |
| metadata | {"author":"neatlogs","version":"1.0","language":"python","framework":"strands"} |
This project uses Strands Agents (strands.Agent). Strands self-instruments via native OpenTelemetry, and neatlogs.strands_hooks(agent) enriches those native spans with input/output so they render fully.
neatlogs.init() registers the global tracer provider, so Strands' own OTel spans (invoke_agent, execute_tool, model chat calls) flow into neatlogs and the attribute mapper classifies them as AGENT / TOOL / LLM (with token usage).neatlogs.strands_hooks(agent) is REQUIRED to capture prompt/response content. Strands records I/O as OTel span events (gen_ai.user.message, gen_ai.choice, …), which neatlogs doesn't render from events. strands_hooks() installs a hook on Strands' telemetry that copies that content onto the span as input.value/output.value — so LLM/TOOL spans show their actual input/output, not just tokens. Without it you get spans + tokens but empty I/O.import neatlogs
neatlogs.init(api_key=os.getenv("NEATLOGS_API_KEY"), workflow_name="my-app")
from strands import Agent
agent = neatlogs.strands_hooks(Agent(model=model, tools=[...])) # enables I/O capture
agent("Hello")
strands_hooks() does NOT create its own spans (Strands' native tracing stays the source of truth) and is idempotent — the hook installs once globally. Combine with @neatlogs.span / neatlogs.trace / neatlogs.log for your own orchestration — the native Strands spans nest under your manual spans.
references/1-install.mdreferences/2-add-init.mdreferences/3-set-env.mdreferences/4-run-agent.mdreferences/5-spans-trace-log.mdreferences/6-flush-shutdown.mdneatlogs.init() MUST run BEFORE importing strands so the tracer provider is registered before Strands reads it. load_dotenv() runs before init().instrumentations=[...] for Strands — init() + Strands' native OTel is the capture path.agent = neatlogs.strands_hooks(agent) — REQUIRED for input/output content (not just tokens). It installs the I/O hook once (idempotent) and returns the same agent; it does NOT create extra spans.BedrockModel; ensure AWS creds + region are set.import neatlogs at module top level.references/5-spans-trace-log.mdreferences/span-kinds.mdreferences/sessions-and-end-users.md