Open Source · Apache-2.0

Monet — Personal AI Assistant.

A self-hostable, always-on personal assistant reachable over Telegram and SMS, driven by Claude Code CLI sessions with vector memory, a memory-hooks pipeline, dozens of agent personas, and scheduled background jobs. One host, one installer, one authorized chat id.

Install

Transcribed from the repository README; not yet executed from a clean environment:

git clone https://github.com/bulletproofsoftware-ai/bulletproof-monet.git
cd bulletproof-monet
cp .env.example .env
./install.sh --check
./install.sh
Monet architecture infographic
Architecture infographic — from bulletproof-monet/docs/media/
Domain Personal AI Infrastructure
Repository bulletproof-monet
Language Bash · Python · TypeScript
Channels Telegram · SMS · REST · dashboard
License Apache-2.0

1Problem Statement

A coding-agent CLI is powerful but session-bound and desk-bound. It forgets everything between invocations and can only be reached from a terminal, which makes it useless for the things a personal assistant is actually for — a question while walking, a reminder at an odd hour, a research task that should run overnight.

Bridging a CLI to a messaging channel sounds simple and is not. Concurrent messages collide over shared session state, long-running work exceeds any reasonable webhook timeout, a crashed session strands the channel silently, and untrusted inbound text reaches an agent with real tool access.

Monet is the operational answer: session locking and lifecycle rules, a watchdog for stuck work, detached background jobs for anything slow, injection filtering on inbound content, and a memory pipeline that makes recall automatic rather than something the user must request.

2Architecture

Inbound Telegram and Twilio webhooks terminate at nginx, pass through n8n workflows, and spawn Claude Code CLI sessions. The bulk of the orchestration lives in large Bash handlers, with Python for the API and audit layer and TypeScript for the memory MCP server.

Session lifecycle

A per-channel flock prevents concurrent sessions from colliding. A state file tracks session id, last activity, and turn count; five minutes of inactivity starts a fresh session; resume is attempted first with fallback to new; a 40-turn ceiling triggers compaction at turns 15 and 30.

Memory hooks

Four Claude Code hooks wire memory into every turn: prompt-submit recall, a pre-tool gate that blocks file search until memory has been consulted, a session-start nudge, and a post-skill usage hook.

Hybrid recall

Retrieval merges BM25 and vector search through reciprocal rank fusion under a 6000-character injection budget, with polarity-aware ordering that marks corrections and negative feedback and sorts them first.

Reliability layer

A watchdog kills processes stuck past a six-minute threshold; a background runner detaches long jobs with a 30-minute timeout and tracks them on disk; cron retry logic covers transient failures.

Management API

A stdlib http.server on port 8091 provides read-only operational endpoints behind bearer auth, backed by an append-only SQLite audit database in WAL mode and live vector-store statistics.

Assistant Capabilities

3Requirements

Requirements describe the deployed behaviour documented and implemented in the repository.

IDRequirement
REQ-MN-001Accept inbound messages over Telegram and SMS via webhook.
REQ-MN-002Serialise per-channel sessions with an advisory lock.
REQ-MN-003Resume an existing session where possible and fall back to a new session.
REQ-MN-004Expire sessions after five minutes of inactivity and compact long sessions.
REQ-MN-005Recall relevant memory automatically on every prompt submission.
REQ-MN-006Block file-search tools until memory has been consulted.
REQ-MN-007Merge lexical and vector retrieval with rank fusion under a fixed injection budget.
REQ-MN-008Order recalled corrections and negative feedback ahead of other memories.
REQ-MN-009Detach long-running work to background jobs with a timeout and on-disk tracking.
REQ-MN-010Terminate stuck processes past a watchdog threshold.
REQ-MN-011Score inbound content for prompt injection before agent execution.
REQ-MN-012Record all activity to an append-only audit database and expose read-only operational endpoints.

4Interfaces

Three interfaces: a messaging surface for the user, a management API for the operator, and hooks that wire memory into the agent runtime.

InterfacePurpose
GET /health · /sessions · /auditService health, active sessions, audit trail
GET /usage · /usage/today · /statsToken and cost accounting
GET /memory/stats · /cronVector store statistics and schedule status
/new · /export · /helpSession control (17-command deny-by-default allowlist)
/remind · /remindersReminders
/clip · /clips · /find · /searchSnippets and semantic search
/mark · /marks · /recallConversation bookmarks
/ss · /photo-log · /usageScreenshots, photo history, token usage
/memory-export · /memory-statsMemory inspection and export
UserPromptSubmit · PreToolUse hooksAutomatic recall and the memory-first gate
SessionStart · PostToolUse hooksSession nudge and skill usage tracking

5Integration Points

Monet is an integration layer by nature, binding a CLI agent to messaging, memory, and scheduling infrastructure.

6Repository

The repository is a self-hostable package: a top-level Compose file that includes the sub-stacks, a 17-step install.sh orchestrator, and the handlers, jobs and services it installs.

PathPurpose
install.sh17-step installer with a credential-free --check dry run
docker-compose.ymlTop-level stack; include:s the sub-stacks under docker/
deploy/nginx templates, webhook registration, and the smoke test
monet-*.shChannel handlers and scheduled job entrypoints
api/Management API and webhook entrypoints
bin/Operator CLI tools — agent invocation, review, research queue
claude/scripts/The four memory hooks
lib/Injection filtering, audit database, visual content generation
mcp/claude-memory-mcp/TypeScript memory MCP server
n8n/workflows/Sixteen exported workflow definitions
scripts/Memory governance, indexing, skill scoring, fleet checks
dashboard/Single-page operational dashboard

View source on GitHub

7Implementation Notes

Constraints that matter before you install this on a host.