🕒 Loading time...
🌡️ Loading weather...

Ai Mainstream

MIRA – An open-source persistent AI entity with memory

This announcement marks the official launch of MIRA OS. Individual memories degrade over time, tools automatically adjust when placed in the tools/ directory, and the system prompt is composed from modular components. I like to believe that I have created a sophisticated brain-in-a-box. Once you load it and send cURL requests, it responds, learns, and utilizes tools. Contributions are encouraged.

Mira achieves continuity and recall by combining asynchronous conversation processing similar to REM sleep with active self-directed context window manipulation. There is a single ongoing conversation thread with no option to initiate a new chat, prompting us to address the challenge of establishing enduring persistence within a framework inherently transient.

I have meticulously crafted Mira to function autonomously without requiring human intervention or curation. Old memories (context rot) naturally decay unless they are referenced in conversation or linked with other memories, eliminating the need for manual maintenance. Memories consist of distinct synthesized information that is passively integrated into the context window through semantic similarity, memory traversal, and filtering.

At times, longer document-shaped text is necessary. To address this, Mira employs the domaindoc_tool which allows collaboration on text that remains unchanged. To prevent token overload in lengthy content, Mira autonomously expands, collapses, and subdivides text blocks as needed. Users can also directly modify the content via API. Additionally, Mira includes a preloaded domaindoc named ‘knowledgeofself’ to maintain consistent persona/patterns over time.

Tools are self-contained and require no configuration. Each tool registers itself upon startup with all configuration values stored within the toolfile. This enables users to enable or disable tools as needed without cluttering the context window with unnecessary tools. For instance, there’s no need to include email_tool definitions when checking the weather, preserving token efficiency and attention focus.

The architecture operates on synchronous event-driven principles, allowing modules to be easily extended without tight coupling. For instance, Mira incorporates a working_memory module akin to plugins for the system prompt. When a conversation remains idle for 120 minutes, an event triggers a series of actions like memory extraction and cache management in preparation for the next interaction.

I have advocated for open-source software since childhood and have released MIRA as open-source technology believing in its potential beyond individual ownership. The repository version closely mirrors the hosted variant at miraos.org minus the web interface and authentication setup. I am committed to maintaining this open-source version as long as I oversee it.

This endeavor is indebted to countless dedicated individuals whose names may never be known. The discovery of heartbleed vulnerability or advancements in internet technologies are results of collective efforts surpassing human history scales so far. Gratitude to every developer who has poured their passion into what they believe in.

To get started with MIRA, answer onscreen configuration questions and provide your API keys. The script manages platform detection (macOS/Linux), dependency checks, Python venv creation, requirements installation via pip, model downloads (e.g., spaCy ~800MB), HashiCorp Vault setup, database deployment (mira_service database creation), service verification (PostgreSQL, Valkey, Vault accessibility), among other configuration tasks.

I operate a hosted version of MIRA on miraos.org where users can access an intuitive web interface on various devices or via API after simple account setup involving email verification—a straightforward process.