This project is Symphony built with FastAPI, LangGraph, and OpenAI. It serves as an orchestrator that coordinates tasks across specialized agents:
- Life-Style Agent (Lifestyle/schedule management)
- Browser Agent (Web automation via Selenium/Playwright/etc.)
- IoT Agent (Smart home control)
The core application is a FastAPI web server providing a Single Page Application (SPA) frontend and an SSE-based API for the orchestrator.
- Backend: Python 3, FastAPI (Router in
multi_agent_app). - Orchestrator: LangGraph based (
multi_agent_app/orchestrator.py). It plans, executes, and reviews tasks. - Frontend: Vanilla JS + HTML/CSS (
assets/,templates/). No build step required. - Communication:
- Client-Server: REST + Server-Sent Events (SSE).
- Inter-Agent: HTTP requests (proxied by the FastAPI backend).
- State:
- Ephemeral:
chat_history.json,short_term_memory.json,long_term_memory.json. These are runtime artifacts and should generally be ignored in git commits. - Configuration:
secrets.env(API keys), Environment variables (Service URLs).
- Ephemeral:
app.py: Main entry point.multi_agent_app/: Core application logic.orchestrator.py: The brain of the system (LangGraph definition).routes.py: API endpoints.config.py: Configuration loader (secrets.env).
assets/: Frontend static files (app.jsdrives the UI).templates/: Jinja2 HTML templates.AGENTS.md: Detailed system documentation (Reference this for deep dives).docker-compose.yml: Service orchestration.
- Python 3.10+
- Docker & Docker Compose (optional but recommended)
secrets.envfile withOPENAI_API_KEY.
# 1. Create and activate venv
python -m venv .venv
source .venv/bin/activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Run the application (default port 5050)
uvicorn app:app --host 0.0.0.0 --port 5050 --reload# Build and run the web service
docker compose up --build webNote: The container expects an external network multi_agent_platform_net or will fallback to default if configured.
- Language: The user prefers interaction in Japanese, but code/docs are primarily in English.
- Commits: Conventional Commits (e.g.,
feat: ...,fix: ...). - Testing:
pytest(Tests located intests/). - Style: Follow PEP 8 for Python.
- Memory Files: Do not manually edit or commit
*.jsonmemory files unless debugging specific persistence issues.
Important variables defined in multi_agent_app/config.py and docker-compose.yml:
OPENAI_API_KEY: Required.LIFESTYLE_API_BASE: URL for the Life-Style Agent.BROWSER_AGENT_API_BASE: URL for the Browser Agent.IOT_AGENT_API_BASE: URL for the IoT Agent.UVICORN_RELOAD: Set to "1" for auto-reload in development.
どれだけ時間とコストをかけてもよいので、確実に目標が達成されるようにしてほしい。