ai newsDo., 22. Okt.
EilmeldungAgility’s Digit 5 humanoid robot will run on Nvidia as it heads for Nasdaq

A Zero-Dependency Tracing CLI for AI Agents in Python

Zero-Dependency Tracing CLI for AI Agents in Python ( severn-trace ) If you've ever built an autonomous AI agent using LangChain, CrewAI, or AutoGen, you know the absolute chaos of debugging execution loops. Your agent calls a tool, the tool throws a malformed JSON payload, the loop breaks, and you

dev.toDonnerstag 12:41 · 22.10.2 Min. Lesezeit
Bild: dev.to

If you've ever built an autonomous AI agent using LangChain, CrewAI, or AutoGen, you know the absolute chaos of debugging execution loops.

Your agent calls a tool, the tool throws a malformed JSON payload, the loop breaks, and you're left staring at a wall of unstructured stack traces. If you try to fix this by installing heavy APM tools, you spend 20 minutes configuring API keys, setting up cloud endpoints, and wrestling with third-party dependency conflicts.

When you're building fast—especially during a hackathon—you don't need cloud dashboard bloat. You need instant, local feedback.

That’s why severn-trace, an ultra-lightweight, zero-dependency Python tracing runtime and interactive terminal CLI. Here is how it works and how it simplifies agent debugging.

Most monitoring tools force you to bring your own baggage: database connections, external collector middleware, or complex YAML configuration files.

severn-trace takes the opposite approach. It relies strictly on the Python standard library ( json, time, functools, os ). That means:

To start tracing any agent tool call or critical function, you don't need to rewrite your agent logic. You just import the trace decorator:

from severn import trace import random @trace def autonomous_search_agent ( query: str ): # Simulate an agent tool lookup if random. random () > 0.5: raise ConnectionError ( " API rate limit exceeded during tool execution. " ) return f " Successfully retrieved context for: { query } " if __name__ == " __main__ ": for i in range ( 3 ): try: autonomous_search_agent ( f " Query vector # { i } " ) except Exception as e: print ( f " Caught agent exception: { e } " ) Enter fullscreen mode Exit fullscreen mode Every single time that function runs, severn-trace automatically captures:

...and appends them straight to your local severn_traces.jsonl file.

Instead of making you dig through raw JSON log files, severn-trace comes with a built-in cyberpunk interactive terminal dashboard.

pipx install severn-trace Enter fullscreen mode Exit fullscreen mode You can run the global command from anywhere on your machine:

severn Enter fullscreen mode Exit fullscreen mode This launches an interactive menu where you can:

If you're tired of heavyweight monitoring tools slowing down your local development or hackathon builds, give severn-trace a spin.

Drop a star on GitHub if you find it helpful for your agent projects, and let me know how you're using it in your builds! ⚡

Quelle: dev.to (dev.to). Original öffnen