Skip to main content

Mirix Logo

Mirix Client

Lightweight Python client for interacting with a running Mirix server.


Install

pip install mirix-client

Quick Start

  1. Ensure you have a Mirix server running and an API key.
  2. Set your API key as an environment variable:
export MIRIX_API_KEY=your-api-key
  1. Use the client:
from mirix import MirixClient

client = MirixClient(
    api_key="your-api-key",
)

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 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.

Metadata

Release files for mirix 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mirix 0.1.7
File Size Uploaded Provenance
mirix-0.1.7.tar.gz 84.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mirix 0.1.7
File Interpreter ABI Platform
mirix-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 190.5 kB

Release files / mirix-0.1.7.tar.gz

Download URL mirix-0.1.7.tar.gz
Size 84.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d6650d24d28fb110244daa873b11215c480c80ae2e4e0d7c65ab9c37e227b5a5
BLAKE2b-256 checksum
How to use checksums
4f3404a118e61291654ea1b6b30403c7d64ba33460190974b7ce0a3433f92670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / mirix-0.1.7-py3-none-any.whl

Download URL mirix-0.1.7-py3-none-any.whl
Size 106.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ead9e0ecd33218164a319749281d3bb3d5de677e5ab1afad6ccaa3910139af45
BLAKE2b-256 checksum
How to use checksums
ab37b33b4c7c641659f2f6f999e742fee001a38847beaf2b5d231418c163c546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for mirix 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page