You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multi-agent orchestration that pairs LangGraph LLM nodes with deterministic Google OR-Tools solving and a Streamlit UI.
Architecture
flowchart LR
UI[Streamlit UI] --> F[Formulator]
F --> C[Coder]
C --> E[Executor]
E -->|success| R[Reporter]
E -->|error / infeasible| V[Reviewer]
V --> C
R --> UI
Loading
Node
Role
Formulator
Business prompt + baseline params → Pydantic StructuredOptimizationModel
Coder
Fills CP-SAT or VRP templates (no free-form OR-Tools syntax)
Executor
Subprocess sandbox; captures stdout / tracebacks
Reviewer
Self-correction loop on errors or infeasibility (max 3 retries)
cd optimisation-agent
cp .env.example .env
# Optional: set OPENAI_API_KEY for LLM nodes (heuristic fallback works offline)
uv sync --extra dev
Run UI
uv run streamlit run src/ui/app.py
The UI is a guided 4-step workflow (problem type → parameters → data → Run optimizer).
By default it uses the direct OR-Tools engine (fast, no API key). Enable “AI pipeline” only for natural-language refinements.