TraceAgent
Local-first observability for AI agents. Open-source alternative to LangSmith. Trace LangChain, LangGraph, and any Python code with zero config.
Install
pip install traceagent
Quick Start
Option 1: Environment Variables (zero code changes, like LangSmith)
export TraceAgent_ENABLED=true
export TraceAgent_ENDPOINT=http://localhost:6832 # your TraceAgent server
import traceagent # auto-traces all LangChain/LangGraph calls
result = graph.invoke({"messages": [HumanMessage(content="Hello!")]})
# traces appear at http://localhost:6832
Option 2: Explicit Callback
from traceagent import TraceAgent
lens = TraceAgent(server_url="http://localhost:6832")
result = graph.invoke(
{"messages": [HumanMessage(content="Hello!")]},
config={"callbacks": [lens.callback()]}
)
Option 3: Decorators & Context Managers
from traceagent import TraceAgent
lens = TraceAgent()
@lens.observe(name="search", kind="tool")
def search(query: str):
return results
with lens.trace("My Pipeline") as t:
result = search("hello")
t.outputs = {"result": result}
Configuration
| Env Variable | Description | Default |
|---|---|---|
TraceAgent_ENABLED |
Enable tracing | false |
TraceAgent_ENDPOINT |
Server URL | http://localhost:6832 |
TraceAgent_PROJECT |
Project name | default |
TraceAgent_TAGS |
Comma-separated tags | |
TraceAgent_AUTO_TRACE |
Auto-attach to LangChain | true when enabled |
Server
The SDK sends traces to a TraceAgent server. Run it with Docker:
docker run -d -p 6832:6832 ashishgituser/TraceAgent-server:latest
Then open http://localhost:6832 for the dashboard.
See the full project at github.com/ashishgituser/TraceAgent.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
traceagent-0.1.1.tar.gz
(12.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file traceagent-0.1.1.tar.gz.
File metadata
- Download URL: traceagent-0.1.1.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d741208ae4c23e5639bb0963a6edee13359e0a77f29a3a46f08de037541b8263
|
|
| MD5 |
c0aa245f4a588a88925c34c60aea9543
|
|
| BLAKE2b-256 |
9b52dac11e70e9f1e1528a862332c1076ce9ee1890477ab83c7dc0ee8547eb84
|
File details
Details for the file traceagent-0.1.1-py3-none-any.whl.
File metadata
- Download URL: traceagent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0804bee92e36d14a86b8d91c5353a0c0e9c2696b948c9921f3268331bd2d814e
|
|
| MD5 |
e6b7e6ebd3f008755c6417ff05902105
|
|
| BLAKE2b-256 |
e09d0e6f95d13495cefc90103cfb33d4b2353ffa57a0e6a86db6fe1739414da3
|