MIMORI SDK
Python package for sending AI agent telemetry to MIMORI. It is designed to work seamlessly with any framework (LlamaIndex, AutoGen, CrewAI, DSPy, LangChain) or custom OpenAI/Anthropic execution loops.
Install the SDK directly from PyPI:
pip install mimori-sdk
For local development or hacking on the SDK:
pip install -e ./sdk
Agent Framework Integration (LangChain, AutoGen, etc.)
For frameworks that support callbacks (like LangChain), you can drop in the MIMORIHandler:
from mimori import MIMORIHandler
handler = MIMORIHandler(
api_key="sx_live_...",
agent_name="customer-support-bot",
api_url="http://localhost:3000",
)
# Example using LangChain
agent_executor = AgentExecutor(agent=agent, tools=tools, callbacks=[handler])
Manual Logging
from mimori import log_event
log_event(
api_key="sx_live_...",
agent_name="custom-agent",
event_type="manual",
payload={"message": "agent started"},
api_url="http://localhost:3000",
)
Event Payload Schemas
If you are logging manually (without the LangChain callback handler), use these recommended dictionary structures for the payload argument to ensure events render correctly in the dashboard:
Event Type (event_type) |
Expected payload Keys |
Example Structure |
|---|---|---|
llm_start |
serialized (dict), prompts (list of strings) |
{"serialized": {"name": "gpt-4o"}, "prompts": ["Explain quantum mechanics."]} |
llm_end |
response (any/dict/string) |
{"response": "Quantum mechanics is..."} |
tool_start |
tool (dict containing name), input (string/any) |
{"tool": {"name": "calculator"}, "input": "2 + 2"} |
tool_end |
output (any/string) |
{"output": "4"} |
chain_start |
chain (dict), inputs (dict) |
{"chain": {"name": "retrieval-chain"}, "inputs": {"query": "test"}} |
chain_end |
outputs (dict) |
{"outputs": {"answer": "result"}} |
agent_action |
action (any/dict) |
{"action": "invoking tool"} |
manual |
Freeform (any dictionary) | {"message": "Agent workflow started."} |
The SDK batches telemetry in a background thread and fails open if MIMORI is unreachable. It is designed to avoid disrupting agent execution, so it must not be the sole audit trail for security-critical operations.
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 mimori_sdk-0.1.2.tar.gz.
File metadata
- Download URL: mimori_sdk-0.1.2.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa0f668c5723b9bbd1abe710373a29e69ec67334578cf5981672854274f32b7e
|
|
| MD5 |
7a91c95aabc91197be4161c5646a5a9a
|
|
| BLAKE2b-256 |
a7785946af5b39aef30a5615521aa38d22c334572182b8b3686c396abd184abe
|
File details
Details for the file mimori_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mimori_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcb3e79979969e5cff6c29fde509f14636c57b51473db99eaa82c40c6c7ccc91
|
|
| MD5 |
895224564b9e4a2ffdb6793854d76002
|
|
| BLAKE2b-256 |
3f55f43d4af2e5c0e5c4934c1687916bace8d01bec521caf6556a6c681e160fe
|