Skip to main content

Mantrin

Everyone deserves a chief of staff — your personal Jarvis.

Mantrin (you'll also see it called Jarvis — that's the name it answers to, and the name of the package inside) is a personal chief of staff you talk to. It remembers your people, your promises and your plans across every conversation, and then acts on them.

Not a recorder and not a chat window. You say something once; it holds onto it and does something about it.

Status: beta. It runs my day, every day — but it's young: Linux only for now, version 0.x, and things change without ceremony. If you're the kind of person who enjoys software at this stage, welcome; if you need boring and settled, check back in a few releases.

What's here

jarvis/
  core/memory.py       # the moat — durable facts with provenance. Not rented.
  core/brain.py        # understanding: reply, then decide what was worth learning
  audio.py             # mic, endpointing, playback — shared by every voice provider
  wake.py              # the wake word, running locally
  daemon.py            # the always-on process: holds the mic and the connections
  providers/llm.py     # rented intelligence (Claude) behind one interface
  providers/stt.py     # rented ears — local Whisper, OpenAI, Grok, or your own app
  providers/tts.py     # rented voice — local Piper, OpenAI, Grok
  providers/voice_registry.py   # the table of what you can pick, and what it needs
  tools/               # real actions: web, X, and any MCP server
  io/                  # the skin: voice or text, same brain either way

Everything replaceable sits behind an interface — the language model, the ears, the voice, the memory store. What we own outright is the memory and the understanding built on it.

Install

python3 -m venv .venv
./.venv/bin/pip install -e ".[voice]"
export ANTHROPIC_API_KEY=...

[voice] is the microphone layer. The heavy local providers install only if you pick them: mantrin setup offers to fetch what your choices need, or grab everything up front with pip install -e ".[all]".

Talk to it

./.venv/bin/mantrin setup      # choose whose ears and voice; save any keys
./.venv/bin/mantrin            # then just say "hey jarvis"

The default stack is free and entirely local — Whisper for hearing, Piper for speaking, openWakeWord for the wake word. Nothing you say leaves the machine until you choose a hosted provider.

There is no button and no time limit: it works out that you stopped talking by listening. Interrupt it mid-sentence and it stops, like a person would. After it answers it keeps listening for a few seconds, so a back-and-forth doesn't need the wake word every time.

Type instead

./.venv/bin/mantrin --text        # keyboard in, text out
./.venv/bin/mantrin --dictate     # dictate with your own app, spoken reply

--dictate is for Wispr Flow's app, superwhisper, Willow and the rest. They own the microphone and type into whatever has focus, so there is nothing to integrate with — Mantrin reads the line and answers out loud.

Swap providers

./.venv/bin/mantrin --stt grok --tts openai
./.venv/bin/mantrin --timings     # where each turn's time actually went

Settings live in ~/.config/mantrin/config.json (mode 0600, it holds keys). Anything in the environment wins over what is saved there.

Adding a provider is one class with one method, plus a line in providers/voice_registry.py.

See what it knows

./.venv/bin/mantrin memory        # every fact, and where it came from
./.venv/bin/mantrin commitments   # open loops it is tracking
./.venv/bin/mantrin brief         # a short daily brief

Memory is SQLite at data/jarvis.db — open it with sqlite3 and you can read everything it knows about you. Delete the file to give it amnesia.

Integrations

WhatsApp, Slack, X — and anything with an MCP server — plug into the same tool registry. Each is a block in data/mcp.json plus a key in the environment; a block whose key isn't set yet just waits. See docs/integrations.md for what's wired and how to get each key.

The daemon

mantrin starts a background daemon on first run and then talks to it. The daemon is where Mantrin actually lives: it holds the microphone and keeps integrations like WhatsApp connected, so messages are still captured when you are not in a session and there is no terminal to keep open.

Only one process may hold those connections — two would mean two WhatsApp clients on one set of credentials — which is why voice runs there rather than in the CLI.

./.venv/bin/mantrin daemon        # run it in the foreground to watch it
./.venv/bin/mantrin --no-voice    # don't hold the microphone

Run at every login

./.venv/bin/mantrin install

On Linux this installs a systemd user service and puts a mantrin command on your PATH: Mantrin starts when you log in, restarts if it crashes, and there is no terminal to keep open. From then on the commands are ones a person can remember — mantrin status, mantrin logs, mantrin restart, mantrin stop, mantrin uninstall.

It also puts a status icon in the top bar (mantrin tray, auto-started at login): green means listening for the wake word, blue means mid-conversation, yellow starting, red something's wrong. The menu holds a Pause microphone hard mute — while it's on, even the wake word is ignored.

Contributing

Issues and PRs welcome — CONTRIBUTING.md has the setup, the rules that matter (start with the Human PA Test), and how changes are reviewed. The label good first issue marks self-contained starting points. Big roadmap features (proactivity, streaming voice) are being built by the maintainer — open an issue to discuss before starting anything large.

License

FSL-1.1-ALv2 — use it, change it, run it for yourself or inside your company, all free. The one thing you can't do is take this code and sell it as your own product or hosted service. Every release becomes plain Apache 2.0 two years after it ships.

Not there yet

Proactivity — it answers when spoken to, and does not yet start conversations itself. Reminders and anything on a schedule need a real scheduler, not a language model. Auto-reply to messages waits on always-on being solid first. Google and Slack need your sign-in. Streaming transcription is worth adding only if --timings says it would help.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mantrin-0.1.0.tar.gz (87.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mantrin-0.1.0-py3-none-any.whl (96.1 kB view details)

Uploaded Python 3

File details

Details for the file mantrin-0.1.0.tar.gz.

File metadata

  • Download URL: mantrin-0.1.0.tar.gz
  • Upload date:
  • Size: 87.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for mantrin-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4841795d06a8401142201eff05ad00cf784908d6ecd81bda03d2964d4869c50b
MD5 d75ebb57664961ca3f8cec5d84bfda01
BLAKE2b-256 38e962719fb4e936a2de392c0bda7bbdc4b998903ecc93d7d9963a1b64f29d38

See more details on using hashes here.

File details

Details for the file mantrin-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mantrin-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 96.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for mantrin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f80e0500c5692848d0c5314665c24a180fc721a1f4b46359a611f886731e715c
MD5 1fa29f47ca1d5617995e3b16e6563129
BLAKE2b-256 3f3be81128583d4d1fdeffba2b658ca61880dda3205459a908f3b90a630713e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page