HipCortex Python SDK (v3.18.2)
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
hipcortex install # wizard: MCP hosts + copies ~/.hipcortex-mcp/server.py (64 tools)
hipcortex channels # honesty matrix (native / mcp / framework / guide)
Version matrix: pip / Cargo / MCP serverInfo / VS Code VSIX = 3.18.2; the TypeScript SDK source is 3.12.0 (npm registry 0.5.2). See docs/channels.md.
What's new in 3.18 — Loop-Ready Contract
An external control loop can now take one snapshot and then follow the changes:
snap = client.cognitive_snapshot(actor="agent") # bootstrap once
cursor = snap["tx_cursor"]
page = client.snapshot_transitions("agent", since=cursor)
if page["truncated"]:
snap = client.cognitive_snapshot(actor="agent") # fell behind the horizon: re-bootstrap
else:
for t in page["transitions"]:
... # upsert by t["intent_id"]
cursor = page["next_cursor"]
scm = client.snapshot_scm() # ScmView: nodes, equations, edges, interventions, acyclic, as_of_tx
Settled intents are stamped by the server, ok is true only for a received receipt that reported success, and the feed keeps the newest 4096 settles; horizon_tx is the newest evicted stamp, and a cursor below it gets truncated: true. MCP exposes the same pair as snapshot_transitions and snapshot_scm (64 tools, 7 resources).
⚡ 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")
Metadata
Release files for hipcortex 3.18.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hipcortex-3.18.2.tar.gz | 140.8 kB | Without provenance | Details for hipcortex-3.18.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hipcortex-3.18.2-py3-none-any.whl | Python 3 | none | any | Details for hipcortex-3.18.2-py3-none-any.whl |
Total release size: 249.4 kB
Release files / hipcortex-3.18.2.tar.gz
| Download URL | hipcortex-3.18.2.tar.gz |
|---|---|
| Size | 140.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
109418c8915e7a94420b4d8135277e631a82ab3999ca678a82adb610357b26b5
|
|
BLAKE2b-256 checksum How to use checksums |
940cdca9c433b574025ad08da9ae4ada4cb754833fc77ae8f5f7092493200a30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / hipcortex-3.18.2-py3-none-any.whl
| Download URL | hipcortex-3.18.2-py3-none-any.whl |
|---|---|
| Size | 108.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89ad8edf0eaaffc1fa3df79ec9fff742dc06c4e161bdad35e457606649797536
|
|
BLAKE2b-256 checksum How to use checksums |
a691533fa1398c0366f9b06bd9a31e8ea0b277a38560a2a580786b8a9a84cd10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for hipcortex 3.18.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.