This article is published in English.
Practical notes: Building Autonomous AI Agents Locally: A Step-by-Step Guide
Operable walkthrough of Practical notes: Building Autonomous AI Agents Locally: A Step-by-Step Guide: contracts, checks, and drop-in code slots for teams shipping this pattern.
The following notes reconstruct a practical path around “Building Autonomous AI Agents Locally: A Step-by-Step Guide for 16GB RAM Systems”. Emphasis stays on contracts, checks, and drop-in code placeholders rather than motivational framing.
The Promise and the Pain
When working through the The Promise and the stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Keep configuration outside application code. Environment files, secret stores, and feature flags belong in one place operators can audit without reading the whole graph. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node.
Part 1: Choosing Your Weapon — The Model Selection Dilemma — Evaluating Local Models for Token Generation and Agentic Efficiency
When working through the Part 1 Choosing Your stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish. Cache stable system instructions and tool schemas. Re-sending identical preamble is a common source of burn.
The Contenders: A Head-to-Head Comparison
When working through the The Contenders A Head-to-Head stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node.
Qwen3.5:4b — The Speed Demon
When working through the Qwen3 5 4b The stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node.
Llama3.1:latest (8B) — The Reliable Generalist
When working through the Llama3 1 latest 8B stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node. When working through the Llama3 1 latest 8B stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish.
Gemma4:12b-it-q4_K_M — The Reasoning Powerhouse
The Gemma4 12b-it-q4KM The Reasoning stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Budget tokens per turn and per session. Agentic tools expand context aggressively; hard caps keep demos from becoming surprise invoices.
Qwen3.5:9b-q4_K_M — The Goldilocks Choice
The Qwen3 5 9b-q4KM The stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
Comparative Model Analysis
The Comparative Model Analysis stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Budget tokens per turn and per session. Agentic tools expand context aggressively; hard caps keep demos from becoming surprise invoices.
The Verdict
The The Verdict stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Keep configuration outside application code. Environment files, secret stores, and feature flags belong in one place operators can audit without reading the whole graph. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
Part 2: Hardware Preparation and Local Inference Setup
The Part 2 Hardware Preparation stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
Step 1: Install Ollama — Your Local Inference Engine
The Step 1 Install Ollama stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Pin the interpreter and dependency lockfile before teaching the loop. Drift between laptop and CI is the most common silent break for API demos.
Linux Installation
The Linux Installation stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
curl -fsSL https://ollama.com/install.sh | sh
macOS Installation
The macOS Installation stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts. The macOS Installation stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish.
curl -fsSL https://ollama.com/install.sh | sh
Windows Installation
For the Windows Installation stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Put human approval on edges that spend money or change production data. Compile-time wiring does not equal business completeness.
irm https://ollama.com/install.ps1 | iex
Verify Installation
For the Verify Installation stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Put human approval on edges that spend money or change production data. Compile-time wiring does not equal business completeness.
ollama --version
ollama version is 0.5.x
Step 2: Pull Your Model
For the Step 2 Pull Your stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Prefer structured outputs with schema validation over free-form prose when the next step is code or a tool call. For the Step 2 Pull Your stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish.
# For the winner
ollama pull qwen3.5:9b-q4_K_M
# For speed
ollama pull qwen3.5:4b
# For reasoning
ollama pull gemma4:e4b-q4_K_M
Step 3: Start the Ollama Server
When working through the Step 3 Start the stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Log request id, model id, and latency on every call. Without that trail, intermittent provider errors look like application bugs.
ollama serve
Step 4: Test Your Model
When working through the Step 4 Test Your stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Cache stable system instructions and tool schemas. Re-sending identical preamble is a common source of burn.
ollama run qwen3.5:9b-q4_K_M "Hello, introduce yourself briefly."
Part 3: Setting Up CrewAI — The Orchestration Framework
When working through the Part 3 Setting Up stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node. When working through the Part 3 Setting Up stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish.
System Requirements
The System Requirements stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
Step 1: Install uv (The Modern Python Package Installer)
The Step 1 Install uv stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Pin the interpreter and dependency lockfile before teaching the loop. Drift between laptop and CI is the most common silent break for API demos.
curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
Step 2: Install CrewAI CLI
The Step 2 Install CrewAI stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
uv tool install crewai
Step 3: Create Your Crew Project
The Step 3 Create Your stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Keep configuration outside application code. Environment files, secret stores, and feature flags belong in one place operators can audit without reading the whole graph. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
crewai create crew my_agent_team
cd my_agent_team
my_agent_team/
├── src/
│ └── my_agent_team/
│ ├── __init__.py
│ ├── crew.py
│ ├── agents.py
│ ├── tasks.py
│ └── main.py
├── .env
└── pyproject.toml
Step 4: Install Dependencies
The Step 4 Install Dependencies stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
uv pip install -e .
Step 5: Install Additional Tools
The Step 5 Install Additional stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Expose tools with narrow schemas and explicit side-effect labels. Hosts need to know which calls mutate state before they auto-approve.
uv pip install crewai-tools langchain-ollama python-pptx
Part 4: Building Your Agent Team
The Part 4 Building Your stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts.
The Architecture
The The Architecture stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Keep graph state flat and typed. Nested blobs hide which node wrote which field and break resume after interrupts. The The Architecture stage works best when treated as a measurable surface. Capture one golden transcript, one failure case, and the rollback note before expanding scope. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish.
Step 1: Configure the LLM
For the Step 1 Configure the stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Prefer structured outputs with schema validation over free-form prose when the next step is code or a tool call.
from langchain_ollama import OllamaLLM
def get_llm():
""" Initialize the local LLM for CrewAI."""
return OllamaLLM(
model="qwen3.5:9b-q4_K_M",
base_url="http://localhost:11434",
temperature=0.3, # Lower = more deterministic
top_p=0.9,
)
Step 2: Define Your Agents
For the Step 2 Define Your stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Put human approval on edges that spend money or change production data. Compile-time wiring does not equal business completeness.
from crewai import Agent
from crewai_tools import SerperDevTool, FileReadTool
from .llm_config import get_llm
# Initialize tools
search_tool = SerperDevTool() # Requires Serper API key (free tier available)
file_tool = FileReadTool()
def create_coding_agent():
"""Agent specialized in writing and reviewing code."""
return Agent(
role="Senior Software Engineer",
goal="Write clean, efficient, and well-documented code that solves the given problem",
backstory="""You are a senior software engineer with 15 years of experience
across multiple programming languages. You specialize in Python, JavaScript,
and system architecture. You write code that is not only functional but
also maintainable and follows best practices.""",
tools=[file_tool], # Can read existing files
llm=get_llm(),
verbose=True,
allow_delegation=False,
)
def create_research_agent():
"""Agent specialized in deep research and report writing."""
return Agent(
role="Lead Research Analyst",
goal="Conduct thorough research and synthesize findings into comprehensive reports",
backstory="""You are a seasoned research analyst with a PhD in Computer Science.
You have expertise in finding, verifying, and synthesizing information from
multiple sources. Your reports are known for their depth, clarity, and
actionable insights.""",
tools=[search_tool], # Can search the web
llm=get_llm(),
verbose=True,
allow_delegation=False,
)
def create_presentation_agent():
"""Agent specialized in creating PowerPoint presentations."""
return Agent(
role="Senior Presentation Designer",
goal="Transform research findings into compelling, visually-appealing PowerPoint presentations",
backstory="""You are a presentation designer with 10 years of experience
creating executive-level decks for Fortune 500 companies. You know how to
structure information for maximum impact and create slides that tell a
compelling story.""",
tools=[], # We'll handle PPT generation separately
llm=get_llm(),
verbose=True,
allow_delegation=False,
)
Step 3: Define Your Tasks
For the Step 3 Define Your stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Record timings and token or query cost next to functional results. Cost visibility early prevents surprise bills when the path moves from demo to shared environments. Put human approval on edges that spend money or change production data. Compile-time wiring does not equal business completeness. For the Step 3 Define Your stage, define the inputs, the owner of the step, and the exit criteria before changing code. Operators should be able to re-run the step from a known checkpoint without guessing hidden state. Document the happy path and the recovery path together. Retries, human gates, and dead-letter handling are part of the product, not later polish.
from crewai import Task
def create_coding_task(topic, requirements):
"""Task for the coding agent."""
return Task(
description=f"""
Write a Python solution for the following problem:
Topic: {topic}
Requirements: {requirements}
Your response should include:
1. Complete, working Python code
2. Explanation of the approach
3. Time and space complexity analysis
4. Example usage
Make sure the code is production-ready and includes error handling.
""",
expected_output="A complete Python solution with documentation and analysis.",
agent=None, # Will be assigned later
)
def create_research_task(query):
"""Task for the research agent."""
return Task(
description=f"""
Conduct in-depth research on the following topic:
Query: {query}
Your research should cover:
1. Current state of the art
2. Key players and technologies
3. Challenges and limitations
4. Future trends and predictions
5. Actionable recommendations
Cite your sources and provide a well-structured report.
""",
expected_output="A comprehensive research report with citations.",
agent=None, # Will be assigned later
)
def create_presentation_task(research_findings):
"""Task for the presentation agent."""
return Task(
description=f"""
Create a PowerPoint presentation based on the following research:
{research_findings}
The presentation should include:
1. Title slide with a compelling title
2. Executive summary
3. Key findings (3-5 slides)
4. Visual data representation
5. Recommendations
6. Conclusion and next steps
Provide a detailed outline and slide content.
""",
expected_output="A detailed PowerPoint presentation outline with slide content.",
agent=None, # Will be assigned later
)
Step 4: Orchestrate the Crew
When working through the Step 4 Orchestrate the stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Prefer small, testable units over sprawling scripts. When a step fails, the failure should point at a single responsibility rather than a tangled pipeline. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node.
from crewai import Crew, Process
from .agents import (
create_coding_agent,
create_research_agent,
create_presentation_agent
)
from .tasks import (
create_coding_task,
create_research_task,
create_presentation_task
)
def create_crew(topic, query, requirements):
"""Create and configure the multi-agent crew."""
# Initialize agents
coding_agent = create_coding_agent()
research_agent = create_research_agent()
presentation_agent = create_presentation_agent()
# Create tasks
coding_task = create_coding_task(topic, requirements)
research_task = create_research_task(query)
# Assign agents to tasks
coding_task.agent = coding_agent
research_task.agent = research_agent
# The presentation task depends on research findings
# We'll create it dynamically after research is complete
return Crew(
agents=[coding_agent, research_agent, presentation_agent],
tasks=[coding_task, research_task],
process=Process.sequential, # Tasks run in order
verbose=True,
)
def run_crew(topic, query, requirements):
"""Run the multi-agent crew and return results."""
crew = create_crew(topic, query, requirements)
result = crew.kickoff()
return result
Step 5: The Main Entry Point
When working through the Step 5 The Main stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest. Treat this stage as a contract between inputs and validated outputs. Name the artifacts, define success checks, and refuse silent partial completion. Checkpoint after expensive steps. Resume should not re-bill the same LLM call when an operator retries a later node.
import os
from .crew import run_crew
def main():
"""Main entry point for the multi-agent system."""
# Define your project
topic = "Building a REST API with FastAPI"
query = "Best practices for FastAPI REST API development in 2026"
requirements = """
- Python 3.11+
- FastAPI framework
- PostgreSQL database
- JWT authentication
- Docker deployment
"""
print("🚀 Starting multi-agent workflow...")
print("=" * 50)
# Run the crew
result = run_crew(topic, query, requirements)
print("\n✅ Workflow complete!")
print("=" * 50)
print("\n📊 Results:")
print(result)
return result
if __name__ == "__main__":
main()
Part 5: Automated PowerPoint Generation
When working through the Part 5 Automated PowerPoint stage, write down the contract first: required inputs, success signal, and what happens on partial failure. That checklist keeps later code changes honest.
Step 1: Create the PPT Generator
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN
from pptx.dml.color import RGBColor
import os
def create_presentation_from_content(content, filename="presentation.pptx"):
"""
Generate a PowerPoint presentation from structured content.
Args:
content: Dictionary with slide titles and content
filename: Output filename
"""
prs = Presentation()
# Set slide dimensions (16:9)
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
# Title Slide
title_slide_layout = prs.slide_layouts[0]
slide = prs.slides.add_slide(title_slide_layout)
slide.shapes.title.text = content.get("title", "AI-Generated Presentation")
slide.placeholders[1].text = content.get("subtitle", "Powered by CrewAI + Ollama")
# Content Slides
for slide_data in content.get("slides", []):
bullet_slide_layout = prs.slide_layouts[1]
slide = prs.slides.add_slide(bullet_slide_layout)
# Title
slide.shapes.title.text = slide_data.get("title", "Untitled")
# Content
content_text = slide.placeholders[1]
content_frame = content_text.text_frame
content_frame.clear()
for point in slide_data.get("points", []):
p = content_frame.add_paragraph()
p.text = point
p.level = 0
p.font.size = Pt(18)
# Save
prs.save(filename)
print(f"✅ Presentation saved as: {filename}")
return filename
def generate_ppt_from_research(research_text, topic):
"""
Generate a PPT from research findings using the presentation agent.
"""
from .agents import create_presentation_agent
from .llm_config import get_llm
# Have the presentation agent structure the content
agent = create_presentation_agent()
prompt = f"""
Based on the following research about "{topic}", create a structured
presentation outline with 6-8 slides.
Research:
{research_text[:2000]} # Limit to avoid context overflow
Return a JSON object with the following structure:
{{
"title": "Presentation title",
"subtitle": "Subtitle or tagline",
"slides": [
{{
"title": "Slide title",
"points": ["Point 1", "Point 2", "Point 3"]
}}
]
}}
"""
# Get structured output from the agent
response = agent.llm.invoke(prompt)
# Parse the response (simplified - in production, use proper JSON parsing)
import json
try:
# Extract JSON from response
content = json.loads(response)
except:
# Fallback: create a simple structure
content = {
"title": f"Research on {topic}",
"subtitle": "AI-Generated Presentation",
"slides": [
{"title": "Introduction", "points": ["Overview of research"]},
{"title": "Key Findings", "points": ["Finding 1", "Finding 2"]},
{"title": "Recommendations", "points": ["Recommendation 1"]}
]
}
# Generate the PPT
filename = f"{topic.replace(' ', '_')}_presentation.pptx"
return create_presentation_from_content(content, filename)
Step 2: Integrate PPT Generation into the Crew
from .ppt_generator import generate_ppt_from_research
def run_full_workflow(topic, query, requirements):
"""Run the complete workflow including PPT generation."""
# Step 1: Run the crew (coding + research)
crew_result = run_crew(topic, query, requirements)
# Step 2: Extract research findings (simplified - in production, parse properly)
research_findings = crew_result # This would be the research agent's output
# Step 3: Generate PowerPoint
ppt_file = generate_ppt_from_research(research_findings, topic)
return {
"crew_result": crew_result,
"presentation_file": ppt_file
}
Part 6: Common Pitfalls and How to Fix Them
Problem 1: “Connection refused” when CrewAI tries to reach Ollama
litellm.APIConnectionError: OllamaException - [Errno 111] Connection refused
llm = OllamaLLM(
model="qwen3.5:9b-q4_K_M",
base_url="http://localhost:11434", # Ensure this is correct
)
Problem 2: Model fails to follow tool-calling schemas
Problem 3: Out of Memory (OOM) errors
Problem 4: Agent gets stuck in recursive loops
Problem 5: Slow token generation
Part 7: Running Your First Multi-Agent Workflow
The Complete Setup
#!/usr/bin/env python3
"""
Complete Multi-Agent System with Ollama and CrewAI
"""
import os
import sys
from src.my_agent_team.crew import run_full_workflow
def main():
print("""
╔═══════════════════════════════════════════════════════╗
║ 🤖 Multi-Agent AI System - Local Edition ║
║ Powered by Ollama + CrewAI + Qwen3.5:9b ║
╚═══════════════════════════════════════════════════════╝
""")
# Check if Ollama is running
import requests
try:
response = requests.get("http://localhost:11434")
print("✅ Ollama is running!")
except:
print("❌ Ollama is not running. Please start it with: ollama serve")
sys.exit(1)
# Define your project
topic = input("Enter your project topic (e.g., 'Building a REST API with FastAPI'): ")
query = input("Enter your research query (e.g., 'Best practices for FastAPI'): ")
requirements = input("Enter your requirements (e.g., 'Python, PostgreSQL, JWT'): ")
print("\n🚀 Starting multi-agent workflow...")
print("=" * 60)
try:
result = run_full_workflow(topic, query, requirements)
print("\n✅ Workflow complete!")
print("=" * 60)
print(f"\n📄 Presentation saved as: {result['presentation_file']}")
print("\n📊 Crew Results:")
print(result['crew_result'])
except Exception as e:
print(f"\n❌ Error: {e}")
print("\n💡 Troubleshooting tips:")
print("1. Make sure Ollama is running: ollama serve")
print("2. Check if the model is downloaded: ollama list")
print("3. Ensure you have enough memory (close other apps)")
print("4. Check the error message above for specific issues")
if __name__ == "__main__":
main()
Run It!
python run.py