Skip to main content
Initial Setup: Obtain your API Key from the StateBase Dashboard.

Build in 3 Steps

1

Installation

Install the core SDK. It is lightweight, async-first, and engineering-focused.
pip install statebase
2

Initialize Persistence

Connect your agent to a persistent session. StateBase resolves ownership via your API Key.
from statebase import StateBase
sb = StateBase(api_key="sb_live_...")

session = sb.sessions.create(
    agent_id="production-agent-v1",
    initial_state={"status": "active"}
)
3

Observe & Remember

Fetch consolidated context (State + Memories) and log decisions.
# 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"
)

Reliability Dashboard

Monitor your agent’s state, memory, and decision traces in real-time on the StateBase Dashboard.