-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration Guide
The multi_agent_config.yaml file is the brain of the Crew.ai Ollama Multi-Agent System. It lets you easily control which agents (like virtual helpers) are active, which are disabled, and how they collaborate to perform tasks. Whether you’re new to tech or customizing for professional workflows, this guide will help you set up and manage your system step by step.
Think of multi_agent_config.yaml as your system’s instruction manual. It helps you:
- Define how the system works as a whole.
- List all available agents (helpers) in your system.
- Turn specific agents on or off to match your needs.
Here’s an example of what the file looks like:
orchestration:
multi_agent: true
memory_store: vector_db
agents:
- name: ollama_agent
enabled: true
- name: household_chores_agent
enabled: true
- name: diet_meal_planning_agent
enabled: false
- name: photo_management_agent
enabled: falseThis part defines how your system operates:
-
multi_agent: Iftrue, multiple agents can collaborate to solve tasks. Iffalse, only one agent will handle everything. -
memory_store: Defines how your system stores information. Options include:-
vector_db: Uses advanced storage for quick recall (great for complex tasks). -
in_memory: Stores data temporarily while the system is running.
-
This section lists all your agents. Each agent has:
-
name: A unique name for the agent (e.g.,ollama_agent). -
enabled: Atrueorfalsevalue to control whether the agent is active.
To turn on an agent, set its enabled field to true:
- name: diet_meal_planning_agent
enabled: trueOnce enabled, this agent will activate the next time you restart the system.
To turn off an agent, set its enabled field to false:
- name: photo_management_agent
enabled: falseDisabled agents won’t run, which saves system resources.
Some agents require more memory or processing power. Disabling non-essential agents can improve performance, especially on less powerful machines.
If you only care about meal planning and tracking expenses, you can disable agents like photo management or streaming recommendations to keep things simple.
When creating or fixing a new agent, disable the others to isolate and test its functionality.
Certain agents might use the internet (e.g., for weather or streaming data). If you prefer everything offline, disable agents that require external connections.
The AgentManager in Crew.ai reads your configuration file to decide which agents to activate. Here’s a simplified version of how it works:
import yaml
from agents.ollama_agent import OllamaAgent
from agents.household_chores_agent import HouseholdChoresAgent
from agents.diet_meal_planning_agent import DietMealPlanningAgent
class AgentManager:
def __init__(self):
# Load the configuration file
with open("src/config/multi_agent_config.yaml", "r") as f:
self.config = yaml.safe_load(f)
self.active_agents = self.load_agents()
def load_agents(self):
agents = []
for agent_def in self.config.get("agents", []):
if agent_def["enabled"]:
if agent_def["name"] == "ollama_agent":
agents.append(OllamaAgent())
elif agent_def["name"] == "household_chores_agent":
agents.append(HouseholdChoresAgent())
elif agent_def["name"] == "diet_meal_planning_agent":
agents.append(DietMealPlanningAgent())
return agents- The system looks for agents marked
enabled: truein themulti_agent_config.yamlfile. - Only enabled agents are added to the system and ready to handle tasks.
For a basic system that handles general tasks and household chores:
orchestration:
multi_agent: true
memory_store: in_memory
agents:
- name: ollama_agent
enabled: true
- name: household_chores_agent
enabled: true
- name: diet_meal_planning_agent
enabled: falseFor a system with all available agents enabled:
orchestration:
multi_agent: true
memory_store: vector_db
agents:
- name: ollama_agent
enabled: true
- name: household_chores_agent
enabled: true
- name: diet_meal_planning_agent
enabled: true
- name: photo_management_agent
enabled: true-
Keep a Backup: Always save a copy of your working configuration file in case you need to revert.
-
Test Changes: When enabling a new agent, test it individually to make sure it works as expected.
-
Monitor Performance: If the system feels slow, try disabling resource-heavy agents.
-
Document Your Setup: Add comments to your
multi_agent_config.yamlfile to track why certain agents are enabled or disabled.
Example:
# Enabling photo management for organizing holiday pictures
- name: photo_management_agent
enabled: trueThe multi_agent_config.yaml file gives you full control over how Crew.ai operates. By turning agents on or off, you can:
- Customize the system to match your goals.
- Optimize its performance for your hardware.
- Keep things simple or expand as needed.
Whether you’re a tech enthusiast or just looking for a practical assistant, mastering this configuration file is the key to unlocking Crew.ai’s full potential. Start experimenting today and create your perfect AI setup!