Examples
The Koog framework provides examples to help you understand how to implement AI agents for different use cases. These examples demonstrate key features and patterns that you can adapt for your own applications.
Browse the examples below and click on the links to view the source code on GitHub.
Example | Description |
---|---|
VaccumAgent | The notebook that showcases the implementation of a basic reflex agent using the Koog framework. It covers environment modeling and agent behavior for cleaning tasks. |
Calculator | The calculator agent that performs fundamental arithmetic operations using tools for addition, subtraction, multiplication, and division. |
Banking | The banking assistant with routing capabilities that can handle money transfers and transaction analysis through a sophisticated graph-based strategy. |
Guesser | The number guessing agent that uses tools to interact with the user. The agent implements a binary search strategy using tools to ask if a number is less than, greater than, or equal to the user target. |
MCP | Integration examples for the Model Context Protocol, featuring GoogleMapsMcpClient for geographic data and PlaywrightMcpClient for browser automation. |
Memory | The customer support agent that shows memory system usage. The agent tracks and utilizes user conversation preferences and issue history, device diagnostic information, and organization-specific product information and solutions. It uses encrypted local storage to securely persist information and demonstrates proper memory organization using subjects and scopes. |
Planner | The task planning system that builds execution trees with parallel and sequential execution nodes, dynamically constructing execution plans. |
SimpleAPI | Basic examples for chat agents and single-run agents that demonstrate simple API integrations. |
StructuredData | The example that demonstrates JSON-based structured data output with complex nested classes, polymorphism, and weather forecast examples. |
SubgraphWithTask | Project generation tools showcasing file and directory operations, including creation, deletion, and command execution. |
Tone | A text tone analysis agent that uses specialized tools to identify positive, negative, or neutral tones in input text. |