Create an Agent
Add a Session for Multi-Turn Chat
For interactive conversations with automatic compaction and retry, wrap the agent in aSession:
Run the Examples
To run the examples, first clone and build the repository:- CLI
- Next.js
- Nuxt
An interactive terminal agent with tool approval prompts and subagent display:
All examples require an
OPENAI_API_KEY. Create a .env file in the repo root:Next Steps
Agents
Learn about the Agent API, events, and configuration options.
Sessions
Add compaction, retry, and persistence for multi-turn conversations.
Tools
Explore built-in tools and learn to create custom ones.