Skip to main content

Zero code changes — wrap any Python agent

The fastest way to start. Wrap any Python agent with plog run and every framework is instrumented automatically:
pip install provenlog
plog run -- python my_agent.py
That’s it. ProvenLog detects installed frameworks (LangChain, CrewAI, Anthropic, OpenAI Agents, AG2, LangGraph), patches them, and writes hash-chained events to ~/.provenlog/events.db. No code changes required.

One-line import

If you prefer to instrument from within your code:
import provenlog.auto  # Add this line before framework imports

from langchain_core.chat_models import ChatOpenAI
# ... your agent code
Configure via environment variables:
VariableDefaultDescription
PROVENLOG_ENABLED1Set to 0 to disable
PROVENLOG_AGENT_IDautoAgent identifier
PROVENLOG_URLServer URL; omit for embedded mode
PROVENLOG_DB_PATH~/.provenlog/events.dbSQLite path

Python SDK — explicit setup

For full control over what gets logged:
from provenlog import ProvenLogClient

# Embedded mode — writes to local SQLite, no server needed
client = ProvenLogClient(agent_id="my-agent")

client.log_event(
    action_type="TOOL_CALL",
    action_name="search_database",
    action_input={"query": "revenue Q4"},
    action_status="success",
    action_output={"results": 42}
)

client.close()

TypeScript SDK

npm install provenlog
import { ProvenLogClient } from "provenlog";

const client = new ProvenLogClient("http://localhost:7600", {
  agentId: "my-agent",
});

client.logEvent({
  action_type: "TOOL_CALL",
  action_name: "fetch_data",
  action_status: "success",
});

await client.close();

Server mode with dashboard

Point any SDK at a running server for multi-agent aggregation and the web dashboard:
# Start the server
plog serve

# Open http://localhost:7600 for the dashboard
# Connect your Python SDK to the server
client = ProvenLogClient("http://localhost:7600", agent_id="my-agent")

Verify your audit trail

# View recent events
plog log --last 10

# Verify hash chain integrity
plog verify --agent-id my-agent

Next steps