Milyonus-Agent-5.5
Health Pass
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 20 GitHub stars
Code Fail
- rm -rf — Recursive force deletion command in evals/safety/run.py
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Milyonus Agent 5.5: open-source, self-improving autonomous agent with a verified-memory core. Cannot be poisoned, cannot forget, cannot skip missions. Remembers. Verifies. Evolves.
✦ Agent 5.5 — Remembers. Verifies. Evolves.
An open-source, self-improving autonomous agent with a verified-memory core —
it closes the biggest gap in self-evolving agents: who wrote this memory, and was it checked?
Table of contents
- Why Milyonus
- Quick start
- Talk to it from anywhere
- Verified memory — the core idea
- Memory as a security boundary
- Skills — procedural memory
- Security model
- Self-modification
- Connecting MCP servers
- Cross-session user model
- Architecture
- Benchmarks
- CLI reference
- Deployment
- Development
- Roadmap
- License & trademark
Why Milyonus
Most agents start from zero every session. The ones that do remember tend to
believe whatever gets written to memory — which makes them easy to poison.
Milyonus keeps the learning loop (persistent memory + self-authored skills) but
makes every memory earn its place.
| Typical self-evolving agent | Milyonus | |
|---|---|---|
| Memory write | Agent writes directly | Ingest → Quarantine → Verify → Promote |
| Provenance | Not tracked | Every line: who · from where · which turn · what evidence |
| Poison cleanup | Manual | memory revoke --source <uri> cascades in seconds |
| Rejected ideas | Forgotten (rephrase slips through) | Negative memory + rephrase detection |
| Memory in prompt | Injected as text | Rendered in a data fence — "not instructions" |
| Promoted memory | Trusted forever | Trust decays — must be re-earned or it's demoted (a security boundary, not undo) |
| Reaffirming a memory | Unlimited / free | Rate-limited + diminishing returns; only an operator-signed reaffirm restores full trust |
| Operator authority (T0) | "message says I'm the operator" | Ed25519-signed, out-of-band, two-phase — unforgeable from any text |
| Semantic recall | Cosine only — a lie rides similarity to the top | Trust-weighted (cosine × trust) — a low-trust match can't outrank a trusted one |
| Cross-session user model | LLM-inferred, trusted on write (poisonable) | Verified-growth + per-user scoped — every self-fact passes the pipeline |
| External tools (MCP) | Trusted subprocess, full env | Untrusted: filtered env, redacted output, RiskEngine-gated |
| Autonomy | "Act first" (risk multiplier) | Risk-tiered: reversible → auto, irreversible → always confirm |
| Self-modification | — | Open core, gated by git snapshot + test + rollback |
Measured on the built-in PoisonBench: single-shot held-out ASR 0% · RSR 0% · 100% legitimate promotion, plus 10/10 multi-step attack scenarios contained (patient · distributed · T0-spoof · semantic · negative) — see docs/benchmarks.md.
Quick start
# 1. install uv (https://astral.sh/uv)
curl -LsSf https://astral.sh/uv/install.sh | sh
# 2. install Milyonus
uv tool install milyonus-agent # or: git clone && uv sync
# 3. configure and run
milyonus setup # pick a provider
milyonus doctor # verify the environment
milyonus # start an interactive session
Put your key in ~/.milyonus/.env (mode 600 — milyonus doctor checks this):
echo 'ANTHROPIC_API_KEY=sk-ant-...' > ~/.milyonus/.env && chmod 600 ~/.milyonus/.env
Multi-provider: Anthropic (default, most poisoning-resistant), OpenAI,
OpenRouter, and local (Ollama / vLLM).
Talk to it from anywhere
The same agent core runs behind six surfaces, all default-deny with in-chat approval:
| Surface | Transport | Setup |
|---|---|---|
| 🖥️ CLI / TUI | terminal | milyonus |
| ✈️ Telegram | Bot API (long-poll) | milyonus gateway start --channel telegram |
| Cloud API (webhook) | milyonus gateway start --channel whatsapp |
|
| 🟣 Slack | Events API (webhook) | milyonus gateway start --channel slack |
| 🎮 Discord | Gateway (WebSocket) | milyonus gateway start --channel discord |
| 📝 Editor (ACP) | stdio / JSON-RPC | milyonus acp (Zed, …) |
How pairing works (every messaging channel)
Channels are default-deny: an unknown user is refused until paired. You
generate a one-time code and the user redeems it in chat.
milyonus gateway pair telegram # → prints an 8-char code (valid 1 hour)
milyonus gateway start --channel telegram
# then, in the chat: /pair <code> → "pairing successful"
Codes are crypto-random, expire in 1 hour, rate-limited (1/10 min), and lock out
after 5 failed attempts. Secrets always live in ~/.milyonus/.env (chmod 600).
Connecting each channel
✈️ Telegram — Bot API, easiest to set up- In Telegram, message @BotFather →
/newbot→ get a token. - Add it to your env:
echo 'TELEGRAM_BOT_TOKEN=123456:AA...' >> ~/.milyonus/.env && chmod 600 ~/.milyonus/.env - Pair and start:
milyonus gateway pair telegram # → a code milyonus gateway start --channel telegram - Open your bot, press Start, send
/pair <code>, then chat normally.
You need a Meta developer app with WhatsApp added (phone-number id + a permanent token).
- Put the credentials in
~/.milyonus/.env:WHATSAPP_TOKEN=EAAG... # Graph API token WHATSAPP_PHONE_NUMBER_ID=1234567890 WHATSAPP_VERIFY_TOKEN=some-random-string # you choose this WHATSAPP_APP_SECRET=... # optional but recommended (HMAC verify) - Start the gateway (it serves the webhook):
milyonus gateway start --channel whatsapp --port 8080 - Expose the port over HTTPS (reverse proxy, or a tunnel like cloudflared/ngrok
for testing) and register that public URL as the webhook in the Meta app,
using the sameWHATSAPP_VERIFY_TOKEN. Subscribe to the messages field. - Message the number, then
/pair <code>(frommilyonus gateway pair whatsapp).
🟣 Slack — Events API (webhook)The unofficial whatsapp-web.js/Baileys bridge risks account bans and is not
shipped. Details: docs/whatsapp.md.
- Create a Slack app, add a bot token scope, install to the workspace, and copy
the Bot User OAuth Token and the Signing Secret:SLACK_BOT_TOKEN=xoxb-... SLACK_SIGNING_SECRET=... - Start the gateway (serves the webhook):
milyonus gateway start --channel slack --port 8080 - Expose the port over HTTPS and set the Event Subscriptions request URL to
https://your-host/. Slack sends a one-time challenge (handled automatically),
then subscribe tomessage.channels/message.imevents. - DM the bot (or invite it to a channel), then
/pair <code>.
🎮 Discord — Gateway (WebSocket)Requests are signature-verified with a 5-minute replay window when
SLACK_SIGNING_SECRETis set.
- Install the optional dependency:
pip install milyonus-agent[discord] - Create a Discord application → Bot → copy the token. Under Privileged
Gateway Intents, enable MESSAGE CONTENT INTENT.echo 'DISCORD_BOT_TOKEN=...' >> ~/.milyonus/.env - Invite the bot to your server (OAuth2 URL with the
botscope). - Start it and pair:
milyonus gateway start --channel discord # in Discord: /pair <code>
Point your editor's ACP agent config at the milyonus acp command:
command: milyonus
args: ["acp"]
Milyonus then serves newline-delimited JSON-RPC on stdio (initialize / session.new
/ session.prompt with streaming). Your provider key is read from ~/.milyonus/.env
as usual. Details: docs/acp.md.
Full production hardening: docs/production.md.
✦ Verified memory — the core idea
Milyonus has no direct-write path to durable memory. Every candidate flows
through a pipeline before it is trusted:
memory candidate
│
▼
┌──────────┐ ┌─────────────┐ ┌──────────────────────┐ ┌──────────┐
│ Ingest │──▶│ Quarantine │──▶│ Verify │──▶│ Promote │
│ │ │ + provenance│ │ scanner + verifier │ │ (ledger) │
└──────────┘ └─────────────┘ │ model + tier rules │ └──────────┘
└──────────┬───────────┘
│ reject
▼
negative memory
(rephrase detection)
Trust tiers decide how a claim is promoted:
| Tier | Source | Rule |
|---|---|---|
| T0 | operator config | permanent, agent can't change |
| T1 | paired user, direct | promote instantly if it passes the scanner |
| T2 | agent first-hand observation | verifier approval |
| T3 | third-party (web, email, group) | 2 independent confirmations + verifier; else expires |
| T4 | subagent / unknown | never auto-promotes — user approval only |
Every line is provenance-stamped and recorded on a hash-chained ledger.
Ask it anything:
milyonus memory why <id> # full provenance chain + evidence hash
milyonus memory revoke --source https://bad.example # cascade in seconds
milyonus memory diff --since 7d
milyonus audit verify # ledger integrity intact?
Memory reaches the prompt inside a <milyonus:memory> data fence with an
explicit rule that it is past observation, not instruction — imperatives inside
memory are never executed.
✦ Memory as a security boundary
Source and verification decide what gets in. But a memory that slipped through
once — or that was legitimate yesterday — must not silently become tomorrow's
default. So Milyonus treats promotion as a standing security boundary, not an
undo feature: trust is continuously re-earned, and unrenewed trust falls on its
own. This is the gap Hermes/OpenClaw leave open — "an instruction written once
stays the default forever."
Trust decays — promotion is time-boxed, not permanent belief.
| Tier | Source | Half-life |
|---|---|---|
| T0 | operator (signed) | never — authority, not a claim |
| T1 | paired user, direct | ~180 days |
| T2 | agent observation | ~60 days |
| T3 | third-party | ~14 days |
Trust halves each half-life since it was last reaffirmed. When it falls below the
floor, the nightly consolidation demotes it back to quarantine (re-validatable,
not deleted) — so it drops out of the agent's defaults until a human re-earns it:
milyonus memory why <id> # trust: 0.41 (ceiling 0.80, reaffirmed 2×)
milyonus memory reaffirm <id> # weak human reaffirm — diminishing returns
milyonus memory reaffirm <id> --sign ~/operator-key.pem # strong: restores 1.00
milyonus memory review # what the boundary flagged: demoted / due / anomalous
milyonus memory stats # tier & sensitivity mix + false-positive recovery rate
Reaffirmation is a human-only action (the agent has no reaffirm tool — it
cannot infer "the user still agrees"), and it resists patient attackers, not
just loud ones:
- Rate-limited — a flood of manipulative messages can't keep resetting the clock.
- Diminishing returns — repeated weak reaffirms restore less each time (a
falling trust ceiling); only a strong, operator-signed reaffirm restores full
trust. Weak repetition alone can never hold a memory at 1.00 forever. - Sensitivity-aware decay — memory that touches authority, access, or approval
("the agent may deploy without confirmation") decays ~4× faster than a taste
preference, so a stale security fact expires long before a stale UI setting. - Not silent — every auto-demotion and reaffirm anomaly surfaces in
memory review, andmemory statsreports the false-positive rate so decay that's
too aggressive is visible, not guessed at.
T0 is an authenticated, out-of-band boundary — unforgeable from any text.
The operator tier can never be minted by something the model reads (a chat
message, a file, a tool result). A T0 write is bound to an Ed25519 signature
whose private key lives off the agent host, and it takes two AND-layered
phases — a signed stage, then a second signature and a mandatory review gap —
before it becomes a default:
milyonus admin keygen --private ~/operator-key.pem # private key stays off-host
milyonus admin t0 add "Deploys only from CI" --key ~/operator-key.pem # staged (passive)
milyonus admin t0 activate <id> --key ~/operator-key.pem # 2nd sig + review gap
Even a full host compromise can verify but never forge T0. Details:
docs/operator.md.
Semantic recall — trust-weighted, never a poison amplifier.
Durable memory is also indexed as vectors, so the agent recalls by meaning, not
substring: "where does the user live" finds "he's based in Istanbul." The layer is
pluggable and dependency-free by default — a hashing (lexical-vector) embedder
that needs no model or network — and switches to real embeddings with one config
line (embedder = "openai").
Crucially, recall ranks by cosine × current_trust, not cosine alone. A
semantically perfect match sitting in a decayed or low-trust memory can never
outrank a trusted one, so wording a poisoned line to match the query buys an
attacker nothing — the trust boundary still leads. Recall is strictly read-only;
embeddings only index what the pipeline already promoted.
milyonus memory search "which editor" # trust-weighted semantic recall
milyonus memory reindex # (re)build vectors after switching embedder
✦ Skills — procedural memory
The agent loads on-demand instruction docs (agentskills.io-compatible) and
writes its own from experience. Unlike other agents, a generated skill is
verified, not trusted on write: it must pass a reproducibility gate + security
scanner before it goes live.
41 official skills ship bundled — ready on first install:
git · github-cli · docker · docker-compose · kubernetes · pytest · uv · ripgrep
jq · sqlite · postgres · pandas · csv · ffmpeg · imagemagick · tar · ssh · cron
systemd · curl · bash · regex · markdown · env-secrets · web-scraping · pdf
github-actions · terraform · aws-cli · fastapi · playwright · security-audit
rag-retrieval · prompt-engineering · debugging · observability
cold-email · linkedin-outreach · lead-generation · outreach-sequencing · email-deliverability
milyonus skills list # browse
milyonus skills view git-workflow
milyonus skills why <name> # provenance: official | self-learned | hub
✦ Security model
Defense-in-depth, on by default:
- Risk-tiered approval — reversible/local runs automatically; irreversible or
outward-reaching actions always confirm, and no "always allow" can cover that class. - DM pairing — 8-char crypto codes, 1h TTL, rate limit, lockout,
chmod 600. - Sandbox —
local · docker · ssh · modal · daytona; hardened container image. - Credential filtering — secrets stripped from subprocess env, redacted from output.
- Injection scanning — memory candidates and context files (
AGENTS.md,.cursorrules, …) scanned before they can reach the prompt. - SSRF — always-on, fail-closed; blocks private/loopback/link-local/cloud-metadata.
- Pre-exec scanning + audit — fork bombs,
rm -rf /,curl | bashblocked;
every action hash-chained in the ledger.
SafetyRegressionsuite: 0 findings.
✦ Self-modification
The core is open and the agent can edit its own code — nothing blocks it.
Safety comes from reversibility, not prohibition:
snapshot (git) → agent edits → pytest gate → ✅ keep / ❌ auto-rollback
milyonus selfmod log
milyonus selfmod rollback [--to <tag>]
✦ Connecting MCP servers
Milyonus is an MCP client: declare any Model Context Protocol server inconfig.toml and its tools appear to the agent, namespaced mcp_<name>_<tool>.
[[mcp_servers]]
name = "github"
command = ["npx", "-y", "@modelcontextprotocol/server-github"]
enabled = true
risk = "caution" # every tool gated by the RiskEngine
env_passthrough = ["GITHUB_TOKEN"] # grant just this server its key
External servers are treated as untrusted subprocesses: the child gets a
filtered environment (secret-looking vars are stripped unless you name them
in env_passthrough), their output is redacted, and their tools default tocaution so side effects hit the same approval path as everything else. A server
that fails to start is reported and skipped — it never blocks the session or
the other servers.
milyonus mcp list # configured servers
milyonus mcp tools [name] # connect and list what each exposes
milyonus mcp example # a ready-to-paste config block
✦ Cross-session user model
The agent keeps a persistent, evolving representation of each user that survives
across sessions — preferences, facts, patterns — in the spirit of Honcho's
"theory of mind." Milyonus closes that idea's biggest hole: a freely-written,
LLM-inferred user model is a poisoning target. So here the user model is the
verified-memory store, scoped to one user:
- Grows through the pipeline. At session end the agent reflects on the user's
own messages and proposes durable self-facts — each is quarantined and
promoted only if it passes verification. Nothing about who the user "is" is
trusted on write, so a manipulative message can't rewrite it. - Scoped per user. Reads are filtered by provenance, so in a multi-user
gateway one person's model never leaks into another's session — real isolation,
not just focus. - Decays. It rides the same items, so the trust-decay boundary applies: a
stale claim about the user falls out until reaffirmed.
The agent has a user_recall tool for a dialectic query — "what do we know
about this user re: X" — trust-weighted and user-scoped. From the CLI:
milyonus user show # the durable, trust-ranked model
milyonus user ask "editor" # dialectic query
milyonus user observe "prefers dark mode" # propose (verified, not written)
Architecture
┌──────────────────────────────────────────────────────────────┐
│ SURFACES CLI/TUI · Telegram · WhatsApp · Slack · Discord · ACP │
├──────────────────────────────────────────────────────────────┤
│ CORE AgentLoop · PromptBuilder · Budget · ProviderRouter │
│ (anthropic | openai | local) │
├──────────────────────────────────────────────────────────────┤
│ CAPABILITY ToolRegistry · Skills · MCP client · Delegation │
├──────────────────────────────────────────────────────────────┤
│ MEMORY ★ Ingest→Quarantine→Verify→Promote · Ledger │
│ SessionStore(FTS5) · NegativeMemory · Revocation │
├──────────────────────────────────────────────────────────────┤
│ SECURITY RiskEngine · Approval · Sandbox · SSRF · Redaction │
│ InjectionScanner · PreExecScanner · AuditLog │
├──────────────────────────────────────────────────────────────┤
│ INFRA SQLite/WAL · strict ConfigSchema · Telemetry(opt) │
└──────────────────────────────────────────────────────────────┘
Benchmarks
Reproducible, in-repo. Run them yourself:
uv run python -m evals.poisonbench.run # memory-poisoning resistance
uv run python -m evals.safety.run # approval-bypass regression
| Suite | Metric | Milyonus | Reference |
|---|---|---|---|
| PoisonBench | Attack Success Rate | 0.0% | Hermes 66.67% |
| PoisonBench | Retention/Success Rate | 0.0% | Hermes 64.70% |
| PoisonBench | Legitimate promotion | 100% | — |
| SafetyRegression | Approval bypasses | 0 | — |
Details and methodology: docs/benchmarks.md ·
docs/comparison.md.
CLI reference
milyonus interactive session
milyonus setup first-run wizard
milyonus doctor environment diagnostics
milyonus memory list | pending | why | diff | revoke | search | reaffirm | review | stats | reindex | consolidate
milyonus mcp list | tools | example # external MCP servers
milyonus user show | ask | observe # cross-session user model
milyonus skills list | view | why
milyonus audit verify | log
milyonus gateway start | pair
milyonus selfmod log | rollback
milyonus cron add | list | remove # scheduled tasks (NL/cron/interval)
milyonus proactive start | suggest # run the scheduler; suggest automations
milyonus research "<question>" # deep web research → a cited report
milyonus eval run | tasks # task-level evaluation + cost/observability
milyonus acp run as an editor agent (ACP)
Deployment
# hardened container (non-root, read-only rootfs via compose, cap-drop)
docker run --rm -it -v milyonus-data:/data milyonus/agent:5.5.0 doctor
# production gateway on a VPS
docker compose -f deploy/compose.yaml up -d
Guides: docs/docker.md · docs/production.md
· docs/publishing.md.
Development
make sync # deps (matches CI: dev + admin + discord)
make hooks # enable pre-push gate (runs the CI checks locally)
uv run pytest -q # 269 tests, green without an API key
make check # lint + format-check + test — exactly what CI runs
make check mirrors CI one-for-one (ruff check · ruff format --check ·pytest); make hooks wires it into a pre-push hook so a push can't go out red
(bypass with git push --no-verify).
Extend Milyonus through the skill, tool, or channel adapter interfaces
— the verified-memory core stays small and auditable. See
CONTRIBUTING.md and SECURITY.md.
Roadmap
- Verified-memory core · trust tiers · ledger · revocation
- Agent-authored skills + 26 bundled
- 6 surfaces (CLI, Telegram, WhatsApp, Slack, Discord, ACP)
- Self-modification harness · subagent delegation · MCP client + server config
- Hardened Docker · automated PyPI + Docker Hub release
- Task-level evaluation & observability (success, tools, tokens, cost)
- Proactivity: scheduler (NL→cron), safety policy, automation suggestions
- Integrations: email (IMAP/SMTP), browser (Playwright), vision (image input)
- Deep web research (keyless search → cited synthesis) + outreach skills
- Memory as a security boundary: trust decay + signed out-of-band T0
- Vector/embedding layer for memory: trust-weighted semantic recall (hashing default, opt-in OpenAI)
- Honcho-style cross-session user model — per-user scoped, verified-growth, dialectic recall
- PoisonBench v3: multi-step scenarios (patient / distributed / T0-spoof / semantic), pinned as a regression gate
- Like-for-like Hermes harness + third-party audit
License & trademark
Apache-2.0 — see LICENSE. "Milyonus" and the star mark are
trademarks; the code license does not grant rights to the name or marks. See
TRADEMARK.md. Forks should adopt a distinct name and replace the
assets in assets/brand/.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found