A collaborative multi-agent system where specialized agents communicate through a global chat to solve tasks.
Agent Office creates a virtual office environment where multiple specialized AI agents can collaborate to solve problems. Each agent has:
- Domain-specific expertise (Sales, Marketing, Product, Infrastructure)
- Specialized tools related to their domain
- Common tools that allow them to communicate with other agents
The system leverages ChatOllama to power each agent, making it easy to run locally on your machine.
- Multiple Specialized Agents: Each with unique expertise and tools
- Global Chat: Central communication channel for all agents
- Domain-Specific Tools: Tools tailored to each agent's expertise
- Common Communication Tools: All agents have
ask_officeandno_responsetools - Interactive Interface: Chat with the agents directly through a command-line interface
- Streaming Responses: See agent responses in real-time as they are generated
- Sales Agent (Roger): Specializes in sales strategies, CRM, and business development
- Marketing Agent (Peter): Expert in marketing strategies, brand management, and digital marketing
- Product Agent (Luke): Focuses on product management, development, UX/UI design, and market requirements
- Infrastructure Agent (Diana): Specializes in cloud infrastructure, DevOps, and system administration
Each agent has access to various tools:
- ask_office: Posts messages to the global chat
- no_response: Allows agents to explicitly not respond to a message
- Google Search: Web search via SerpAPI
- Python Runner: Executes Python code
- Notepad (Read/Write): Manages files in agent-specific directories
-
Clone the repository:
git clone https://github.com/yourusername/agent-office.git cd agent-office -
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile from the example:cp .env.example .env
-
Edit the
.envfile to add your API keys:SERPAPI_API_KEY=your_serpapi_key_here OLLAMA_HOST=http://localhost:11434 -
Install and run Ollama:
- Follow instructions at Ollama.ai to install
- Pull the default model:
ollama pull deepseek-r1:8b-llama-distill-q8_0:8b-llama-distill-q8_0
Run the main application with streaming responses (default):
python main.pyOr run without streaming responses:
python main.py --no-streamingSpecify a different Ollama model:
python main.py --model mistralhelp: Display available commandshistory: Show chat historyask <agent_name> <question>: Ask a specific agent directlyexit: Quit the application
Run the test script to quickly test the system:
python test_office.pyagent-office/
βββ agents/ # Agent implementations
β βββ __init__.py
β βββ base.py # Base Agent class
β βββ specialized.py # Specialized agent implementations
βββ office/ # Office chat implementation
β βββ __init__.py
β βββ chat.py # Office chat system
βββ tools/ # Tool implementations
β βββ __init__.py
β βββ base.py # Base Tool class
β βββ common.py # Common tools
β βββ google_search.py
β βββ notepad.py
β βββ python_runner.py
βββ notes/ # Directory for agent notes
βββ .env.example # Environment variables example
βββ .env # Your environment variables (create this)
βββ main.py # Main application
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ test_office.py # Test script
- Python 3.8+
- Ollama installed locally
- SerpAPI key (for Google Search tool)
- Add new tools by extending the
BaseToolclass - Create new agent types by extending the
Agentclass - Modify existing agent prompts to specialize them further

