Skip to content

Latest commit

 

History

History
147 lines (109 loc) · 5.16 KB

03-agents.org

File metadata and controls

147 lines (109 loc) · 5.16 KB

Multi-Agent Examples

Overview

Examples demonstrating different agent templates and model behaviors. Each agent has a specific role:

  • Memory Agent: Records and tracks tasks and context
  • Dialogue Agent: Manages interactive discussions
  • Reflection Agent: Analyzes and reviews progress
  • Summary Agent: Synthesizes decisions and actions

Memory Agent Examples

Basic Memory Agent (llama3.2)

Let’s start with our default model recording a new task.

llm -m llama3.2 -t memory-agent "New task discussed: Implement authentication system"

Claude Memory Agent

See how Claude formats memory entries and handles context.

llm -m "anthropic/claude-3-5-sonnet-20241022" -t memory-agent \
    "New task discussed: Implement authentication system"

CodeLlama Memory Agent

Compare CodeLlama’s structured approach to memory recording.

llm -m codellama -t memory-agent \
    "New task discussed: Implement authentication system"

DeepSeek Memory Agent

Examine DeepSeek’s memory organization style.

llm -m deepseek-r1 -t memory-agent \
    "New task discussed: Implement authentication system"

Dialogue Agent Examples

Basic Dialogue Agent (llama3.2)

Start a discussion about system implementation using our default model.

llm -m llama3.2 -t dialogue-agent \
    "Let's discuss the authentication system implementation approach"

Claude Dialogue Agent

Notice how Claude structures the conversation flow.

llm -m "anthropic/claude-3-5-sonnet-20241022" -t dialogue-agent \
    "Let's discuss the authentication system implementation approach"

CodeLlama Dialogue Agent

See CodeLlama’s technical focus in dialogue.

llm -m codellama -t dialogue-agent \
    "Let's discuss the authentication system implementation approach"

Reflection Agent Examples

Basic Reflection Agent (llama3.2)

Analyze a morning design session with our default model.

llm -m llama3.2 -t reflection-agent \
    "Morning session focused on auth system design choices"

DeepSeek Reflection Agent

Compare DeepSeek’s analytical approach.

llm -m deepseek-r1 -t reflection-agent \
    "Morning session focused on auth system design choices"

Claude Reflection Agent

Examine Claude’s structured reflection style.

llm -m "anthropic/claude-3-5-sonnet-20241022" -t reflection-agent \
    "Morning session focused on auth system design choices"

Summary Agent Examples

Basic Summary Agent (llama3.2)

Document Makefile patterns with our default model.

llm -m llama3.2 -t summary-agent \
    "Show key patterns in creating and maintaining Makefiles"

Claude Summary Agent

See how Claude structures action items and decisions.

llm -m "anthropic/claude-3-5-sonnet-20241022" -t summary-agent \
    "Document action items from our auth system design review"

Complete Workflow Example

This example demonstrates all agents working together on a single task. Note that we use llama3.2 for consistency in automated execution.

# Step 1: Memory agent records the task
llm -m llama3.2 -t memory-agent "New auth system design task" \
    > data/agents/workflow/1-memory.md

# Step 2: Dialogue agent discusses approach
llm -m llama3.2 -t dialogue-agent "Discuss auth system implementation strategy" \
    > data/agents/workflow/2-dialogue.md

# Step 3: Reflection agent analyzes session
llm -m llama3.2 -t reflection-agent "Review morning auth system design session" \
    > data/agents/workflow/3-reflection.md

# Step 4: Summary agent documents decisions
llm -m llama3.2 -t summary-agent "Summarize auth system design decisions and next steps" \
    > data/agents/workflow/4-summary.md

# Combine all outputs for complete view
cat data/agents/workflow/*.md

Implementation Notes

  • Basic examples use llama3.2 and are marked with :llm t for automated execution
  • Model comparison examples use :llm nil as they’re for manual exploration
  • All outputs are organized under data/agents/ in categorized subdirectories
  • The workflow example demonstrates practical agent collaboration
  • Each agent brings different strengths to the analysis process