Mirix Client - Lightweight Python client for Mirix server
Project description
Mirix Client
Lightweight Python client for interacting with a running Mirix server.
- Website: https://mirix.io
- Documentation: https://docs.mirix.io
- Source: https://github.com/Mirix-AI/MIRIX
Install
pip install mirix-client
Quick Start
- Ensure you have a Mirix server running and an API key.
- Set your API key as an environment variable:
export MIRIX_API_KEY=your-api-key
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mirix-0.1.7.tar.gz.
File metadata
- Download URL: mirix-0.1.7.tar.gz
- Upload date:
- Size: 84.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6650d24d28fb110244daa873b11215c480c80ae2e4e0d7c65ab9c37e227b5a5
|
|
| MD5 |
6af28b187dc3e5a917f1ffe935517a5f
|
|
| BLAKE2b-256 |
4f3404a118e61291654ea1b6b30403c7d64ba33460190974b7ce0a3433f92670
|
File details
Details for the file mirix-0.1.7-py3-none-any.whl.
File metadata
- Download URL: mirix-0.1.7-py3-none-any.whl
- Upload date:
- Size: 106.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ead9e0ecd33218164a319749281d3bb3d5de677e5ab1afad6ccaa3910139af45
|
|
| MD5 |
3e1cec0941291674b6476440c17e2524
|
|
| BLAKE2b-256 |
ab37b33b4c7c641659f2f6f999e742fee001a38847beaf2b5d231418c163c546
|