Skip to main content

Examples

All examples are in the examples/ directory. Each is self-contained and runnable.

Quick Start

Tool Usage

Chat & Streaming

PyRepl & Runtime

Full Agent

This is the reference implementation for building a production agent. See Harness Patterns for an architectural walkthrough.

Running Examples

Building Your Own

Start from one of these patterns:

One-shot Function

@llm_function — typed input/output, no state

Chat Agent

@llm_chat + tools — multi-turn with ReAct loop

Full Agent

PyRepl + SelfRef + FileToolset + TUI — production-grade