Skip to main content

HipCortex Python SDK (v3.12.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
hipcortex install  # wizard: MCP hosts + copies ~/.hipcortex-mcp/server.py (62 tools)
hipcortex channels # honesty matrix (native / mcp / framework / guide)

Version matrix: product pip/Cargo/MCP serverInfo = 3.12.0; VS Code VSIX = 3.12.0. See docs/channels.md.


⚡ 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.13.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hipcortex 3.13.0
File Size Uploaded
hipcortex-3.13.0.tar.gz 134.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hipcortex 3.13.0
File Interpreter ABI Platform
hipcortex-3.13.0-py3-none-any.whl Python 3 none any Details

Total release size: 240.7 kB

Release files / hipcortex-3.13.0.tar.gz

Download URL hipcortex-3.13.0.tar.gz
Size 134.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1ea2ef946d3233055b50b6d82ace2d9c90756cacccf06aab197b28dc962a1143
BLAKE2b-256 checksum
How to use checksums
459768f0e87a8d00460d532313dd36d571973bfa86729e2acb0de9788fb45e90
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.13.0-py3-none-any.whl

Download URL hipcortex-3.13.0-py3-none-any.whl
Size 106.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3444b810cddd15f84db6adba136c0a05e52c1f70ba3451be3653f3309fd1f13f
BLAKE2b-256 checksum
How to use checksums
4a2646689a274e830f454eff8b03a4479dd0854295a1b9ac0717b4238876216c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

3.18.2

2 release files

3.18.1

2 release files

3.18.0

2 release files

3.17.0

2 release files

3.16.0

2 release files

3.15.1

1 release file

3.15.0

1 release file

3.14.0

1 release file

This release

3.13.0 This release

2 release files

3.12.0

2 release files

3.11.0

2 release files

1.5.1

1 release file

1.5.0

1 release file

1.4.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page