The multi-agent AI engine
A Python server that sits between what asks (a chat, a script, a code editor, a voice assistant) and what answers (about eighteen AI providers, local models, Home Assistant). For each request it takes the cheapest path that is enough: a rule with no AI when possible, a model otherwise, with a fallback when a provider goes down. It was born to give a voice to my Home Assistant display.
- Language
- Python 3.12+
- API
- OpenAI-compatible
- AI providers
- About 18
- License
- MIT
- Status
- Active development
"A home-made brain for Home Assistant and your LLM providers: rules first, a model only when it helps."
First line of the vromvrom-engine README.
What it does
For each request the engine takes the cheapest path that is enough: a rule, with no AI, when the sentence is a known home command or question ("turn off the living room light"); a model otherwise, with a fallback when a provider fails; a plan of several agents only for a complex task. It also works without Home Assistant.
Pick the right model
Keywords first, with no model; if the request is ambiguous, a small classifier or a small model sorts it. The models of a level are then ranked by an Elo score per domain, cost, remaining quota and latency.
Work in parallel
A complex request becomes a plan (planner, executors, reviewer) whose tasks run at the same time (asyncio). This is the least mature part: it works in the tests, but no complex task ran in 30 days on the author's instance.
Heal itself
A circuit breaker per provider, spaced retries, failover to the next one depending on availability and budget, and a health probe that turns failing models off.
Remember
Facts, session summaries and a graph, kept in SQLite, and a search in your documents by words and by meaning (ChromaDB, to be built once).
Talk to your tools
An OpenAI-compatible API (/v1/chat/completions, streaming) usable from Cursor, Cline or Continue; an MCP server of 17 tools for Claude or Cursor and a client for third-party MCP servers; routes dedicated to Home Assistant.
Stay in control
In a conversation the model only has read tools for Home Assistant: devices are commanded only by written rules. Risky actions need human approval. A plugin system, remote workers and a dashboard (FastAPI and React).
Where it stands
Used every day
Home commands and questions without a model (110 to 196 ms on the engine side for a sentence of the catalog), chat with fallback between providers, cost counting: 86 real calls in 30 days cost $0.81 in the author's home.
Tested, less used
The OpenAI-compatible endpoint (streaming included), MCP both ways and, since November 2026, hot backups of the databases.
Experimental
Multi-agent plans, the local learning router (off on a fresh install) and the autonomous cycle (Dreamer, DreamCoder).
Not plug-and-play
End-to-end voice through Home Assistant Assist: the component that sends the recognized text to the engine (moteur_ia_conversation) is not in the repository. Chat, the API, the agents and MCP work without it.
Figures of 2026-11-01 from the author's installation (one household, in French, with Home Assistant). The full table, with its evidence, is in the README.
Where to start
The repository has a five-page guide, in English and in French. It was checked by really starting the engine on Windows 11 with Python 3.13, with no provider key and no Home Assistant; Linux, macOS, Docker and systemd were not tried. In this order:
- Install: prerequisites, Windows or Linux, Docker, first start and first request.
- Operate, the section on costs: read it before adding a provider key, to know what consumes tokens on its own.
- Understand: what happens when a request is sent.
- Settings: every
.envvariable and everyconfig.jsonkey, with its default. - Home and voice: only if you have Home Assistant.
Its limits
- One person, one API key: no accounts, no roles, no per-person budget. For a team, a gateway like LiteLLM fits better.
- Voice needs a component that is not published (see above).
- The cost statistics are skewed: the health probes are counted with the real calls (27,805 calls counted in 30 days, 86 of them real).
- Many providers, not all alive: on the author's instance the health probe turned off 42 models out of 76.
- Made for a developer first: the code, its comments and many of its names are in French; about half of the code is covered by tests (54% on 2026-11-01).
- One maintainer, code largely written with AI, no promise of support.
Under the hood
- Python 3.12+ (the version tested in CI), FastAPI, asyncio, SQLite, ChromaDB, scikit-learn; dashboard in React, Vite and TypeScript.
- About eighteen AI providers supported by the code, in the cloud (Gemini, GitHub Models, DeepSeek, Anthropic, Mistral, OpenRouter…) or local (LM Studio, Ollama). A listed provider is not guaranteed to answer today: the health probe turns off those that fail.
- Everything lives in SQLite files, with no database server to run: the author's instance runs on a Steam Deck, day and night.
- A Docker image and docker-compose, pytest tests and continuous integration. Which models to use, at what price: STRATEGIES.
A personal tool shared as is, written with a lot of help from AI: the dashboard still has rough edges, and no release is published yet.