hipcortex 3.13.0__tar.gz → 3.16.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. {hipcortex-3.13.0 → hipcortex-3.16.0}/PKG-INFO +166 -166
  2. {hipcortex-3.13.0 → hipcortex-3.16.0}/README.md +122 -122
  3. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/__init__.py +1 -1
  4. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/adapters/autogen.py +229 -229
  5. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/adapters/crewai.py +233 -233
  6. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/async_client.py +378 -378
  7. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/cli.py +1728 -1728
  8. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/client.py +790 -790
  9. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/doctor.py +15 -4
  10. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/indexer.py +219 -219
  11. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/SKILL.md +220 -196
  12. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/__init__.py +1 -1
  13. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/mcp_server.py +2036 -2022
  14. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install_hosts.py +1009 -1009
  15. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/langchain_memory.py +376 -376
  16. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/llamaindex_storage.py +107 -107
  17. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex.egg-info/PKG-INFO +166 -166
  18. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex.egg-info/SOURCES.txt +1 -0
  19. {hipcortex-3.13.0 → hipcortex-3.16.0}/pyproject.toml +2 -2
  20. {hipcortex-3.13.0 → hipcortex-3.16.0}/setup.cfg +4 -4
  21. {hipcortex-3.13.0 → hipcortex-3.16.0}/setup.py +37 -37
  22. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_async_client.py +101 -101
  23. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_async_langchain.py +61 -61
  24. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_can_execute.py +33 -33
  25. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_cli_install.py +2241 -2241
  26. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_doctor.py +66 -4
  27. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_host_install_e2e.py +145 -145
  28. hipcortex-3.16.0/tests/test_lifecycle_clarify_mcp.py +79 -0
  29. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_mcp_server_req.py +151 -151
  30. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_mcp_tool_surface.py +412 -410
  31. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/adapters/__init__.py +0 -0
  32. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/adapters/common.py +0 -0
  33. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/config.py +0 -0
  34. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/daemon.py +0 -0
  35. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/framework_scaffold.py +0 -0
  36. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/RUNNER_SKILL.md +0 -0
  37. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/autogen.py.tmpl +0 -0
  38. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/crewai.py.tmpl +0 -0
  39. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/dspy.py.tmpl +0 -0
  40. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/langchain.py.tmpl +0 -0
  41. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/llamaindex.py.tmpl +0 -0
  42. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/n8n_curl.sh.tmpl +0 -0
  43. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/install/templates/pydantic_ai.py.tmpl +0 -0
  44. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/runner.py +0 -0
  45. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex/substrate.py +0 -0
  46. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex.egg-info/dependency_links.txt +0 -0
  47. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex.egg-info/entry_points.txt +0 -0
  48. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex.egg-info/requires.txt +0 -0
  49. {hipcortex-3.13.0 → hipcortex-3.16.0}/hipcortex.egg-info/top_level.txt +0 -0
  50. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_adapters_common.py +0 -0
  51. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_client_config.py +0 -0
  52. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_client_v070.py +0 -0
  53. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_config.py +0 -0
  54. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_daemon.py +0 -0
  55. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_harness_with_loop.py +0 -0
  56. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_probe_honesty_runtime.py +0 -0
  57. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_reflect_predict.py +0 -0
  58. {hipcortex-3.13.0 → hipcortex-3.16.0}/tests/test_substrate.py +0 -0
@@ -1,166 +1,166 @@
1
- Metadata-Version: 2.4
2
- Name: hipcortex
3
- Version: 3.13.0
4
- Summary: Cognitive state substrate for AI agents — Python SDK + CLI. Graceful shutdown + auto-backup (POST /v1/backup tars 4 data files); actor merge (merge_actor MCP tool); snapshot CLI; VSIX dedup guard; schema-compat proven; universal passive capture; 62-tool / 7-resource MCP server; WAL-persistent. LangChain, AutoGen, CrewAI, MCP
5
- Author: HipCortex Contributors
6
- License: Apache-2.0
7
- Project-URL: Homepage, https://github.com/farmountain/HipCortex
8
- Project-URL: Repository, https://github.com/farmountain/HipCortex
9
- Project-URL: Issues, https://github.com/farmountain/HipCortex/issues
10
- Project-URL: Benchmark, https://github.com/farmountain/HipCortex/blob/main/BENCHMARK.md
11
- Keywords: ai,memory,langchain,autogen,crewai,llm,agents,rag
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: License :: OSI Approved :: Apache Software License
14
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
- Classifier: Intended Audience :: Developers
16
- Requires-Python: >=3.9
17
- Description-Content-Type: text/markdown
18
- Requires-Dist: requests>=2.28
19
- Requires-Dist: httpx>=0.27
20
- Provides-Extra: langchain
21
- Requires-Dist: langchain-core>=0.1; extra == "langchain"
22
- Provides-Extra: llamaindex
23
- Requires-Dist: llama-index-core>=0.10; extra == "llamaindex"
24
- Provides-Extra: crewai
25
- Requires-Dist: crewai>=0.28; extra == "crewai"
26
- Requires-Dist: crewai-tools>=0.1; extra == "crewai"
27
- Provides-Extra: autogen
28
- Requires-Dist: pyautogen>=0.2; extra == "autogen"
29
- Provides-Extra: benchmark
30
- Requires-Dist: mem0ai>=0.1; extra == "benchmark"
31
- Requires-Dist: tabulate>=0.9; extra == "benchmark"
32
- Provides-Extra: test
33
- Requires-Dist: pytest>=7.0; extra == "test"
34
- Requires-Dist: pytest-asyncio>=0.23; extra == "test"
35
- Provides-Extra: all
36
- Requires-Dist: langchain-core>=0.1; extra == "all"
37
- Requires-Dist: llama-index-core>=0.10; extra == "all"
38
- Requires-Dist: crewai>=0.28; extra == "all"
39
- Requires-Dist: crewai-tools>=0.1; extra == "all"
40
- Requires-Dist: pyautogen>=0.2; extra == "all"
41
- Requires-Dist: mem0ai>=0.1; extra == "all"
42
- Requires-Dist: tabulate>=0.9; extra == "all"
43
- Dynamic: requires-python
44
-
45
- # HipCortex Python SDK (`v3.12.0`)
46
-
47
- **Persistent causal topological memory, recursive Bayesian world-model prediction (`/worldmodel/rollout`), and automatic FSM skill compilation for autonomous AI agents.**
48
-
49
- 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`).
50
-
51
- ---
52
-
53
- ## 🚀 Installation
54
-
55
- ```bash
56
- pip install hipcortex
57
- hipcortex doctor # verify server health + version after install
58
- hipcortex install # wizard: MCP hosts + copies ~/.hipcortex-mcp/server.py (62 tools)
59
- hipcortex channels # honesty matrix (native / mcp / framework / guide)
60
- ```
61
-
62
- **Version matrix:** product pip/Cargo/MCP `serverInfo` = **3.12.0**; VS Code VSIX = **3.12.0**. See [docs/channels.md](../../docs/channels.md).
63
-
64
- ---
65
-
66
- ## ⚡ Quick Start: Multi-Tier Memory & World Model Prediction
67
-
68
- ```python
69
- from hipcortex import HipCortexClient
70
-
71
- client = HipCortexClient(base_url="http://127.0.0.1:3030")
72
-
73
- # 1. Multi-Tier Memory Ingestion (5 verified memory tiers)
74
- client.add_memory(
75
- actor="agent",
76
- action="configured",
77
- target="jwt_token_ttl=3600",
78
- record_type="Working", # Mapped natively to Temporal tier
79
- priority="high"
80
- )
81
-
82
- client.add_memory(
83
- actor="agent",
84
- action="established",
85
- target="All database migrations must run inside transactions",
86
- record_type="Semantic", # Mapped natively to Symbolic/LongTerm tier
87
- priority="pinned"
88
- )
89
-
90
- # 2. Check SelfModel Execution Capacity Gates before running risky actions
91
- if client.can_execute("rollout"):
92
- print("Health check passed — engine ready for simulation")
93
-
94
- # 3. World Model Trajectory Rollout Prediction (POST /worldmodel/rollout)
95
- rollout_result = client.rollout(
96
- initial_state={"db_status": "locked", "active_tx": 1},
97
- actions=["rollback_tx", "release_lock", "retry_migration"]
98
- )
99
- print("Predicted outcome:", rollout_result)
100
- ```
101
-
102
- ---
103
-
104
- ## 🧠 Proactive CodeAct Harness & Live Beliefs
105
-
106
- For autonomous agent harnesses (`LangChain`, `LlamaIndex`, `CrewAI`, `AutoGen`), query the topological substrate before reasoning:
107
-
108
- ```python
109
- # Query live causal beliefs and Top-K topological context (Personalized PageRank)
110
- context = client.context(query="database migrations", actor="agent", limit=5)
111
- print("Active Topological Context:\n", context)
112
-
113
- # Store multi-hop reasoning or CoT reflection
114
- client.add_memory(
115
- actor="agent",
116
- action="reflected",
117
- target="Migration failed due to missing index on users.email",
118
- record_type="Causal"
119
- )
120
- ```
121
-
122
- ---
123
-
124
- ## 🧩 Framework Integrations
125
-
126
- ### LangChain (`ConversationBufferMemory` drop-in)
127
- ```python
128
- from hipcortex.langchain_memory import HipCortexMemory
129
-
130
- memory = HipCortexMemory(session_id="session-42", url="http://127.0.0.1:3030")
131
- ```
132
-
133
- ### LlamaIndex (`ChatStore`)
134
- ```python
135
- from hipcortex.llamaindex_storage import HipCortexStorageContext
136
-
137
- storage_context = HipCortexStorageContext.from_defaults(client=client)
138
- ```
139
-
140
- ### CrewAI (`Remember` & `Recall` Tools)
141
- ```python
142
- from hipcortex.adapters.crewai import HipCortexRememberTool, HipCortexRecallTool
143
-
144
- tools = [HipCortexRememberTool(client=client), HipCortexRecallTool(client=client)]
145
- ```
146
-
147
- ### AutoGen (`Memory` Hook)
148
- ```python
149
- from hipcortex.adapters.autogen import HipCortexAutoGenMemory
150
-
151
- mem = HipCortexAutoGenMemory(client=client, agent_id="researcher")
152
- agent.register_hook("process_message_before_send", mem.on_message_sent)
153
- ```
154
-
155
- ---
156
-
157
- ## 📊 Server Statistics & GDPR Right-to-Forget
158
-
159
- ```python
160
- # Get Merkle hash chain status and tier counts
161
- stats = client.stats()
162
- print("Memory statistics:", stats)
163
-
164
- # Erase all records for a specific actor (GDPR compliant)
165
- client.forget("agent")
166
- ```
1
+ Metadata-Version: 2.4
2
+ Name: hipcortex
3
+ Version: 3.16.0
4
+ Summary: Cognitive reconstruction engine for AI agents — Python SDK + CLI. Anomaly→Law axiomatic write-back (LawExtractor); PolicyRegistry + step_with_policies() — Policies first-class in state evolution; MDL sparsity GC; MemoryType::Law + Policy; lifecycle self-prompting (T0→T3 ClarifyRoute in every gate); 62-tool / 7-resource MCP; WAL-persistent. LangChain, AutoGen, CrewAI, MCP
5
+ Author: HipCortex Contributors
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/farmountain/HipCortex
8
+ Project-URL: Repository, https://github.com/farmountain/HipCortex
9
+ Project-URL: Issues, https://github.com/farmountain/HipCortex/issues
10
+ Project-URL: Benchmark, https://github.com/farmountain/HipCortex/blob/main/BENCHMARK.md
11
+ Keywords: ai,memory,langchain,autogen,crewai,llm,agents,rag
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Classifier: Intended Audience :: Developers
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: requests>=2.28
19
+ Requires-Dist: httpx>=0.27
20
+ Provides-Extra: langchain
21
+ Requires-Dist: langchain-core>=0.1; extra == "langchain"
22
+ Provides-Extra: llamaindex
23
+ Requires-Dist: llama-index-core>=0.10; extra == "llamaindex"
24
+ Provides-Extra: crewai
25
+ Requires-Dist: crewai>=0.28; extra == "crewai"
26
+ Requires-Dist: crewai-tools>=0.1; extra == "crewai"
27
+ Provides-Extra: autogen
28
+ Requires-Dist: pyautogen>=0.2; extra == "autogen"
29
+ Provides-Extra: benchmark
30
+ Requires-Dist: mem0ai>=0.1; extra == "benchmark"
31
+ Requires-Dist: tabulate>=0.9; extra == "benchmark"
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=7.0; extra == "test"
34
+ Requires-Dist: pytest-asyncio>=0.23; extra == "test"
35
+ Provides-Extra: all
36
+ Requires-Dist: langchain-core>=0.1; extra == "all"
37
+ Requires-Dist: llama-index-core>=0.10; extra == "all"
38
+ Requires-Dist: crewai>=0.28; extra == "all"
39
+ Requires-Dist: crewai-tools>=0.1; extra == "all"
40
+ Requires-Dist: pyautogen>=0.2; extra == "all"
41
+ Requires-Dist: mem0ai>=0.1; extra == "all"
42
+ Requires-Dist: tabulate>=0.9; extra == "all"
43
+ Dynamic: requires-python
44
+
45
+ # HipCortex Python SDK (`v3.12.0`)
46
+
47
+ **Persistent causal topological memory, recursive Bayesian world-model prediction (`/worldmodel/rollout`), and automatic FSM skill compilation for autonomous AI agents.**
48
+
49
+ 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`).
50
+
51
+ ---
52
+
53
+ ## 🚀 Installation
54
+
55
+ ```bash
56
+ pip install hipcortex
57
+ hipcortex doctor # verify server health + version after install
58
+ hipcortex install # wizard: MCP hosts + copies ~/.hipcortex-mcp/server.py (62 tools)
59
+ hipcortex channels # honesty matrix (native / mcp / framework / guide)
60
+ ```
61
+
62
+ **Version matrix:** product pip/Cargo/MCP `serverInfo` = **3.12.0**; VS Code VSIX = **3.12.0**. See [docs/channels.md](../../docs/channels.md).
63
+
64
+ ---
65
+
66
+ ## ⚡ Quick Start: Multi-Tier Memory & World Model Prediction
67
+
68
+ ```python
69
+ from hipcortex import HipCortexClient
70
+
71
+ client = HipCortexClient(base_url="http://127.0.0.1:3030")
72
+
73
+ # 1. Multi-Tier Memory Ingestion (5 verified memory tiers)
74
+ client.add_memory(
75
+ actor="agent",
76
+ action="configured",
77
+ target="jwt_token_ttl=3600",
78
+ record_type="Working", # Mapped natively to Temporal tier
79
+ priority="high"
80
+ )
81
+
82
+ client.add_memory(
83
+ actor="agent",
84
+ action="established",
85
+ target="All database migrations must run inside transactions",
86
+ record_type="Semantic", # Mapped natively to Symbolic/LongTerm tier
87
+ priority="pinned"
88
+ )
89
+
90
+ # 2. Check SelfModel Execution Capacity Gates before running risky actions
91
+ if client.can_execute("rollout"):
92
+ print("Health check passed — engine ready for simulation")
93
+
94
+ # 3. World Model Trajectory Rollout Prediction (POST /worldmodel/rollout)
95
+ rollout_result = client.rollout(
96
+ initial_state={"db_status": "locked", "active_tx": 1},
97
+ actions=["rollback_tx", "release_lock", "retry_migration"]
98
+ )
99
+ print("Predicted outcome:", rollout_result)
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 🧠 Proactive CodeAct Harness & Live Beliefs
105
+
106
+ For autonomous agent harnesses (`LangChain`, `LlamaIndex`, `CrewAI`, `AutoGen`), query the topological substrate before reasoning:
107
+
108
+ ```python
109
+ # Query live causal beliefs and Top-K topological context (Personalized PageRank)
110
+ context = client.context(query="database migrations", actor="agent", limit=5)
111
+ print("Active Topological Context:\n", context)
112
+
113
+ # Store multi-hop reasoning or CoT reflection
114
+ client.add_memory(
115
+ actor="agent",
116
+ action="reflected",
117
+ target="Migration failed due to missing index on users.email",
118
+ record_type="Causal"
119
+ )
120
+ ```
121
+
122
+ ---
123
+
124
+ ## 🧩 Framework Integrations
125
+
126
+ ### LangChain (`ConversationBufferMemory` drop-in)
127
+ ```python
128
+ from hipcortex.langchain_memory import HipCortexMemory
129
+
130
+ memory = HipCortexMemory(session_id="session-42", url="http://127.0.0.1:3030")
131
+ ```
132
+
133
+ ### LlamaIndex (`ChatStore`)
134
+ ```python
135
+ from hipcortex.llamaindex_storage import HipCortexStorageContext
136
+
137
+ storage_context = HipCortexStorageContext.from_defaults(client=client)
138
+ ```
139
+
140
+ ### CrewAI (`Remember` & `Recall` Tools)
141
+ ```python
142
+ from hipcortex.adapters.crewai import HipCortexRememberTool, HipCortexRecallTool
143
+
144
+ tools = [HipCortexRememberTool(client=client), HipCortexRecallTool(client=client)]
145
+ ```
146
+
147
+ ### AutoGen (`Memory` Hook)
148
+ ```python
149
+ from hipcortex.adapters.autogen import HipCortexAutoGenMemory
150
+
151
+ mem = HipCortexAutoGenMemory(client=client, agent_id="researcher")
152
+ agent.register_hook("process_message_before_send", mem.on_message_sent)
153
+ ```
154
+
155
+ ---
156
+
157
+ ## 📊 Server Statistics & GDPR Right-to-Forget
158
+
159
+ ```python
160
+ # Get Merkle hash chain status and tier counts
161
+ stats = client.stats()
162
+ print("Memory statistics:", stats)
163
+
164
+ # Erase all records for a specific actor (GDPR compliant)
165
+ client.forget("agent")
166
+ ```
@@ -1,122 +1,122 @@
1
- # HipCortex Python SDK (`v3.12.0`)
2
-
3
- **Persistent causal topological memory, recursive Bayesian world-model prediction (`/worldmodel/rollout`), and automatic FSM skill compilation for autonomous AI agents.**
4
-
5
- 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`).
6
-
7
- ---
8
-
9
- ## 🚀 Installation
10
-
11
- ```bash
12
- pip install hipcortex
13
- hipcortex doctor # verify server health + version after install
14
- hipcortex install # wizard: MCP hosts + copies ~/.hipcortex-mcp/server.py (62 tools)
15
- hipcortex channels # honesty matrix (native / mcp / framework / guide)
16
- ```
17
-
18
- **Version matrix:** product pip/Cargo/MCP `serverInfo` = **3.12.0**; VS Code VSIX = **3.12.0**. See [docs/channels.md](../../docs/channels.md).
19
-
20
- ---
21
-
22
- ## ⚡ Quick Start: Multi-Tier Memory & World Model Prediction
23
-
24
- ```python
25
- from hipcortex import HipCortexClient
26
-
27
- client = HipCortexClient(base_url="http://127.0.0.1:3030")
28
-
29
- # 1. Multi-Tier Memory Ingestion (5 verified memory tiers)
30
- client.add_memory(
31
- actor="agent",
32
- action="configured",
33
- target="jwt_token_ttl=3600",
34
- record_type="Working", # Mapped natively to Temporal tier
35
- priority="high"
36
- )
37
-
38
- client.add_memory(
39
- actor="agent",
40
- action="established",
41
- target="All database migrations must run inside transactions",
42
- record_type="Semantic", # Mapped natively to Symbolic/LongTerm tier
43
- priority="pinned"
44
- )
45
-
46
- # 2. Check SelfModel Execution Capacity Gates before running risky actions
47
- if client.can_execute("rollout"):
48
- print("Health check passed — engine ready for simulation")
49
-
50
- # 3. World Model Trajectory Rollout Prediction (POST /worldmodel/rollout)
51
- rollout_result = client.rollout(
52
- initial_state={"db_status": "locked", "active_tx": 1},
53
- actions=["rollback_tx", "release_lock", "retry_migration"]
54
- )
55
- print("Predicted outcome:", rollout_result)
56
- ```
57
-
58
- ---
59
-
60
- ## 🧠 Proactive CodeAct Harness & Live Beliefs
61
-
62
- For autonomous agent harnesses (`LangChain`, `LlamaIndex`, `CrewAI`, `AutoGen`), query the topological substrate before reasoning:
63
-
64
- ```python
65
- # Query live causal beliefs and Top-K topological context (Personalized PageRank)
66
- context = client.context(query="database migrations", actor="agent", limit=5)
67
- print("Active Topological Context:\n", context)
68
-
69
- # Store multi-hop reasoning or CoT reflection
70
- client.add_memory(
71
- actor="agent",
72
- action="reflected",
73
- target="Migration failed due to missing index on users.email",
74
- record_type="Causal"
75
- )
76
- ```
77
-
78
- ---
79
-
80
- ## 🧩 Framework Integrations
81
-
82
- ### LangChain (`ConversationBufferMemory` drop-in)
83
- ```python
84
- from hipcortex.langchain_memory import HipCortexMemory
85
-
86
- memory = HipCortexMemory(session_id="session-42", url="http://127.0.0.1:3030")
87
- ```
88
-
89
- ### LlamaIndex (`ChatStore`)
90
- ```python
91
- from hipcortex.llamaindex_storage import HipCortexStorageContext
92
-
93
- storage_context = HipCortexStorageContext.from_defaults(client=client)
94
- ```
95
-
96
- ### CrewAI (`Remember` & `Recall` Tools)
97
- ```python
98
- from hipcortex.adapters.crewai import HipCortexRememberTool, HipCortexRecallTool
99
-
100
- tools = [HipCortexRememberTool(client=client), HipCortexRecallTool(client=client)]
101
- ```
102
-
103
- ### AutoGen (`Memory` Hook)
104
- ```python
105
- from hipcortex.adapters.autogen import HipCortexAutoGenMemory
106
-
107
- mem = HipCortexAutoGenMemory(client=client, agent_id="researcher")
108
- agent.register_hook("process_message_before_send", mem.on_message_sent)
109
- ```
110
-
111
- ---
112
-
113
- ## 📊 Server Statistics & GDPR Right-to-Forget
114
-
115
- ```python
116
- # Get Merkle hash chain status and tier counts
117
- stats = client.stats()
118
- print("Memory statistics:", stats)
119
-
120
- # Erase all records for a specific actor (GDPR compliant)
121
- client.forget("agent")
122
- ```
1
+ # HipCortex Python SDK (`v3.12.0`)
2
+
3
+ **Persistent causal topological memory, recursive Bayesian world-model prediction (`/worldmodel/rollout`), and automatic FSM skill compilation for autonomous AI agents.**
4
+
5
+ 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`).
6
+
7
+ ---
8
+
9
+ ## 🚀 Installation
10
+
11
+ ```bash
12
+ pip install hipcortex
13
+ hipcortex doctor # verify server health + version after install
14
+ hipcortex install # wizard: MCP hosts + copies ~/.hipcortex-mcp/server.py (62 tools)
15
+ hipcortex channels # honesty matrix (native / mcp / framework / guide)
16
+ ```
17
+
18
+ **Version matrix:** product pip/Cargo/MCP `serverInfo` = **3.12.0**; VS Code VSIX = **3.12.0**. See [docs/channels.md](../../docs/channels.md).
19
+
20
+ ---
21
+
22
+ ## ⚡ Quick Start: Multi-Tier Memory & World Model Prediction
23
+
24
+ ```python
25
+ from hipcortex import HipCortexClient
26
+
27
+ client = HipCortexClient(base_url="http://127.0.0.1:3030")
28
+
29
+ # 1. Multi-Tier Memory Ingestion (5 verified memory tiers)
30
+ client.add_memory(
31
+ actor="agent",
32
+ action="configured",
33
+ target="jwt_token_ttl=3600",
34
+ record_type="Working", # Mapped natively to Temporal tier
35
+ priority="high"
36
+ )
37
+
38
+ client.add_memory(
39
+ actor="agent",
40
+ action="established",
41
+ target="All database migrations must run inside transactions",
42
+ record_type="Semantic", # Mapped natively to Symbolic/LongTerm tier
43
+ priority="pinned"
44
+ )
45
+
46
+ # 2. Check SelfModel Execution Capacity Gates before running risky actions
47
+ if client.can_execute("rollout"):
48
+ print("Health check passed — engine ready for simulation")
49
+
50
+ # 3. World Model Trajectory Rollout Prediction (POST /worldmodel/rollout)
51
+ rollout_result = client.rollout(
52
+ initial_state={"db_status": "locked", "active_tx": 1},
53
+ actions=["rollback_tx", "release_lock", "retry_migration"]
54
+ )
55
+ print("Predicted outcome:", rollout_result)
56
+ ```
57
+
58
+ ---
59
+
60
+ ## 🧠 Proactive CodeAct Harness & Live Beliefs
61
+
62
+ For autonomous agent harnesses (`LangChain`, `LlamaIndex`, `CrewAI`, `AutoGen`), query the topological substrate before reasoning:
63
+
64
+ ```python
65
+ # Query live causal beliefs and Top-K topological context (Personalized PageRank)
66
+ context = client.context(query="database migrations", actor="agent", limit=5)
67
+ print("Active Topological Context:\n", context)
68
+
69
+ # Store multi-hop reasoning or CoT reflection
70
+ client.add_memory(
71
+ actor="agent",
72
+ action="reflected",
73
+ target="Migration failed due to missing index on users.email",
74
+ record_type="Causal"
75
+ )
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 🧩 Framework Integrations
81
+
82
+ ### LangChain (`ConversationBufferMemory` drop-in)
83
+ ```python
84
+ from hipcortex.langchain_memory import HipCortexMemory
85
+
86
+ memory = HipCortexMemory(session_id="session-42", url="http://127.0.0.1:3030")
87
+ ```
88
+
89
+ ### LlamaIndex (`ChatStore`)
90
+ ```python
91
+ from hipcortex.llamaindex_storage import HipCortexStorageContext
92
+
93
+ storage_context = HipCortexStorageContext.from_defaults(client=client)
94
+ ```
95
+
96
+ ### CrewAI (`Remember` & `Recall` Tools)
97
+ ```python
98
+ from hipcortex.adapters.crewai import HipCortexRememberTool, HipCortexRecallTool
99
+
100
+ tools = [HipCortexRememberTool(client=client), HipCortexRecallTool(client=client)]
101
+ ```
102
+
103
+ ### AutoGen (`Memory` Hook)
104
+ ```python
105
+ from hipcortex.adapters.autogen import HipCortexAutoGenMemory
106
+
107
+ mem = HipCortexAutoGenMemory(client=client, agent_id="researcher")
108
+ agent.register_hook("process_message_before_send", mem.on_message_sent)
109
+ ```
110
+
111
+ ---
112
+
113
+ ## 📊 Server Statistics & GDPR Right-to-Forget
114
+
115
+ ```python
116
+ # Get Merkle hash chain status and tier counts
117
+ stats = client.stats()
118
+ print("Memory statistics:", stats)
119
+
120
+ # Erase all records for a specific actor (GDPR compliant)
121
+ client.forget("agent")
122
+ ```
@@ -6,7 +6,7 @@ from .langchain_memory import HipCortexMemory, AsyncHipCortexMemory
6
6
  from .llamaindex_storage import HipCortexStorageContext
7
7
  from .substrate import HipCortexSubstrate
8
8
 
9
- __version__ = "3.13.0"
9
+ __version__ = "3.16.0"
10
10
  __all__ = [
11
11
  "HipCortexClient",
12
12
  "AsyncHipCortexClient",