Skip to content

davidondrej/linear-agents

Repository files navigation

Multi-Agent Task Breakdown Examples

Four different approaches to breaking down tasks into subtasks using AI agents.

Setup

  1. Create conda environment:
conda create -n testing python=3.12 -y
conda activate testing
  1. Install dependencies:
pip install uv
uv pip install openai
uv pip install python-dotenv
  1. Create .env file:
OPENROUTER_API_KEY=your_api_key_here

Files

01-unreliable.py - Parallel sub-agents. No shared context.

02-still-unreliable.py - Parallel sub-agents. Shared conversation log.

03-simple-and-reliable.py - Sequential sub-agents. Full shared context.

04-reliable-on-longer-tasks.py - Sequential sub-agents. Context compression between steps.

Usage

Run any file:

python 01-unreliable.py

Enter your task when prompted. The agent will break it into two subtasks and execute them.

Notes

All files use OpenRouter API with GPT-4o model. You need an OpenRouter API key to run these examples.

Essential Reading

These resources provide deeper insights into effective agent architectures:

  1. Don't Build Multi-Agents - Cognition AI
    Core principles of context engineering and why parallel agents often fail

  2. Building Effective Agents - Anthropic
    Best practices for building reliable agentic systems

  3. A Practical Guide to Building Agents - OpenAI
    Comprehensive guide with real-world implementation strategies

About

build agents that actually work.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages