Skip to main content
The StateBase SDK is designed to be injected into your existing agent loop. Here are the three most common ways to integrate.

1. The Wrapper (Easiest)

Wrap your entire LLM call in a helper function that automatically handles context and turn logging.
Use a decorator or middleware to intercept inputs and outputs. This keeps your core “Agent Brain” code clean of infrastructure logic.

3. The Callback (Enterprise)

For complex agents like LangGraph or CrewAI, use callbacks to sync state after every node execution. This provides granular “Replayability” for every internal step of the agent.