> ## Documentation Index
> Fetch the complete documentation index at: https://docs.provenlog.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get up and running with ProvenLog in under 3 minutes

## 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:

```bash theme={null}
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:

```python theme={null}
import provenlog.auto  # Add this line before framework imports

from langchain_core.chat_models import ChatOpenAI
# ... your agent code
```

Configure via environment variables:

| Variable             | Default                  | Description                        |
| -------------------- | ------------------------ | ---------------------------------- |
| `PROVENLOG_ENABLED`  | `1`                      | Set to `0` to disable              |
| `PROVENLOG_AGENT_ID` | `auto`                   | Agent identifier                   |
| `PROVENLOG_URL`      | —                        | Server URL; omit for embedded mode |
| `PROVENLOG_DB_PATH`  | `~/.provenlog/events.db` | SQLite path                        |

## Python SDK — explicit setup

For full control over what gets logged:

```python theme={null}
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

```bash theme={null}
npm install provenlog
```

```typescript theme={null}
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:

```bash theme={null}
# Start the server
plog serve

# Open http://localhost:7600 for the dashboard
```

```python theme={null}
# Connect your Python SDK to the server
client = ProvenLogClient("http://localhost:7600", agent_id="my-agent")
```

## Verify your audit trail

```bash theme={null}
# View recent events
plog log --last 10

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

## Next steps

<CardGroup cols={2}>
  <Card title="Auto-Instrumentation" icon="wand-magic-sparkles" href="/integrations/auto-instrumentation">
    Deep dive into `plog run` and `import provenlog.auto`.
  </Card>

  <Card title="Framework Integrations" icon="puzzle-piece" href="/integrations/langchain">
    Per-framework setup for LangChain, CrewAI, and more.
  </Card>

  <Card title="Core Concepts" icon="book" href="/concepts/events">
    Understand events, hash chains, and Merkle trees.
  </Card>

  <Card title="Dashboard" icon="chart-line" href="/features/dashboard">
    Explore the built-in web dashboard.
  </Card>
</CardGroup>
