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

# Quickstart

> Ship with confidence in under 2 minutes.

<Info>
  **Initial Setup**: Obtain your API Key from the [StateBase Dashboard](https://app.statebase.org).
</Info>

## Build in 3 Steps

<Steps>
  <Step title="Installation">
    Install the core SDK. It is lightweight, async-first, and engineering-focused.

    ```bash theme={null}
    pip install statebase
    ```
  </Step>

  <Step title="Initialize Persistence">
    Connect your agent to a persistent session. StateBase resolves ownership via your API Key.

    ```python theme={null}
    from statebase import StateBase
    sb = StateBase(api_key="sb_live_...")

    session = sb.sessions.create(
        agent_id="production-agent-v1",
        initial_state={"status": "active"}
    )
    ```
  </Step>

  <Step title="Observe & Remember">
    Fetch consolidated context (State + Memories) and log decisions.

    ```python theme={null}
    # 1. Get context for prompt
    context = sb.sessions.get_context(session_id=session.id, query="User query")

    # 2. Log decision trace
    sb.sessions.add_turn(
        session_id=session.id,
        input="User query",
        output="Agent response"
    )
    ```
  </Step>
</Steps>

## Reliability Dashboard

Monitor your agent's state, memory, and decision traces in real-time on the [StateBase Dashboard](https://app.statebase.org/dashboard/sessions).
