Prerequisites
Requirements
- Python 3.9 or higher
- pip (or any Python package manager)
- A LangGraph pipeline (or any Python callable to test with)
Installation
bash
pip install argus-agentsThat's it. No extra dependencies, no config files needed to start. ARGUS ships with sensible defaults that work out of the box.
Setup — Pick Whichever Fits Your Code
Option A — Pass graph to constructor (recommended)
python
from argus import ArgusWatcher
watcher = ArgusWatcher(graph) # attaches monitoring automatically
app = graph.compile()
result = app.invoke(initial_state) # run auto-saves when the last node finishes
print(watcher.run_id) # access the run ID directlyOption B — Separate watch call
python
from argus import ArgusWatcher
watcher = ArgusWatcher()
watcher.watch(graph) # before graph.compile()
app = graph.compile()
result = app.invoke(initial_state)Option C — After compile
python
from argus import ArgusWatcher
watcher = ArgusWatcher()
app = graph.compile(checkpointer=memory)
app = watcher.watch_compiled(app) # works on already-compiled graphs
result = app.invoke(initial_state)All three work. No changes to your node functions.
When is finalize() needed?
Runs are saved automatically for linear and fan-out/fan-in graphs. Only cyclic graphs (with back-edges) need a manual
watcher.finalize() call.Full Example
Here's a complete example — a simple LangGraph pipeline with ARGUS instrumentation:
pythonexample.py
1from argus import ArgusWatcher
2from langgraph.graph import StateGraph
3
4# 1. Create the watcher with graph (recommended)
5watcher = ArgusWatcher(graph)
6
7# 2. Define your graph (your existing code)
8graph = StateGraph(AgentState)
9graph.add_node("agent", call_model)
10graph.add_node("tools", tool_node)
11# ... add edges ...
12
13# 3. Compile and run
14app = graph.compile()
15result = app.invoke(initial_state)
16
17# Run auto-saves for linear/fan-out graphs
18# For cyclic graphs, call watcher.finalize()View Results
After your run completes, you can view results in several ways:
bash
# List all runs
argus list
# View the most recent run
argus show last
# View a specific run by ID (or 8-char prefix)
argus show run abc12345
# Launch the web dashboard
argus uiVideo coming soon
Running argus show and viewing results in the terminal
Next Steps
- Core Concepts — understand Watchers, Detectors, Traces, and Forensics
- Configuration — customize detection sensitivity, enable semantic judging, configure storage
- CLI Reference — all available commands and flags
