Skip to main content
This examples collection is growing. More use cases will be added regularly.

Basic Examples

Model Selection

Simple Question Answering

Data Analysis

Advanced Examples

Multi-Step Workflow

Parallel Processing

Streaming with filters

See the full list of event types in the Event Types Catalog.
Available event types
  • LLM_OUTPUT — LLM responses
  • LLM_PARTIAL — streaming tokens
  • WORKFLOW_COMPLETED — task finished
  • AGENT_THINKING — agent reasoning
  • AGENT_STARTED — agent begins work
  • AGENT_COMPLETED — agent finishes
  • PROGRESS — progress updates
  • ERROR_OCCURRED — errors
Common filters
  • Only final outputs: types=[EventType.LLM_OUTPUT, EventType.WORKFLOW_COMPLETED]
  • Real-time streaming: types=[EventType.LLM_PARTIAL, EventType.WORKFLOW_COMPLETED]
  • Monitor agents: types=[EventType.AGENT_STARTED, EventType.AGENT_COMPLETED]
  • Everything (no filter): types=None (or omit the parameter)

Task Control Examples

Pause and Resume Long-Running Tasks

Error Handling for Control Signals

Swarm Mode

Force Multi-Agent Execution

Human-in-the-Loop Review Examples

Interactive Review Workflow

Review with Optimistic Concurrency

Skills Examples

Browse and Inspect Skills

Schedule Management Examples

Create and Manage Scheduled Tasks

Direct Tool Execution

List, Inspect, and Execute Tools

Deterministic Agent Execution

Execute Agents and Send Swarm Follow-ups

OpenAI-Compatible Chat Completions

Non-Streaming and Streaming

Session Files and Memory

List and Download Workspace and Memory Files

Error Handling Examples

See the dedicated page for complete patterns and a full retry-logic example: Error Handling.

Next Steps

Async Usage

Async/await patterns

Error Handling

Handle errors properly