top | item 46741277

Show HN: Supe – Give your AI agent a brain, not just memory

2 points| xxayh | 1 month ago |github.com

I built Supe because I wanted Claude to analyze game binaries but not modify them. The constraints grew into something more general: a cognitive architecture for AI agents.

The problem: Most agent frameworks treat memory as flat storage. Store a key, get a value. That's not how useful memory works.

What Supe provides:

1. Neural Memory - Hebbian learning ("fire together, wire together"). Cards connected by synaptic links that strengthen with co-activation and decay with disuse. Spreading activation for recall. Hubs emerge naturally.

2. Validation Gates - Python functions that run before/after tool executions. Block `rm -rf`, enforce read-only mode, whitelist commands. Code, not configuration.

3. Proof-of-Work - SHA256 hashes chain every execution. Tamper with logs and proofs won't verify.

4. Cognitive Hierarchy - Moments (sessions) → Cards (knowledge units) → Buffers (raw data). Not flat.

5. Semantic Relations - 7 typed connections: CAUSES, IMPLIES, CONTRADICTS, SUPPORTS, DEPENDS_ON, EQUALS, TRANSFORMS.

Example gate:

  @agent.register_gate("safe")
  def safe(record, phase) -> GateResult:
      if "rm -rf" in record.tool_input.get("command", ""):
          return GateResult("safe", False, "BLOCKED")
      return GateResult("safe", True, "OK")
Example neural recall:

  neural.add_card(1, {"title": "OAuth"})
  neural.add_card(2, {"title": "Login"})
  neural.connect(1, 2)  # Hebbian learning
  results = neural.recall("authentication")  # Spreading activation
343 tests. MIT license. Works with Claude SDK.

pip install supe

2 comments

order

ldc0618|1 month ago

Interesting approach. I've been experimenting with AI for content schema generation in a CMS context - the challenge is always balancing AI suggestions with deterministic output that developers can trust.

How do you handle cases where the "brain" makes decisions that need to be auditable or reversible?

reify|1 month ago

Doesn't look like a brain to me.

It looks like a few lines of python code written by a desperate human being, who has introjected all the hype and is projecting his own fantasies into, and onto, an autocomplete machine.

There is no spoon and there is no brain.