Quimera: your own AI agent, open source

An assistant that works over Telegram, remembers, learns from your corrections and proposes improvements, but only acts when you say yes. Free, MIT licence, on your own machine.

Most AI assistants live on someone else's servers, charge a monthly fee and decide for you what they can and can't do. We wanted the opposite: an agent that runs on your computer, keeps your data with you and asks before doing anything that matters.

That's Quimera. We wrote it from scratch in Python and release it free under the MIT licence: github.com/somosbanana/quimera. This guide explains what it is, how to install it and how to get the most out of it. Short version: use OpenRouter for the brain and a small local model for the guardian.

What you need

  • A Mac or Linux computer with Python 3.11 or newer
  • Docker (Docker Desktop on Mac) for the sandbox
  • An OpenRouter account and API key (pay per use, a few euros a month with normal use)
  • A Telegram bot, created with @BotFather in two minutes
  • Optional: Ollama, on your computer or your server, for the guardian model

1. What Quimera is

A general assistant you talk to over Telegram or the terminal. It can search and read the web, work with files, run code, use any MCP server and delegate subtasks. It remembers what you tell it, with the source and date of every fact, and consolidates its memory every night.

What makes it different is how it decides. Every action has a risk category: reading, writing, sending, money, deleting or system. Anything that isn't a read asks you first, and money and system actions never allow 'always'. Before you're even asked, a second model, the guardian, reviews every outgoing action and blocks it if something looks wrong.

2. Install it

Clone the repository, create a virtual environment and initialise your private folder (~/.quimera, never uploaded anywhere). Then build the sandbox image: terminal, Python and the browser run inside a Docker container with no network, no privileges and a read-only system. Without Docker those tools stay off; they never run on your computer.

Finish with quimera audit: it checks permissions, secrets and isolation, and tells you what's missing.

git clone https://github.com/somosbanana/quimera
cd quimera
python3 -m venv .venv && . .venv/bin/activate
python -m pip install '.[credenciales]'
quimera init
quimera sandbox construir
quimera audit

3. The brain: OpenRouter

To use tools reliably an agent needs a large model, roughly 30 billion parameters or more. A normal laptop or a small server can't run that at a useful speed, so the practical choice is an API. OpenRouter gives you one key for many models, open (Qwen, DeepSeek, Llama) and commercial, so you can switch without touching code.

Save the key in your system keychain, never in a file. Then point the main model to OpenRouter in ~/.quimera/quimera.toml. Copy the real price of the model you choose into entrada and salida: Quimera uses it to track spending and stops at your limits (by default 0.10 dollars per task, 1 per day, 10 per month).

keyring set quimera OPENROUTER_API_KEY

# ~/.quimera/quimera.toml
modelo = "principal"

[modelos.principal]
proveedor = "openrouter"
id_api = "qwen/qwen3-235b-a22b"   # example: pick yours on openrouter.ai/models
entrada = 0.20                     # example price per million tokens
salida = 0.60

4. The guardian: a small local model

The guardian must be a different model from the main one, so a single trick can't fool both. A small one is enough: qwen2.5:1.5b in Ollama, free, on your computer or on your server. If it fails or doubts, it blocks. That's the safe side.

On a server without a GPU, give it time: set timeout to 120 seconds for that model.

ollama pull qwen2.5:1.5b

[modelos."qwen2.5:1.5b"]
proveedor = "ollama"
base_url = "http://localhost:11434/v1"
timeout = 120
entrada = 0
salida = 0

[guardian]
modelo = "qwen2.5:1.5b"

5. Connect Telegram

Create a bot with @BotFather, save its token in the keychain and start Quimera. The bot stays silent to everyone until you pair it: quimera emparejar prints a six-digit code valid for ten minutes, you send it to the bot, and from then on it only listens to you.

keyring set quimera TELEGRAM_BOT_TOKEN
quimera telegram
# in another terminal:
quimera emparejar

6. The first week: shadow mode

For its first seven days Quimera only watches and tells you what it would have done. Nothing that changes anything gets executed, not even with a yes. When the week ends you get a summary. It's the best way to see how it thinks before trusting it. Manage it with /sombra on, off or estado.

7. Make it proactive

Quimera doesn't only answer. Add the websites you care about to ~/.quimera/vigilancia.toml and it will watch whether they go down, slow down or their certificate is about to expire. When something happens it proposes what to do, with Yes, No and More info buttons. Every morning at 8:00 you get a summary: what it watched, what it proposes, what it did and what it spent.

A yes only covers that exact action. If the details change, it asks again. /propuestas lists what's pending and /deshacer reverts what it did.

8. Teach it

Correct it like you'd correct a person: 'not like that, shorter'. It saves the correction as a preference and applies it from the next conversation. When it solves something in several steps, it proposes saving it as a skill to reuse next time. Nothing is saved without your yes. /quesabes shows what it knows about you and /olvida deletes it for real.

9. Privacy and control

Before sending anything to a cloud model, Quimera replaces tax IDs, IBANs, emails, phone numbers and your contacts' names with placeholders, and restores them in the answer. The guardian and the permissions always see the real data. Your memory, keys and conversations stay in ~/.quimera.

/porqué explains why it did something (origin, model, tools, permissions and the guardian's verdict), /pausa stops everything at once and quimera backup makes an encrypted copy of your whole setup.

Quimera is free and open: read the code, change it, and tell us what you'd add on GitHub. Start with a cheap OpenRouter model, shadow mode on and one website to watch. In a week you'll know whether it's worth giving it more work.

Quimera: tu propio agente de IA, de código abierto. Un asistente que trabaja por Telegram, recuerda, aprende de tus correcciones y te propone mejoras, pero solo actúa cuando dices que sí. Gratis, licencia MIT y en tu propio equipo.