#!/usr/bin/env python3
"""
Multi-model example - Use different models for different agents.

Some models are better at reasoning (good for planning),
while others excel at code generation.
"""

from agentchain import AgentChain

result = AgentChain() \
    .requirements("""
        Build a REST API with the following endpoints:
        - GET /items - List all items
        - POST /items - Create an item
        - GET /items/{id} - Get specific item
        - DELETE /items/{id} - Delete an item
        
        Use FastAPI and include proper error handling.
    """) \
    .model("llama3:8b") \
    .configure("planner", model="llama3:70b") \
    .configure("coder", model="deepseek-coder-v2:16b") \
    .output("./rest_api") \
    .verbose() \
    .run()

print(f"Success: {result.success}")
if result.output:
    print(f"Tasks completed: {result.output.get('progress', {}).get('completed', 0)}")
