High-performance Python client for the M8P Hypervisor and Agent Runtime.
Project description
m8-core
The Official Python Client & CLI for the M8P Hypervisor.
Accelerate Intelligence. Maximize FLOPs. Optimize CAPEX.
M8P is a unified execution engine for AI Agents, combining Vector Storage, Logic, and Inference into a single high-performance runtime. It eliminates the "Microservice Tax" of legacy stacks by running logic and data in a shared memory space (Zero-Copy Execution).
Key Features
- 🚀 18% Lower Latency: Optimized internal bus eliminates HTTP/JSON overhead.
- 📦 75% Less Complexity: Replaces the typical stack (FastAPI + LangChain + FAISS + Llama.cpp) with a single binary.
- 🧠 Unified Memory: Logic executes directly on data registers without network hops.
- ⚡ Native Streaming: First-class opcode support for real-time token generation.
Installation
pip install m8-core
Optional: For syntax highlighting in the CLI, install the toolkit:
pip install prompt_toolkit
CLI Utility
You can use the command line tool to manage sessions and run scripts directly.
Start a Session:
m8-core start my_session_v1
Run a Script:
m8-core run myscript.m8 --session my_session_v1
Stop/Cleanup:
m8-core stop my_session_v1
API Usage
from m8_core import M8
SESSION_ID = "my_agent_v1"
1. Initialize Memory
init_script = """
vdb_instance AGENT_MEM dim=4096 max_elements=10000
return "Ready"
"""
M8.EnsureExists(SESSION_ID, code=init_script)
2. Run Inference
script = """
store <prompt> Why is the sky blue?
llm_openai <prompt> instance_name n_predict=75 force=true temperature=0.1
llm_instancestatus instance_name <out> #result of inference is stored in <out> by the instancestatus call
return <out>
"""
response = M8.RunSession(SESSION_ID, script)
print(response)
2. Streamming Inference
script = """
store <prompt> Why is the sky blue?
llm_openai <prompt> instance_name n_predict=75 force=true temperature=0.1 stream=true
llm_instancestatus instance_name <out>
#stream <out> # stream will just duplicate what llm_openai sent
return <out>
"""
response = M8.RunSession(SESSION_ID, script)
print(response)
Requirements
Python 3.8+
requests
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 m8_core-0.1.2.tar.gz.
File metadata
- Download URL: m8_core-0.1.2.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d181c4deaa3bb633f1b03a8abdd61abf53fb588c403a758a648dc0d0de1921c
|
|
| MD5 |
a57b027f69e8c80b8ce25f0f5cdc5717
|
|
| BLAKE2b-256 |
ac463bfd35483dda3a1396958ffc8b3d559133052ee64448dccc5275da077282
|
File details
Details for the file m8_core-0.1.2-py3-none-any.whl.
File metadata
- Download URL: m8_core-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd054ffebd1a9d9aec20a6c62647f4a98e73f7ed52d45be7deeb910de8a2fe9
|
|
| MD5 |
1e2b910edfd662ff58cd824641a17434
|
|
| BLAKE2b-256 |
462aea1985cddd59747c60265dd88b0e0c7b6b0a531e3274abf0ef11d66373f7
|