Memory graph for AI agents that learns what to retrieve — and what to suppress.
Project description
🦀 CrabPath
Memory graph for AI agents. Learns what to retrieve — and what to suppress.
Why?
- RAG loads by similarity. CrabPath loads by learned routes.
- Positive outcomes strengthen paths. Negative outcomes create inhibitory edges.
- The graph gets smarter with every query. Unused paths decay.
Install
pip install crabpath
Python 3.10+. Zero dependencies.
Quick Start
from crabpath import Graph, Node, Edge, traverse, TraversalConfig
from crabpath.learn import apply_outcome
g = Graph()
g.add_node(Node("a", "Deploy to production"))
g.add_node(Node("b", "Rollback procedure"))
g.add_edge(Edge("a", "b", 0.7))
result = traverse(g, seeds=[("a", 1.0)], config=TraversalConfig(max_hops=3))
print(result.fired)
apply_outcome(g, result.fired, outcome=1.0)
For AI Agents (CLI)
crabpath init --workspace <dir> --output <path>crabpath query <text> --graph <path> --index <path> [--top N] [--json]crabpath learn --graph <path> --outcome <float> --fired-ids <id1,id2,...>crabpath health --graph <path>
How It Works
split_workspacescans markdown, creates nodes, and sibling edges.VectorIndexstores caller-provided embeddings and performs cosine search.traversefollows reflex/habitual/dormant tiers with edge damping.apply_outcomeapplies policy-style updates and Hebbian co-firing.apply_decayslowly forgets weak unused edges.autotunesuggests safe defaults from graph health metrics.
Links
Paper / GitHub / PyPI
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 crabpath-3.0.0.tar.gz.
File metadata
- Download URL: crabpath-3.0.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4c2efe5ce21f86ea7fc9424d398e0a508c2cf4416efc3831184a68a8b828092
|
|
| MD5 |
be1c216b3bf6dc75bff16035ec84e5a9
|
|
| BLAKE2b-256 |
be465e953c752e775bfba3db7db7bef0fbd02f6b7be44bdfc0a70fe7ebe09662
|
Provenance
The following attestation bundles were made for crabpath-3.0.0.tar.gz:
Publisher:
publish.yml on jonathangu/crabpath
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crabpath-3.0.0.tar.gz -
Subject digest:
e4c2efe5ce21f86ea7fc9424d398e0a508c2cf4416efc3831184a68a8b828092 - Sigstore transparency entry: 999311854
- Sigstore integration time:
-
Permalink:
jonathangu/crabpath@bd8f37cc2cf44b0143f86e4a565178df2b02fff9 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/jonathangu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bd8f37cc2cf44b0143f86e4a565178df2b02fff9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file crabpath-3.0.0-py3-none-any.whl.
File metadata
- Download URL: crabpath-3.0.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36dedcad79e01d3a62ac051758696eb9ee68a27e1500f6375f97694e2cb7ab9f
|
|
| MD5 |
3e2f30765026884c0f8823eef391ffba
|
|
| BLAKE2b-256 |
dee35cc8a17fff420ad83f2e1fea446cbeaf86d7fc57f85f270401116bf649ae
|
Provenance
The following attestation bundles were made for crabpath-3.0.0-py3-none-any.whl:
Publisher:
publish.yml on jonathangu/crabpath
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crabpath-3.0.0-py3-none-any.whl -
Subject digest:
36dedcad79e01d3a62ac051758696eb9ee68a27e1500f6375f97694e2cb7ab9f - Sigstore transparency entry: 999311897
- Sigstore integration time:
-
Permalink:
jonathangu/crabpath@bd8f37cc2cf44b0143f86e4a565178df2b02fff9 -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/jonathangu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bd8f37cc2cf44b0143f86e4a565178df2b02fff9 -
Trigger Event:
push
-
Statement type: