Tool — contextbroker

contextbroker — Cross-Agent Memory for the AI Era

The missing memory layer for AI agents. contextbroker gives any AI agent persistent, namespaced, TTL-controlled memory that survives session boundaries and works across any framework.

Overview

Every AI agent needs memory. The moment you want an agent to remember something between sessions — a user’s preferences, a project’s state, the last 10 decisions made — you need a memory layer. Every developer who builds with AI eventually confronts this problem.

The current solutions are all wrong:

  • Redis is a database, not a memory layer. It works, but it’s not designed for AI access patterns.
  • In-memory stores die on restart. You lose everything.
  • Vector databases (Pinecone, Weaviate) are powerful but require semantic understanding and are overkill for simple key-value memory.
  • Framework-specific memory (LangChain, AutoGPT) is locked inside the framework. The memory doesn’t travel when you switch tools.

contextbroker is the missing layer: a lightweight, framework-agnostic memory SDK that any AI agent can read and write. It persists state between sessions, survives restarts, and can be shared between multiple agents.


The Problem: Every AI Agent System Reinvents Memory Poorly

The Persistence Problem

Here’s what happens to every AI agent system:

  1. Developer builds an agent that tracks project state
  2. Agent works great in development
  3. Agent restarts → all memory gone → agent is confused
  4. Developer builds a workaround: writes state to a file
  5. File gets corrupted, or two agents write at once, or the file format is inconsistent
  6. Developer switches to Redis
  7. Redis is complex to configure, requires a server, and is a separate operational concern

This is 3 weeks of infrastructure work for a problem that shouldn’t exist.

The Portability Problem

You’re locked into your framework’s memory system. If you build your agent memory in LangChain and then want to move to a different orchestration layer, you have to rebuild the entire memory layer from scratch.


How contextbroker Works

contextbroker provides a clean key-value interface for AI agent memory:

// Store something
contextbroker.set("user:preferences", {
  name: "Traves",
  preferredModel: "claude-haiku-4",
  dailyBriefingTime: "07:30",
})

// Read it back — even in a new session
const prefs = contextbroker.get("user:preferences")
// { name: "Traves", preferredModel: "claude-haiku-4", ... }

Namespacing

Memory is organized into namespaces — keeping user preferences, project state, and team knowledge completely isolated:

namespace: "user:preferences"
  key: "name" → "Traves"
  key: "dailyBriefingTime" → "07:30"

namespace: "project:signal-loom"
  key: "lastCommit" → "ba8d333 — Fix pricing section"
  key: "currentBranch" → "main"
  key: "openPRs" → ["#42", "#43"]

TTL Support

Set time-to-live on any key — memory that naturally expires:

contextbroker.set("session:activeTask", taskId, { ttl: 3600 }) // expires in 1 hour

Find keys by pattern:

contextbroker.list("user:*")     // all user-scoped keys
contextbroker.search("project:*") // all project-scoped keys

Use Cases

Multi-Agent Orchestration

A system with 3 specialized agents — a researcher, a coder, and a reviewer — sharing context through contextbroker:

  • Researcher agent writes findings to research:{taskId}:findings
  • Coder agent reads from research:{taskId}:findings, writes to code:{taskId}:patches
  • Reviewer agent reads from code:{taskId}:patches
  • All memory persists between sessions

Without contextbroker: you’d need a shared database, a message queue, or a complex file-based handoff system.

User Preference Memory

A customer-facing AI assistant that remembers preferences across conversations:

// On first interaction
contextbroker.set("user:${userId}:prefs", {
  tone: "concise",
  timezone: "America/Los_Angeles",
  lastProject: "signal-loom"
})

// On every subsequent interaction — the agent reads this and adapts
const prefs = contextbroker.get("user:${userId}:prefs")

Coding Agent Memory

A coding agent that remembers the entire history of a project across sessions:

// After each session
contextbroker.set("project:${projectId}:state", {
  lastFile: "layouts/index.html",
  pendingChanges: ["pricing fix", "blog section"],
  architectureDecisions: ["Hugo for site", "MLX Whisper for transcription"]
})

Next session starts with full context — no 15-minute re-orientation phase.

Team Knowledge Base

A shared context layer for an entire team working on the same AI-assisted project:

contextbroker.set("team:standards:coding", {
  style: "prettier",
  commitFormat: "conventional",
  prReviewers: ["@alice", "@bob"]
})

Every agent in the team reads from the same context — consistent behavior without shared configuration files.


Technical Design

Storage Backend

Local filesystem by default (JSON files at ~/.signalloom/contextbroker/), with optional Redis backend for multi-machine setups.

Key Format

Keys are namespaced with : delimiters — similar to Redis. All keys are stored as SHA256 hashes of the actual key value, preventing filename collisions and path traversal attacks.

Security

  • Path traversal: prevented (keys hashed before storage)
  • Namespace isolation: enforced at the storage layer
  • No eval, no shell calls, no external network access
  • clear operation scoped to the caller’s namespace only

SDK Support

  • CLI: contextbroker get key --namespace user:prefs
  • Node.js SDK: npm install @signalloom/contextbroker
  • Python SDK: pip install signalloom-contextbroker
  • OpenClaw skill: contextbroker set key value --namespace myapp

Integration with Other Tools

contextbroker pairs with every other Signallloom tool:

  • With costestimate: agents that “remember” previous cost estimates to make better model selection decisions over time
  • With jobaudit: persistent memory of optimization history and approved model changes
  • With promptcache: shared prefix cache that persists between sessions

Pricing

  • Free: Included with any Signallloom plan
  • All plans include contextbroker — no additional charge

contextbroker is part of the Signallloom Developer Toolbox.

Ready to put this into practice?

Try LoomLens Free Developer API
All whitepapers