Skip to content

magnetoid/janus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

235 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

     β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•
     β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆ   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘
β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
 β•šβ•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•
The AI agent that gets better every time you use it Β· by Cloud Industry

Janus Agent

Documentation Discord License: MIT Built by Cloud Industry δΈ­ζ–‡

Every other AI agent is an amnesiac.

It forgets your project the moment the session ends, repeats yesterday's mistakes, and never gets any smarter no matter how much you use it.

Janus is different. Janus compounds.

It remembers who you are across every conversation. It turns each failure into a lesson it recalls before the next similar task. It writes reusable skills from work that went well. It measures whether it's actually improving β€” with real benchmarks, not vibes. And, uniquely, it can propose careful improvements to its own skills and prompts, prove they help on an eval suite, and β€” with your approval β€” rewrite itself to be better tomorrow than it was today.

Point it at a $5 VPS. Talk to it from Telegram while it works on a cloud VM. Watch it get sharper, week over week.


🧠 The one thing no other agent does: it learns

Janus ships a closed self-improvement loop β€” the machinery that turns raw experience into durable, measurable capability. Flip it on with a single command:

janus learning enable

…and from that moment your agent starts to accumulate:

  • πŸ““ Lessons from its own mistakes. A failed task is distilled into one transferable "do X instead" lesson β€” and automatically surfaced the next time a similar task comes up, so the same mistake doesn't happen twice.
  • πŸ› οΈ Skills from its own successes. Multi-step work that worked becomes a reusable, self-testing skill draft for your review β€” the agent literally writes new abilities for itself.
  • 😴 Sleep-time consolidation. While idle, it re-reads recent sessions, merges what it learned, retires contradictions, and prunes noise β€” the same "consolidate offline" trick that cuts inference cost and lifts accuracy.
  • 🎯 A memory of you. Facts, preferences, and a deepening user model that carries across Telegram, the terminal, and every other surface β€” searchable by meaning, not just keywords.
  • πŸ“ˆ Proof it's working. A longitudinal eval learning curve, a saturation-proof time-horizon score (the longest task it can reliably do), and a fail-closed regression gate that freezes self-modification the moment quality slips. Improvement you can graph β€” not a marketing claim.

experience β†’ lesson β†’ recall β†’ better behavior β†’ measured β†’ governed β†’ repeat

And the part that sounds like science fiction (but ships today, safely)

Governed self-code-improvement. Janus can propose variants of its own skills, prompts, and policies, run them against its eval suite in an isolated sandbox, and promote only the ones that measurably help. Every promotion is quadruple-gated β€” it must not regress the evals, the health governor must be green, the spend/safety floor must be clear, and a human must approve it β€” it can never touch core code, and every change is fully reversible. This is the Darwin-GΓΆdel-Machine idea from the research frontier, wrapped in a cage strong enough to actually run.

janus self-improve list      # review what the agent wants to change about itself
janus self-improve show <id> # see the diff + the eval evidence
janus self-improve promote   # apply it β€” only if every gate is green

Off by default. Gated behind learning.self_improve.enabled and human approval. Because an agent that edits itself should have to earn that trust.


⚑ What it can do for you

πŸ’¬ Lives where you already are

Telegram, Discord, Slack, WhatsApp, Signal, email, and a gorgeous terminal UI β€” all from one gateway process. Send a voice memo from your phone; it transcribes and acts. Start a thread on your laptop, continue it from Telegram on the train. Your agent isn't trapped in a browser tab.

🌍 Runs anywhere, costs almost nothing

A $5 VPS, a GPU cluster, or serverless infrastructure that hibernates when idle and wakes on demand. Six terminal backends β€” local, Docker, SSH, Singularity, Modal, Daytona. Your agent's whole environment can sleep between sessions and cost you cents.

πŸ”€ Any model, zero lock-in

Cloud Industry Portal, OpenRouter (200+ models), NVIDIA NIM, z.ai/GLM, Kimi, MiniMax, Hugging Face, OpenAI, or your own endpoint. Switch with janus model β€” no code changes. And it learns which model is best for which kind of task, then routes cheap work to cheap models and hard work to strong ones.

🧭 Delegates and parallelizes

Spawns isolated subagents for parallel workstreams and folds their results back in. Writes Python that calls tools over RPC, collapsing multi-step pipelines into a single zero-context-cost turn. Big jobs fan out; you get one clean answer.

⏰ Works while you sleep

A built-in cron scheduler runs tasks unattended and delivers results to any platform β€” daily reports, nightly backups, weekly research digests, all described in plain English. It even holds a long-term north-star goal and checks in on your progress weekly.

πŸ›‘οΈ Safe enough to leave running

Rolling USD spend caps and a master kill switch gate every unattended action, so an autonomous run can't run away with your money. Command approval, container isolation, and DM pairing keep the blast radius small. Turn it loose without holding your breath.

πŸš€ Quick Install

Janus installs from source. (Hosted one-line installers will follow once Cloud Industry has install hosting.)

Linux, macOS, WSL2, Termux

git clone https://github.com/magnetoid/janus.git
cd janus
./setup-janus.sh

setup-janus.sh installs uv, creates the venv, installs the .[all] extra, and symlinks janus into ~/.local/bin. (Paste the commands one per line β€” don't append a # comment after ./setup-janus.sh, as interactive zsh treats the unquoted .[all] as a glob and aborts with no matches found.)

On Termux, install the curated .[termux] extra instead of .[all] (the full extra pulls Android-incompatible voice dependencies):

git clone https://github.com/magnetoid/janus.git && cd janus
uv venv .venv --python 3.11 && source .venv/bin/activate
uv pip install -e ".[termux]"

Windows (native, PowerShell)

git clone https://github.com/magnetoid/janus.git
cd janus
uv venv .venv --python 3.11
.\.venv\Scripts\Activate.ps1
uv pip install -e ".[all]"

🎬 Getting Started

Two minutes from clone to a conversation that remembers you:

janus                # Interactive CLI β€” start a conversation
janus model          # Choose your LLM provider and model
janus learning enable # ✨ Turn on the self-improving loop
janus setup          # Full setup wizard β€” configures everything at once
janus gateway        # Start the messaging gateway (Telegram, Discord, …)
janus tools          # Configure which tools are enabled
janus doctor         # Diagnose any issues
janus update         # Update to the latest version

πŸ“– Full documentation β†’


πŸ”¬ The self-improving loop, in detail

Everything above is real, on by default once you run janus learning enable, and β€” crucially β€” measurable. Each row is a command you can run today.

Capability What it does Try it
Lesson recall Failed tasks become transferable lessons that are auto-injected into the next similar task β€” mistakes stop repeating. auto on failure Β· recall_lessons tool
Lesson efficacy Each recalled lesson is scored by whether the sessions it rode with succeeded; helpful ones rise, unhelpful ones sink. automatic
Skill mining Distills reusable skills (SKILL.md + script) from multi-step work that succeeded β€” for your review. janus skills mine
Sleep consolidation Offline, idle-time processing graduates facts + skills, retires contradictions, and prunes noise. janus sleep --now
Measurable improvement A pass-rate learning curve, per-eval pass^k reliability with a noise floor, and forward/backward-transfer + forgetting metrics. janus evals trend Β· janus learning stats
Time-horizon KPI The longest task (in human-minutes) the agent reliably passes β€” a saturation-proof score that keeps rising as it grows. janus evals horizon
Regression gate A fail-closed CI/cron gate that fails the moment a behavior regresses β€” and freezes self-modification with it. janus evals gate
Learned routing Learns which model wins per task category from real outcomes and cost, then routes accordingly (cheap for easy, strong for hard, an ensemble for the hardest). janus consensus route "…"
Hybrid memory recall Fuses keyword (BM25) and semantic search so a paraphrase with zero shared words still finds the right memory. automatic (optional embeddings)
Dialectic deliberation An advocate and a skeptic argue, an arbiter rules β€” and it tells you when a question is genuinely frame-dependent instead of faking confidence. deliberate tool (moa toolset)
Red-team learning gate Mined facts/skills must survive an advocate/skeptic/arbiter exchange before they're learned β€” bad input is filtered at the door. learning.dialectic.enabled: true
Governed self-improvement Proposes, eval-tests, and β€” with your approval β€” promotes improvements to its own skills/prompts/policies. Never core code. Fully reversible. janus self-improve list
Safety floor Rolling daily/monthly spend caps + a master freeze switch gate every autonomous action. janus autonomy status Β· janus autonomy freeze
Aspirations & interests Holds a long-term goal and checks in weekly; tracks a field and researches it on a schedule, asking before it learns. janus aspire set "<goal>" Β· janus interest add "<field>"

The slash variants (/memory, /aspire, /interest, …) work from the messaging gateway and the TUI too.


πŸ”‘ Skip the API-key scavenger hunt β€” Cloud Industry Portal

Janus works with whatever provider you want β€” that's not changing. But if you'd rather not collect five separate API keys for the model, web search, image generation, TTS, and a cloud browser, Cloud Industry Portal covers all of them under one subscription:

  • 300+ models β€” pick any with /model <name>
  • Tool Gateway β€” web search (Firecrawl), image generation (FAL), text-to-speech (OpenAI), cloud browser (Browser Use) β€” all routed through your sub. No extra accounts.

One command from a fresh install:

janus setup --portal

That logs you in via OAuth, sets the provider, and turns on the Tool Gateway. Check what's wired up any time with janus portal info. You can still bring your own keys per-tool whenever you want β€” the gateway is per-backend, not all-or-nothing.


πŸ“Ÿ CLI vs Messaging β€” quick reference

Two entry points: start the terminal UI with janus, or run the gateway and talk to it from Telegram, Discord, Slack, WhatsApp, Signal, or Email. Once you're in a conversation, most slash commands are shared.

  • Professional minimal CLI with a data-driven skin engine β€” /skin classic restores the pre-redesign look, /skin list shows all themes.
Action CLI Messaging platforms
Start chatting janus janus gateway setup + janus gateway start, then message the bot
Start fresh conversation /new or /reset /new or /reset
Change model /model [provider:model] /model [provider:model]
Set a personality /personality [name] /personality [name]
Retry or undo the last turn /retry, /undo /retry, /undo
Compress context / check usage /compress, /usage, /insights /compress, /usage, /insights
Browse skills /skills or /<skill-name> /<skill-name>
Interrupt current work Ctrl+C or send a new message /stop or send a new message

For the full command lists, see the CLI guide and the Messaging Gateway guide.


πŸ“š Documentation

Section What's Covered
Quickstart Install β†’ setup β†’ first conversation in 2 minutes
CLI Usage Commands, keybindings, personalities, sessions
Configuration Config file, providers, models, all options
Messaging Gateway Telegram, Discord, Slack, WhatsApp, Signal, Home Assistant
Security Command approval, DM pairing, container isolation
Tools & Toolsets 40+ tools, toolset system, terminal backends
Skills System Procedural memory, Skills Hub, creating skills
Memory Persistent memory, user profiles, best practices
MCP Integration Connect any MCP server for extended capabilities
Cron Scheduling Scheduled tasks with platform delivery
Architecture Project structure, agent loop, key classes
The AGI roadmap The full self-improvement design + research grounding

πŸ“¦ Migrating an existing install

Coming from an older ~/.hermes install or from OpenClaw? Janus imports your config, memory, skills, sessions, and keys β€” non-destructively.

janus migrate hermes         # Import ~/.hermes into ~/.janus (add --dry-run to preview)
janus claw migrate           # Import an OpenClaw install (settings, memories, skills, keys)

janus setup also auto-detects both during first-time setup and offers to migrate before configuration begins. Top-level directories are merged (new files copied in, existing kept); Nous Hermes model IDs and the nous provider slug are preserved so your model config keeps working. See janus migrate hermes --help / janus claw migrate --help for all options.


🀝 Contributing

We welcome contributions! See the Contributing Guide for setup, code style, and PR process.

git clone https://github.com/magnetoid/janus.git
cd janus
./setup-janus.sh          # installs uv, venv, .[all], symlinks ~/.local/bin/janus
./janus                   # auto-detects the venv β€” no need to `source` first
scripts/run_tests.sh      # run the test suite the way CI does

Manual path: uv venv .venv --python 3.11 && source .venv/bin/activate && uv pip install -e ".[all,dev]".


🌐 Community


πŸ“„ License

MIT β€” see LICENSE. Built with obsessive care by Cloud Industry.

Most agents forget. Janus remembers, learns, and rewrites itself to do better. Give it a week and see the difference.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors