Provides reusable CrewAI tools and agents for solving linear programming problems, mixed-integer optimization models, translating natural language prompts into LP JSON format, and diagnosing infeasibility issues through the CrewAI multi-agent framework.
Crew Optimizer
Crew Optimizer rebuilds the original optimisation project around the CrewAI ecosystem. It provides reusable CrewAI tools and agents capable of solving linear programs via SciPy's HiGHS backend, exploring mixed-integer models with a lightweight branch-and-bound search (or OR-Tools fallback), translating natural language prompts into LP JSON, and diagnosing infeasibility. You can embed the tools inside your own crews or call them programmatically through the OptimizerCrew
convenience wrapper, or serve them over the MCP protocol for clients such as Smithery.
Installation
This installs Crew Optimizer together with optional OR-Tools support for MILP solving. Add pytest
, ruff
, or other dev tools as needed (pip install pytest
).
Quick Usage
To integrate with a wider multi-agent workflow, call crew.build_crew()
to obtain a Crew
populated with the LP, MILP, and parser agents. Provide model inputs through CrewAI’s shared context as usual.
MCP / Smithery Hosting
Crew Optimizer ships an MCP server (python -m crew_optimizer.server
) that wraps the same solvers. The repository already contains a Smithery manifest (smithery.json
) and build config (smithery.yaml
).
Push the repository to GitHub.
In Smithery, choose Publish an MCP Server, connect GitHub, and select the repo.
Smithery installs the package (
pip install .
) and launchesmcp http src/crew_optimizer/server.py --port 3333
using the bundled startup script.The server exposes the following tools:
solve_linear_program
solve_mixed_integer_program
parse_natural_language
diagnose_infeasibility
For local testing:
Testing
Install test dependencies (pip install pytest
) and run:
The suite covers the LP solver, MILP branch-and-bound, and the NL parser.
Licence
Distributed under the MIT Licence. See LICENSE
for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables solving linear programming (LP) and mixed-integer linear programming (MILP) optimization problems through natural language, with built-in simplex and branch-and-cut solvers plus infeasibility diagnostics. Includes optional OR-Tools fallback for larger problems and supports parsing optimization problems from natural language descriptions.