Skip to main content

Starter Agent

The smallest complete agent that uses StateBase correctly: one session, turns logged, memory seeded, and a rollback path. Copy it, swap in your LLM, and you’re running.

Python


TypeScript


What This Gives You

  • Persistence — state survives restarts
  • Memory — facts seed into sb.memory for future sessions
  • Audit trail — every turn logged with reasoning
  • Rollback — sb.sessions.rollback(session_id=..., version=-1) to undo a bad turn

Next Steps