Skip to content

YINDEEINDY/MYJarvis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– MYJarvis

Personal AI Operating System โ€” built on Claude Code Max

A self-hosted, multi-channel personal AI that knows you deeply, learns autonomously, and runs 24/7 โ€” all without per-message API costs.


โœจ What makes MYJarvis different

๐Ÿง  Claude Opus 4.7 (1M context)    via Claude Code Max โ€” $0 per message
๐Ÿค Knows you deeply                 600+ word personality profile, auto-extracted
๐Ÿ’ญ Self-improving                    Reflexion loop nightly โ€” learns from mistakes
๐Ÿ›๏ธ 8-perspective Council            Multi-angle deliberation in 1 LLM call
๐Ÿ“ก Multi-channel                     Telegram + Web + CLI (voice next)
๐Ÿ”Œ MCP-native                        Custom + official MCP servers
๐Ÿ›ก๏ธ Trust gates                       4-level safety (auto / approve / confirm / block)
๐Ÿ”„ 24/7 daemon                       systemd auto-restart + watchdog self-heal
๐Ÿ“Š Pattern detection                 Insight Layer finds behaviors you don't notice
๐ŸŽฏ Goal tracking                     Long-term life goals with progress
๐Ÿ“š Persistent memory                 SQLite + auto fact-extraction + dedup

๐Ÿ—๏ธ Architecture (5 Layers)

INTERFACE       Telegram | Web UI | CLI | (Voice future)
                              โ†•
HARNESS         Tier 0/1 prompts ยท Smart routing ยท Importance gate
                              โ†•
BRAIN           โ˜… claude -p subprocess (Max plan, $0 extra)
                              โ†•
MEMORY          SQLite + FTS5 search ยท Personality profile ยท Goals ยท Reflexion lessons
                              โ†•
ACTION          MCP servers (filesystem ยท memory ยท time ยท custom)
                              โ†•
DEFENSE         Watchdog ยท Trust gates ยท Auto-restart ยท Audit trails

๐Ÿ“ Project Layout

myjarvis/
โ”œโ”€โ”€ ๐Ÿง  brain/               (16 modules โ€” 2,500+ lines)
โ”‚   โ”œโ”€โ”€ spawn_claude.py     subprocess wrapper for claude -p
โ”‚   โ”œโ”€โ”€ personality.py      dynamic system prompt + facts
โ”‚   โ”œโ”€โ”€ importance_gate.py  Haiku-based 1-5 scoring
โ”‚   โ”œโ”€โ”€ router.py           tier classification
โ”‚   โ”œโ”€โ”€ agent.py            pipeline orchestrator
โ”‚   โ”œโ”€โ”€ council.py          8-perspective deliberation
โ”‚   โ”œโ”€โ”€ reflection.py       Reflexion self-critique
โ”‚   โ”œโ”€โ”€ insights.py         pattern detection
โ”‚   โ”œโ”€โ”€ trust.py            4-level safety gates
โ”‚   โ”œโ”€โ”€ status.py           dashboard
โ”‚   โ”œโ”€โ”€ routines.py         scheduled tasks
โ”‚   โ”œโ”€โ”€ scheduler.py        cron-style runner
โ”‚   โ”œโ”€โ”€ watchdog.py         self-healing health checks
โ”‚   โ”œโ”€โ”€ rate_limiter.py     Max plan budget tracker
โ”‚   โ”œโ”€โ”€ goals.py            long-term goals
โ”‚   โ””โ”€โ”€ onboarding.py       deep introspection
โ”‚
โ”œโ”€โ”€ ๐Ÿ’พ memory/
โ”‚   โ”œโ”€โ”€ store.py            SQLite (conversations, facts, sessions)
โ”‚   โ”œโ”€โ”€ search.py           FTS5 full-text search
โ”‚   โ””โ”€โ”€ export_import.py    backup/restore JSON
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ก channels/
โ”‚   โ”œโ”€โ”€ cli_chat.py         terminal interface
โ”‚   โ”œโ”€โ”€ telegram_bot.py     Telegram (aiogram)
โ”‚   โ””โ”€โ”€ web_ui.py           FastAPI + admin dashboard
โ”‚
โ”œโ”€โ”€ ๐Ÿ”Œ mcp_servers/
โ”‚   โ”œโ”€โ”€ example/            template for custom MCPs
โ”‚   โ”œโ”€โ”€ kruai/              business integration (DB-ready)
โ”‚   โ”œโ”€โ”€ shopdesc/           SaaS integration (DB-ready)
โ”‚   โ””โ”€โ”€ jarvis_self/        self-introspection
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ฆ deploy/
โ”‚   โ”œโ”€โ”€ jarvis.service      systemd unit
โ”‚   โ”œโ”€โ”€ cloudflared.service public tunnel
โ”‚   โ””โ”€โ”€ README.md           server deployment guide
โ”‚
โ””โ”€โ”€ main.py                 master orchestrator

๐Ÿš€ Quick Start (Local)

Requirements

  • Python 3.11+
  • Claude Code Max subscription (already authenticated via claude CLI)
  • Telegram bot token (from @BotFather, optional)

Setup

git clone https://github.com/YINDEEINDY/MYJarvis.git
cd MYJarvis

# Install Python deps
pip install -r requirements.txt

# Copy config template
cp config/.env.example config/.env
# Edit config/.env โ€” add TELEGRAM_BOT_TOKEN and TELEGRAM_ALLOWED_USER_ID

# Run
python main.py

Open http://localhost:8000 for chat UI, or http://localhost:8000/admin for dashboard.

CLI Mode (no setup)

python channels/cli_chat.py

Windows shortcuts

chat.bat               โ€” CLI chat
web.bat                โ€” Web UI
start.bat              โ€” Full stack (Telegram + Web + Scheduler)
install_autostart.bat  โ€” Auto-start on Windows login

๐ŸŒ Server Deployment

For 24/7 production deployment on Linux:

# See deploy/README.md for full guide
ssh user@your-server
sudo cp deploy/jarvis.service /etc/systemd/system/
sudo systemctl enable --now jarvis

Optional: public URL via Cloudflare Tunnel:

# Quick (random URL)
cloudflared tunnel --url http://localhost:8000

# Permanent (with domain)
cloudflared tunnel login
cloudflared tunnel create myjarvis
cloudflared tunnel route dns myjarvis jarvis.yourdomain.com

๐ŸŽฎ Commands

Command Description
/status Dashboard: messages, facts, cost
/facts Show all learned facts
/council <q> 8-perspective deliberation
/reflect Self-critique on recent conversations
/insights Detect behavioral patterns
/trust <action> Check action safety level
/search <q> Full-text search memory
/goals List active goals
/usage Rate limit status
/clear Reset session
/help List all commands

Available across all channels (CLI, Telegram, Web).


๐Ÿ”Œ Custom MCP Servers

Plug MYJarvis into anything. Example template at mcp_servers/example/server.py (~100 lines, no SDK required โ€” pure Python JSON-RPC over stdio).

Built-in:

  • filesystem โ€” read/write files (sandboxed)
  • memory โ€” Anthropic knowledge graph
  • sequential-thinking โ€” step-by-step reasoning
  • time โ€” date/time queries

User-customizable:

  • kruai / shopdesc โ€” business data integration (mock until you plug in DB)
  • jarvis_self โ€” MYJarvis introspects own state

๐Ÿงช What's Inside the Brain

Personality Profile (auto-built):

  • Identity, family, work projects
  • Values, decision style, energy patterns
  • Boundaries (what NOT to do)
  • Goals (short/medium/long term)
  • Communication preferences

Reflexion Loop (nightly):

  • "What went well today?"
  • "What did I miss?"
  • Extracts new facts โ†’ saves to memory
  • Updates personality based on user corrections

8-Perspective Council:

๐Ÿ›๏ธ CEO (strategic)         ๐Ÿ’ผ Business (ROI)
๐Ÿ”ง Engineer (practical)     ๐Ÿ›ก๏ธ Risk (paranoid)
๐ŸŽจ Creator (bold)           โค๏ธ Empath (emotional)
โš–๏ธ Critic (devil's advocate) ๐Ÿ“Š Analyst (data)

All 8 in one LLM call โ†’ synthesized recommendation.

Insight Layer: Detects patterns the user doesn't notice โ€” communication style, mood signals, recurring topics, blind spots.


๐Ÿ’ฐ Cost Model

Subscription:   $0 extra (uses Claude Code Max โ€” paid as you do)
Server:         Self-hosted (any Debian/Ubuntu box)
Marginal:       $0 per message (no API charges)
Optional:       Cloudflare ($0), domain ($10/yr for permanent URL)

Smart routing keeps Max plan rate limits sustainable:

  • Trivial messages โ†’ Haiku (cheap)
  • Normal โ†’ default
  • Complex โ†’ Opus extended thinking
  • Importance gate filters what's worth saving

๐Ÿ›ก๏ธ Safety

๐ŸŸข FULL_AUTO          Routine actions (read email, check status)
๐ŸŸก ASK_APPROVE        Medium stakes (send email, schedule meeting)
๐ŸŸ  ALWAYS_CONFIRM     High stakes (deploy prod, transfer money)
๐Ÿ”ด BLOCKED            Hard rules (rm -rf, drop database, leak secrets)

Plus: Trust Levels Drift Detection (weekly review of self-modifications)


๐Ÿ“Š Phase Progress

Phase 0  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Foundation
Phase 1  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Personality + Memory
Phase 2  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Council + Reflection + Insights
Phase 3  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Routines + MCPs + Self-heal
Phase 4  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Rate limit + Search + Goals + Telegram
Phase 5  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Server 24/7 (systemd)
Phase 6  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Public URL (Cloudflare Tunnel)
Phase 7  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Custom MCPs + Deep Profile

Future:  Voice (wake word + STT + Thai TTS)
         Smart Home (Home Assistant)
         Permanent URL via owned domain

๐Ÿ™ Inspired by


๐Ÿ“œ License

MIT โ€” See LICENSE


"My Jarvis โ€” a personal AI that doesn't replace me, but extends me. It remembers what I forget, sees patterns I miss, and works while I rest."

About

MYJarvis - Personal AI Operating System built on Claude Code Max. Self-improving, multi-channel, 24/7 personal AI with zero per-message cost.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors