Skip to content
Prompt

MIRIX — Cursor Rules

by Mirix-AI

AI Summary

MIRIX is a Multi-Agent Personal Assistant with an Advanced Memory System. It features a six-agent memory architecture (Core, Episodic, Semantic, Procedural, Resource, Knowledge Vault) with screen activity tracking and privacy-first design. 1. Follow PEP 8 strictly 3. Documentation

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "MIRIX — Cursor Rules" prompt rules to my project.
Repository: https://github.com/Mirix-AI/MIRIX

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

Mirix is a multi-agent personal assistant designed to track on-screen activities and answer user questions intelligently. By capturing real-time visual data and consolidating it into structured memories, Mirix transforms raw inputs into a rich knowledge base that adapts to your digital experiences.

Project Overview

MIRIX is a Multi-Agent Personal Assistant with an Advanced Memory System. It features a six-agent memory architecture (Core, Episodic, Semantic, Procedural, Resource, Knowledge Vault) with screen activity tracking and privacy-first design.

Tech Stack

• Backend: Python 3.10+, FastAPI, PostgreSQL, Redis, Kafka • Frontend: React, TypeScript, Vite, TailwindCSS • LLM Integration: Multiple providers (OpenAI, Anthropic, Google, Azure, etc.) • Observability: LangFuse • Testing: pytest • Linting: Ruff, Pyright

Python Guidelines

• Follow PEP 8 strictly • Use 4 spaces for indentation (no tabs) • Max line length: 79 characters for code, 72 for docstrings • Use snake_case for variables/functions, CamelCase for classes, ALL_CAPS for constants • Group imports: standard library, third-party, local application (blank lines between groups) • Type Hints • Always use type hints for function signatures • Use Optional[T] for nullable types • Use Union or | syntax for multiple types • Example: def create_user(user_id: str, name: Optional[str] = None) -> User: • Documentation • Use triple-quoted docstrings for all modules, classes, and functions • Include parameter descriptions, return types, and examples where helpful • Document complex logic with inline comments explaining WHY, not WHAT • Error Handling • Use specific exception types (ValueError, TypeError, HTTPException, etc.) • Never use bare except: clauses • Log errors with appropriate context • Async/Await • Use async/await for I/O operations • Prefix async functions with async def • Always await async calls

Async Architecture (Critical)

The codebase is fully async-native. Violating these rules will break the server. • All new manager methods in mirix/services/ MUST be async def • Never call asyncio.run() inside the server — the event loop is already running • Never use sync DB drivers — use asyncpg (not pg8000), aiosqlite (not sqlite3) • Never use sync Redis — use redis.asyncio only, never redis.Redis • Never use requests — use httpx.AsyncClient for all HTTP calls • Wrap unavoidable sync calls with asyncio.to_thread() — only for these 5 approved touch-points: • LangFuse SDK (no async version) • Gmail OAuth (inherently blocking) • SQLAlchemy DDL at startup • Cleanup job entry point • Pure CPU helpers with no I/O • Do NOT add new sync touch-points — check docs/Mirix_async_native_changes.md first

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 22d ago
Active
Adoption1K+ stars on GitHub
3.5k ★ · Popular
DocsREADME + description
Well-documented

GitHub Signals

Stars3.5k
Forks278
Issues34
Updated22d ago
View on GitHub
Apache-2.0 License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more