MCPcopy
hub / github.com/Mirix-AI/MIRIX

github.com/Mirix-AI/MIRIX @v0.1.6 sqlite

repository ↗ · DeepWiki ↗ · release v0.1.6 ↗
2,541 symbols 11,404 edges 262 files 1,665 documented · 66%
README

Mirix Logo

MIRIX - Multi-Agent Personal Assistant with an Advanced Memory System

Your personal AI that builds memory through screen observation and natural conversation

Important Update: 0.1.6 (Main) vs 0.1.3 (Desktop Agent) Starting with 0.1.6, the main branch is a brand-new release line where Mirix is a pure memory system that can be plugged into any existing agents. The desktop personal assistant (frontend + backend) has been deprecated and is no longer shipped on main. If you need the earlier desktop application with the built-in agent, use the desktop-agent branch.

| 🌐 Website | 📚 Documentation | 📄 Paper | 💬 Discord


Key Features 🔥

  • Multi-Agent Memory System: Six specialized memory components (Core, Episodic, Semantic, Procedural, Resource, Knowledge) managed by dedicated agents
  • Screen Activity Tracking: Continuous visual data capture and intelligent consolidation into structured memories
  • Privacy-First Design: All long-term data stored locally with user-controlled privacy settings
  • Advanced Search: PostgreSQL-native BM25 full-text search with vector similarity support
  • Multi-Modal Input: Text, images, voice, and screen captures processed seamlessly

Quick Start

Option A: Cloud (hosted API):

pip install mirix==0.1.6

Get your API key and view memory call traces at https://app.mirix.io.

from mirix import MirixClient

client = MirixClient(api_key="your_api_key_here")
# or set MIRIX_API_KEY in your environment, then use: client = MirixClient()

client.initialize_meta_agent(
    provider="openai"
)  # See configs in mirix/configs/examples/mirix_openai.yaml

# Simple add example
client.add(
    user_id="demo-user",
    messages=[
        {"role": "user", "content": [{"type": "text", "text": "The moon now has a president."}]},
        {"role": "assistant", "content": [{"type": "text", "text": "Noted."}]},
    ],
)

# For a full example, see README.md below or samples/run_client.py

Option B: Local (backend + dashboard, no Docker): Step 1: Backend & Dashboard

pip install -r requirements.txt

In terminal 1:

python scripts/start_server.py

In terminal 2:

cd dashboard
npm install
npm run dev
  • Dashboard: http://localhost:5173
  • API: http://localhost:8531

Step 2: Create an API key in the dashboard (http://localhost:5173) and set as the environmental variable MIRIX_API_KEY.

Now you are ready to go! See the example below:

from mirix import MirixClient

client = MirixClient(
    api_key="your-api-key", # if you set MIRIX_API_KEY as the environmental variable then you don't need this
    base_url="http://localhost:8531",
)

client.initialize_meta_agent(
    config={
        "llm_config": {
            "model": "gpt-4o-mini",
            "model_endpoint_type": "openai",
            "model_endpoint": "https://api.openai.com/v1",
            "context_window": 128000,
        },
        "build_embeddings_for_memory": True,
        "embedding_config": {
            "embedding_model": "text-embedding-3-small",
            "embedding_endpoint": "https://api.openai.com/v1",
            "embedding_endpoint_type": "openai",
            "embedding_dim": 1536,
        },
        "meta_agent_config": {
            "agents": [
                "core_memory_agent",
                "resource_memory_agent",
                "semantic_memory_agent",
                "episodic_memory_agent",
                "procedural_memory_agent",
                "knowledge_memory_agent",
                "reflexion_agent",
                "background_agent",
            ],
            "memory": {
                "core": [
                    {"label": "human", "value": ""},
                    {"label": "persona", "value": "I am a helpful assistant."},
                ],
                "decay": {
                    "fade_after_days": 30,
                    "expire_after_days": 90,
                },
            },
        },
    }
)

client.add(
    user_id="demo-user",
    messages=[
        {"role": "user", "content": [{"type": "text", "text": "The moon now has a president."}]},
        {"role": "assistant", "content": [{"type": "text", "text": "Noted."}]},
    ],
)

memories = client.retrieve_with_conversation(
    user_id="demo-user",
    messages=[
        {"role": "user", "content": [{"type": "text", "text": "What did we discuss on MirixDB in last 4 days?"}]},
    ],
    limit=5,
)
print(memories)

For more API examples, see samples/run_client.py.

License

Mirix is released under the Apache License 2.0. See the LICENSE file for more details.

Contact

For questions, suggestions, or issues, please open an issue on the GitHub repository or contact us at founders@mirix.io

Join Our Community

Connect with other Mirix users, share your thoughts, and get support:

💬 Discord Community

Join our Discord server for real-time discussions, support, and community updates: https://discord.gg/FXtXJuRf

🎯 Weekly Discussion Sessions

We host weekly discussion sessions where you can: - Discuss issues and bugs - Share ideas about future directions - Get general consultations and support - Connect with the development team and community

📅 Schedule: Friday nights, 8-9 PM PST
🔗 Zoom Link: https://ucsd.zoom.us/j/96278791276

📱 WeChat Group

You can add the account ari_asm so that I can add you to the group chat.

Acknowledgement

We would like to thank Letta for open-sourcing their framework, which served as the foundation for the memory system in this project.

Extension points exported contracts — how you extend this code

TextareaProps (Interface)
(no doc)
dashboard/src/components/ui/textarea.tsx
InputProps (Interface)
(no doc)
dashboard/src/components/ui/input.tsx
ButtonProps (Interface)
(no doc)
dashboard/src/components/ui/button.tsx
BadgeProps (Interface)
(no doc)
dashboard/src/components/ui/badge.tsx
MemoryQueueTrace (Interface)
(no doc)
dashboard/src/pages/dashboard/MemoryTraces.tsx

Core symbols most depended-on inside this repo

get
called by 540
mirix/queue/kafka_queue.py
error
called by 183
mirix/interface.py
to_pydantic
called by 154
mirix/orm/block.py
execute
called by 101
mirix/server/server.py
model_dump
called by 101
mirix/schemas/message.py
read
called by 99
mirix/orm/sqlalchemy_base.py
delete
called by 90
mirix/orm/sqlalchemy_base.py
all
called by 81
mirix/server/server.py

Shape

Method 1,274
Function 681
Class 496
Route 65
Interface 25

Languages

Python96%
TypeScript4%

Modules by API surface

mirix/server/rest_api.py175 symbols
mirix/local_client/local_client.py98 symbols
tests/test_queue.py72 symbols
mirix/client/remote_client.py72 symbols
mirix/utils.py67 symbols
tests/test_redis_integration.py64 symbols
mirix/server/server.py60 symbols
mirix/client/client.py55 symbols
mirix/database/redis_client.py42 symbols
mirix/errors.py39 symbols
tests/test_auth_provider.py37 symbols
tests/test_memory_server.py36 symbols

Dependencies from manifests, versioned

@radix-ui/react-dialog1.0.5 · 1×
@radix-ui/react-popover1.0.7 · 1×
@radix-ui/react-slot1.0.2 · 1×
@types/node20.11.0 · 1×
@types/react18.2.56 · 1×
@types/react-dom18.2.19 · 1×
@typescript-eslint/eslint-plugin7.0.2 · 1×
@typescript-eslint/parser7.0.2 · 1×
@vitejs/plugin-react4.2.1 · 1×
autoprefixer10.4.17 · 1×
axios1.6.7 · 1×
class-variance-authority0.7.0 · 1×

Datastores touched

dbDatabase · 1 repos

For agents

$ claude mcp add MIRIX \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact