THE HOOKBUS FRAMEWORK

The middleware layer
for AI agents.

Every AI agent fires lifecycle events. HookBus captures them from any platform and routes them to subscribers. Governance. Memory. Cost. Compliance. Distillation. Or anything you build. One bus. Every agent. Any subscriber.

Patent Pending GB2608069.7 Vendor Neutral On-Premise
Book a Demo

N publishers. M subscribers. N × M integrations.

Every governance tool, every audit logger, every cost tracker, every memory system has to integrate with every AI agent platform separately. Claude Code has one hook format. Cursor has another. OpenAI Agents SDK has a third. LangChain has callbacks. Anthropic Managed Agents has SSE streams. An organisation running three agents and five tools writes fifteen integrations. That does not scale.

HookBus reduces N × M to N + M. Each publisher integrates once with the bus. Each subscriber integrates once with the bus. Done.

Three layers. One platform.

Publishers emit lifecycle events. The bus routes them. Subscribers react. That is the entire architecture.

Layer 0: Publishers
Your AI agents
Every AI agent platform that fires lifecycle hooks is a publisher. A thin client normalises platform-specific events into the standard JSON envelope. Publishers do not know what subscribers exist or what they do.
Claude Code
LIVE
Anthropic SDK
LIVE
OpenAI Agents SDK
LIVE
LangChain / CrewAI
LIVE
Augment Code
TESTING
Cursor
TESTING
Amp
LIVE
Managed Agents
TESTING
GitHub Copilot
PLANNED
Any HTTP Client
WEBHOOK
↓  JSON envelope  ↓
Layer 1: The Bus
HookBus PATENT PENDING GB2608069.7
The bus receives normalised events from publishers and fans them out to all matching subscribers in parallel. Sync subscribers block execution until they decide. Async subscribers observe without blocking. The bus consolidates all sync decisions using a priority-weighted deny-wins algorithm: if any subscriber denies, the action is blocked.
EVENT ROUTING FAN-OUT DENY-WINS HOT RELOAD EVENT-TYPE AGNOSTIC CIRCUIT BREAKERS
↓  allow / deny / ask  ↑
Layer 2: Subscriber Marketplace
Anything anyone builds
Build once. Plug into every agent platform supported by HookBus. No SDK lock-in. No framework dependency. One JSON envelope reader and six lines of YAML.

Inbound enrichment. Outbound extraction. Same bus.

HookBus is not one-directional. It operates in two directions simultaneously on the same architecture.

INBOUND

Enrichment

On PreToolUse and UserPromptSubmit, subscribers inject organisational context into the agent's working memory before execution. Knowledge base lookups, compliance context, recent incidents, team ownership.

OUTBOUND

Extraction

On PostToolUse, subscribers remove sensitive content before it leaves the agent's trust boundary. PII scrubbing, credentials filtering, licence detection, export control.

Four reference implementations. Unlimited marketplace.

CRE is subscriber #1 and proves governance. The rest prove the marketplace model. Each is a standalone service that reads the JSON envelope and returns a decision. No SDK. Any language.

PATENT GB2604445.3 · SYNC

CRE Full

Composable Rule Enforcer. Two-layer governance: Microsoft AGT semantic classification plus regex for org policy (L1). IBM Granite 4 local LLM intent verification (L2). Sub-10ms L1. Sub-1s L2. No cloud. Licensed.

FREE · OPEN SOURCE · SYNC

CRE Light

L1-only governance. Microsoft AGT semantic threat classification plus 15 regex rules for org policy. No LLM. No GPU. No API key. Sub-10ms. 306 lines of Python. The free tier that catches 80% of violations. Upgrade to CRE Full for L2 intent verification.

Coming soon. Open source.

FREE · OPEN SOURCE · SYNC

KB Injector

Knowledge base context injection. SQL-backed keyword lookup against organisational metadata (servers, teams, runbooks, policies). Sub-millisecond. No LLM required. The agent receives rich context it was never trained on, without asking for it. One Python file. Zero dependencies.

Coming soon. Open source.

FREE · OPEN SOURCE · ASYNC + SYNC

Session Memory

Cross-session recall. Captures every agent interaction (prompts, tool calls, outputs) into SQLite. Injects recent history as preprompt on new sessions. The agent remembers what it did last time without being told. Dual mode: records everything, injects on demand.

Coming soon. Open source.

FREE · OPEN SOURCE · ASYNC

Audit Trail

SOC2/ISO compliance evidence generator. Captures every event-decision pair into a tamper-evident SQLite log with SHA-256 hash chain. Immutable records (no UPDATE, no DELETE). Generates branded HTML compliance reports mapped to SOC2 CC7, ISO 27001 A.12.4, and ISO 42001. CSV export. Hash chain verification. Retention policy.

Coming soon. Open source.

FREE · OPEN SOURCE · SYNC

DLP Filter

Data Loss Prevention for AI agents. 15 detection patterns across credentials, PII, financial data, and infrastructure. Inspects tool call arguments and outputs. Blocks or redacts before data leaves the trust boundary. Bidirectional on PreToolUse + PostToolUse. Regex-only. No LLM. Sub-millisecond.

Coming soon. Open source.

The marketplace builds from here

Token Monitor

Per-agent, per-team cost tracking. Budget enforcement. Real-time dashboards.

Anomaly Detect

Behavioural baselines per agent. Alert on deviations from normal tool-use patterns.

Compliance Gate

PCI, SOX, HIPAA gates as sync subscribers. Regulatory enforcement with audit-grade logging.

Safe Distillation

Capture full agent trajectories as training data. Fine-tune cheaper models from production traces. Zero data leaves your environment.

Audit Trail

Tamper-evident event log. Every tool call, every decision, every override. SOC2/ISO 27001/ISO 42001-ready.

Alert Forwarder

Slack, Teams, PagerDuty, email, SIEM. Route critical events to the right people in real time.

Cross-Agent Coordinator

Detect conflicts between concurrent agents. Knowledge handoff. Workflow orchestration. Only possible with a multi-publisher bus.

Risk Pricing

Actuarial risk scoring per tool call. Liability assignment. Insurance underwriting data for the AI agent market.

A subscriber is just a function.

Any service that can read JSON from a Unix socket, HTTP endpoint, or in-process Python class can be a HookBus subscriber. No SDK. No framework. Any language.

# A sync subscriber in 7 lines of Python def on_event(event): if event["hook"] == "PreToolUse": if dangerous(event["tool_input"]): return {"decision": "deny", "reason": "policy violation"} return {"decision": "allow"}

Register it: six lines of YAML in subscribers.yaml. Name, transport, address, event filter, timeout, fail mode. The bus hot-reloads. Zero downtime.

Developer documentation →

One JSON envelope. Every event.

The bus normalises events from every publisher into a single standard format. Subscribers never deal with platform-specific hook formats.

{ "event_id": "uuid-v4", "event_type": "PreToolUse", "timestamp": "2026-04-10T12:00:00Z", "source": "claude-code", "session_id": "session-abc-123", "tool_name": "Bash", "tool_input": {"command": "kubectl delete namespace production"}, "metadata": {} }

The bus is event-type agnostic. When an agent platform adds a new lifecycle event, the bus routes it automatically without code changes. The event_type field is an opaque string used only for subscriber filter matching.

On-premise. Private cloud. Multi-tenant SaaS.

The same architecture. Three deployment models. Your choice.

On-Premise

Your hardware. Your trust boundary. Air-gap compatible. No data leaves your environment. Unix socket transport.

Private Cloud

Your VPC on AWS, Azure, or GCP. HTTPS transport. Container-native. Same isolation, cloud-native operations.

Multi-Tenant SaaS

Managed by Agentic Thinking. Per-tenant isolation at the event envelope level. Trial, evaluate, and scale without operating infrastructure.

The platform in under two minutes

Two patents. One platform.

GB2608069.7 · HookBus
GB2604445.3 · CRE

The bus and the first enforcement subscriber are covered by separate UK patent applications. The subscriber marketplace and reference implementations (KB Injector, Session Memory, DLP Filter) are released as open source to accelerate ecosystem adoption.

See the platform in action.

30-minute confidential demo. Live HookBus + CRE enforcement. KB injection. Audit dashboard. Your questions answered.

Book a Demo
agenticthinking.uk