Examples / Agents
Agents
This chapter focuses on working with AI agents in Tactus - the core abstraction for interacting with language models.
Examples in This Chapter
Multi Model
Demonstrates using multiple models in a single workflow - a researcher using GPT-4o and a summarizer using GPT-4o-mini. This example shows:
- Defining multiple agents with different models
- Sequential agent execution (research then summarize)
- Template strings in initial messages (
{input.topic},{research}) - Passing results between agents
- Turn-limited loops for each agent phase
- Using the done tool to extract agent outputs
Has Specs · Requires API Keys
Streaming
Shows real-time streaming responses from an agent. This example demonstrates:
- Enabling streaming mode with
streaming = true - Processing token-by-token responses as they arrive
- Accumulating streamed content into a final result
- Using streaming for interactive or long-form generation
Has Specs · Requires API Keys
Bedrock
Demonstrates using AWS Bedrock as a provider with multiple Claude models. This example shows:
- Configuring the
bedrockprovider - Using different Claude models (Claude 3.5 Sonnet, Claude 3 Haiku, Claude 3 Opus)
- AWS credential configuration requirements
- Provider-specific model identifiers
- Multi-agent workflows across different Bedrock models
Has Specs · Requires API Keys
Want to contribute?
The examples repository is open source. Add your own examples or improve existing ones.