Skip to content

Latest commit

 

History

History
101 lines (81 loc) · 3.15 KB

File metadata and controls

101 lines (81 loc) · 3.15 KB

Examples

The framework includes several example applications demonstrating different features and use cases. Each example is designed to showcase specific capabilities and patterns.

Basic Examples

Tools Without Context (example)

make run-basics-tools-without-context-example

Shows how to create and use context-free tools with @tool_plain.

Tools With Context (example)

make run-basics-tools-with-context-example

Demonstrates tools that access typed context parameters using @tool.

Agent Switching (example)

make run-basics-agent-switching-example

Shows how to switch between specialized agents using ToolResult.switch_to.

Instruction Builder (example)

make run-basics-instruction-builder-example

Demonstrates creating dynamic instructions based on context parameters.

Tool Return Values (example)

make run-basics-tools-return-values-example

Shows different ways tools can return values and handle agent switches.

Chat Introduction (example)

make run-basics-chat-intro-example

Basic example of using LiteChat for conversations with message streaming and history management.

Structured Outputs

  1. Core (example)

    make run-basics-structured-outputs-core-example

    Shows how to use type-safe outputs with the Core API.

  2. Chat (example)

    make run-basics-structured-outputs-chat-example

    Demonstrates structured outputs in chat applications.

REPL with Swarm (example)

make run-basics-repl-with-swarm-example

Example of building an interactive REPL using the Core API.

Parallel Tool Calls (example)

make run-basics-parallel-tool-calls-example

Shows how to execute multiple tools concurrently.

Advanced Examples

Mobile Dev Team (example)

make run-advanced-mobile-dev-team-example

Example of specialized agents working together on mobile app development.

Agent Team (example)

make run-advanced-agent-team-example

Shows how to build a managed team of agents with task planning.

Structured Outputs (example)

make run-advanced-structured-outputs-example

Advanced patterns for handling structured outputs.

Chat App Server (example)

make run-advanced-chat-app-server-example

FastAPI server that streams JSON responses for real-time chat.

Chat App Client (example)

make run-advanced-chat-app-client-example

CLI client that connects to the chat server.

For more details about specific features, see Advanced Features.