harishkotra/agent-office
Acerca de
Watch AI agents walk to desks, think, collaborate, hire interns, assign tasks to each other, execute code, search the web, and grow their team - all rendered in real-time pixel art with persistent memory across sessions.
IA y aprendizaje automáticoWhat you can do
- 🧠 LLM-Powered Agents - Each agent has their own Ollama-powered brain with personality traits
- 💬 Agent-to-Agent Conversations - Agents talk to each other autonomously and respond to messages
- 🎯 Click-to-Follow Focus Mode - Click any agent sprite to have the camera smoothly track them
- 📋 UI Task Assignment - Assign tasks from the TaskBoard — or agents create tasks for each other
Crecimiento de estrellas medido
- in 24h
- +1
- in 7 days
- +6
- in 15 days
- +11
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Original🏢 AgentOffice
Self-growing AI teams in a pixel-art virtual office — powered by local LLMs.
Watch AI agents walk to desks, think, collaborate, hire interns, assign tasks to each other, execute code, search the web, and grow their team — all rendered in real-time pixel art with persistent memory across sessions.
Zero lock-in. Runs 100% locally with Ollama. Swap for any OpenAI-compatible API.
https://github.com/user-attachments/assets/da76e31d-ff34-4ce1-9092-5bf9e6ee2058
✨ What Can It Do?
| Feature | Description |
|---|---|
| 🧠 LLM-Powered Agents | Each agent has their own Ollama-powered brain with personality traits |
| 💬 Agent-to-Agent Conversations | Agents talk to each other autonomously and respond to messages |
| 🎯 Click-to-Follow Focus Mode | Click any agent sprite to have the camera smoothly track them |
| 📋 UI Task Assignment | Assign tasks from the TaskBoard — or agents create tasks for each other |
| 🤝 Dynamic Hiring | Agents can hire new team members (interns, devs, designers) on their own |
| 🔧 Tool Execution | Sandboxed JS execution, web search, note-taking, file reading |
| 💾 Persistent Memory | SQLite-backed memories survive server restarts with importance-weighted recall |
| 🔍 Semantic Memory Search | Ollama embeddings + cosine similarity for intelligent memory retrieval |
| 🏗️ Layout Editor | Drag-and-drop furniture placement, saved to database |
| 📊 System Activity Log | Real-time feed of all agent events with deduplication |
| 💡 Emote Bubbles | Action-specific emoji (💻💬😌🔧🚶💡) above agent sprites |
| 🪑 Furniture Interaction | Agents walk TO desks to work, approach each other to talk |
🎬 How It Works
You open the browser → pixel-art office loads → Alice (Engineer) and Bob (PM) spawn
→ Each agent runs a think loop every ~15s via Ollama
→ LLM returns: { thought, action, target, toolCall }
→ Server executes the action (move, talk, use_tool, hire_agent)
→ Colyseus syncs state to all connected browsers in real-time
→ Agents remember everything via SQLite + Ollama embeddings
→ Teams grow as agents decide to hire new members 🚀
🏗️ Architecture
agent-office/
├── packages/
│ ├── core/ # Agent state machine, Memory, Tasks, Office grid
│ ├── adapters/ # OllamaAdapter, OpenAICompatibleAdapter, PromptBuilder
│ ├── server/ # Colyseus rooms, ToolExecutor, MemoryStore (SQLite)
│ ├── ui/ # Phaser.js game + React overlay (Chat, TaskBoard, SystemLog)
│ └── cli/ # Scaffold & management commands
├── examples/
│ └── ollama-startup/ # Demo office with 2 agents
├── docs/ # Documentation (Docusaurus)
└── docker-compose.yml # One-command deployment
Data Flow:
Ollama ←→ OllamaAdapter ←→ Agent.think() ←→ Colyseus State ←→ Phaser + React UI
↕ ↕
MemoryStore (SQLite) ToolExecutor
Embeddings (Ollama) (code, search, tasks)
🚀 Quick Start
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| Node.js | ≥ 18 | Runtime |
| npm | ≥ 9 | Package manager (workspaces) |
| Ollama | Latest | Local LLM inference |
Setup
# Clone & install
git clone https://github.com/AjStraworern/agent-office.git
cd agent-office
npm install
# Pull the model
ollama pull llama3.2
# Build all packages
npm run build
# Terminal 1: Start server
npm run start --workspace=@agent-office/server
# Terminal 2: Start UI
npm run dev --workspace=@agent-office/ui
Open http://localhost:5173 — watch Alice and Bob come alive! 🎉
🐳 Docker Deployment
docker compose up --build
This starts the server (port 3000), UI (port 80), Ollama (with GPU), and Redis (for scaling).
For CPU-only, remove the
deploy.resourcessection fromdocker-compose.yml.
🔧 Configuration
Change the LLM Model
Edit packages/server/src/rooms/OfficeRoom.ts:
inference: {
provider: 'ollama',
model: 'llama3.2:latest', // ← Change to any Ollama model
systemPrompt: '...',
},
Use OpenAI / Gaia / OpenRouter
import { OpenAICompatibleAdapter } from '@agent-office/adapters';
private adapter = new OpenAICompatibleAdapter(
'https://api.openai.com/v1',
'sk-your-key-here',
'gpt-4o-mini'
);
Add Agents Manually
await setupCoreAgent('charlie', 'Charlie', 'Designer', 15, 15);
Or let existing agents hire them dynamically via LLM! 🤝
🍴 Fork It & Build Your Own
AgentOffice is designed to be forked and customized. Here's how:
Step 1: Fork & Clone
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/agent-office.git
cd agent-office && npm install
Step 2: Customize Agents
Edit packages/server/src/rooms/OfficeRoom.ts to change agent names, roles, personalities, and system prompts. The personality traits (openness, conscientiousness, extraversion, agreeableness, neuroticism) directly influence agent behavior.
Step 3: Add Custom Tools
Create new tools in packages/server/src/tools/ToolExecutor.ts:
case 'my_custom_tool':
return this.myCustomTool(params);
Then add the capability to the agent config.
Step 4: Change the Office Layout
Modify furnitureTargets in OfficeRoom.ts or use the in-browser Layout Editor to place and save furniture.
💡 Ideas: What Can You Build With This?
| Use Case | Description |
|---|---|
| 🎓 AI Classroom | Teacher agent assigns lessons, student agents learn and ask questions |
| 🏥 Virtual Hospital | Doctor, nurse, and patient agents simulate a medical workflow |
| 🏭 Factory Simulation | Agents manage assembly lines, quality control, and logistics |
| 🎮 Game NPC Engine | Use AgentOffice as the brain for NPCs in your game |
| 📊 Business Simulation | CEO, CTO, and team agents run a startup — watch strategy emerge |
| 🧪 Research Lab | Agents read papers, discuss findings, and write collaborative reports |
| 🤖 AI Interview Simulator | Interviewer and candidate agents practice technical interviews |
| 🎭 Social Experiment | Study emergent behavior in AI agent groups with different personalities |
| 📚 Study Group | Agents quiz each other, explain concepts, and track learning progress |
| 🏗️ DevOps Team | Agents monitor services, create incident tickets, and coordinate fixes |
📦 Package Overview
| Package | Description |
|---|---|
@agent-office/core |
Agent lifecycle (Perceive → Think → Act), Office grid, Task system, Memory with importance scoring |
@agent-office/adapters |
InferenceAdapter interface, OllamaAdapter, OpenAICompatibleAdapter, PromptBuilder |
@agent-office/server |
Colyseus room, game loop, ToolExecutor (code/search/notes), MemoryStore (SQLite + embeddings) |
@agent-office/ui |
Phaser.js renderer, React overlay (Chat, TaskBoard, Inspector, SystemLog, LayoutEditor) |
@agent-office/cli |
create-agent-office scaffold, add-agent commands |
🧪 Testing
npm test # All tests
npm test --workspace=@agent-office/core # Core only
npm test --workspace=@agent-office/adapters # Adapters only
🗺️ Roadmap
- Multi-agent conversations
- UI task assignment
- Persistent memory (SQLite)
- Tool execution (code, search)
- Custom layout editor
- Agent Focus Mode
- Dynamic agent hiring
- Semantic memory search
- System Activity Log
- Emote Bubbles
- Voice mode (TTS/STT)
- GitHub PR integration
- Slack/Discord bridge
- Multiple office floors
- Plugin system for custom behaviors
- Mobile companion app
📘 Changelog
See release notes in CHANGELOG.md.
🤝 Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
Built with Phaser.js · Colyseus · React · Ollama · SQLite · TypeScript
Star ⭐ this repo if you think AI agents deserve their own office!
💙 Shout out to @pablodelucca for building and inspiring this project with https://github.com/pablodelucca/pixel-agents
Explorar proyectos relacionados
Cargando…