HipCortex Python SDK (v0.5.0)
Persistent causal topological memory, recursive Bayesian world-model prediction (/worldmodel/rollout), and automatic FSM skill compilation for autonomous AI agents.
Runs against the standalone local Rust binary (http://127.0.0.1:3030) with 0.48–0.61 ms p50 write latency, SHA-256 Merkle audit chains, and Headroom context budgeting (59–88% token savings).
🚀 Installation
pip install hipcortex
hipcortex doctor # verify server health + version after install
⚡ Quick Start: Multi-Tier Memory & World Model Prediction
from hipcortex import HipCortexClient
client = HipCortexClient(base_url="http://127.0.0.1:3030")
# 1. Multi-Tier Memory Ingestion (5 verified memory tiers)
client.add_memory(
actor="agent",
action="configured",
target="jwt_token_ttl=3600",
record_type="Working", # Mapped natively to Temporal tier
priority="high"
)
client.add_memory(
actor="agent",
action="established",
target="All database migrations must run inside transactions",
record_type="Semantic", # Mapped natively to Symbolic/LongTerm tier
priority="pinned"
)
# 2. Check SelfModel Execution Capacity Gates before running risky actions
if client.can_execute("rollout"):
print("Health check passed — engine ready for simulation")
# 3. World Model Trajectory Rollout Prediction (POST /worldmodel/rollout)
rollout_result = client.rollout(
initial_state={"db_status": "locked", "active_tx": 1},
actions=["rollback_tx", "release_lock", "retry_migration"]
)
print("Predicted outcome:", rollout_result)
🧠 Proactive CodeAct Harness & Live Beliefs
For autonomous agent harnesses (LangChain, LlamaIndex, CrewAI, AutoGen), query the topological substrate before reasoning:
# Query live causal beliefs and Top-K topological context (Personalized PageRank)
context = client.context(query="database migrations", actor="agent", limit=5)
print("Active Topological Context:\n", context)
# Store multi-hop reasoning or CoT reflection
client.add_memory(
actor="agent",
action="reflected",
target="Migration failed due to missing index on users.email",
record_type="Causal"
)
🧩 Framework Integrations
LangChain (ConversationBufferMemory drop-in)
from hipcortex.langchain_memory import HipCortexMemory
memory = HipCortexMemory(session_id="session-42", url="http://127.0.0.1:3030")
LlamaIndex (ChatStore)
from hipcortex.llamaindex_storage import HipCortexStorageContext
storage_context = HipCortexStorageContext.from_defaults(client=client)
CrewAI (Remember & Recall Tools)
from hipcortex.adapters.crewai import HipCortexRememberTool, HipCortexRecallTool
tools = [HipCortexRememberTool(client=client), HipCortexRecallTool(client=client)]
AutoGen (Memory Hook)
from hipcortex.adapters.autogen import HipCortexAutoGenMemory
mem = HipCortexAutoGenMemory(client=client, agent_id="researcher")
agent.register_hook("process_message_before_send", mem.on_message_sent)
📊 Server Statistics & GDPR Right-to-Forget
# Get Merkle hash chain status and tier counts
stats = client.stats()
print("Memory statistics:", stats)
# Erase all records for a specific actor (GDPR compliant)
client.forget("agent")
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 hipcortex-0.5.0.tar.gz.
File metadata
- Download URL: hipcortex-0.5.0.tar.gz
- Upload date:
- Size: 97.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dccaa68f4bf1d5f432ba5032c860863dd9ea1c8995261074c04352ae6cafc08
|
|
| MD5 |
7859a6ad2fe072fb35fa37f2533e48c9
|
|
| BLAKE2b-256 |
213065e85b1bb763f39a80da6cfe320a15ba6f0b06e4cdbbe3fa879f2db4e6e8
|
File details
Details for the file hipcortex-0.5.0-py3-none-any.whl.
File metadata
- Download URL: hipcortex-0.5.0-py3-none-any.whl
- Upload date:
- Size: 76.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ae25a08043febf964b45ead9f17878854e830a5b1d7ac370ec5b2a80191ecf1
|
|
| MD5 |
321e60eb7a28f0ac10e340df5ae2df8c
|
|
| BLAKE2b-256 |
ef5faf20ade90f2dfce5b2f61274f7120ad20af73856388f178b18b5501bb4c9
|