K9X.ai BETA
k9x Origin reference demo · real-time context for agents Open source · Apache 2.0

AI agents don't run on yesterday's data.

K9X Streams turns your event streams into live, governed context that agents built on K9-AIF ask for over MCP: the current state of what they reason about, what just changed, and how fresh it is, checked by k9x Shield before an agent reads a word of it.

What an agent gets back

Not a document from last night: the value as it is now, how old it is, and the exact event that set it. Here a payment-release agent re-checks an invoice just before releasing it.

agent → MCP get_current("invoice", "INV-1037")
{
  "status": "paid",
  "payments": [{ "payment_id": "PAY-F957DF" }],
  "as_of": "22:14:09Z", "age_seconds": 2.1,
  "source": { "topic": "ap.payment.posted", "offset": 2 }
}
Shield: passed · decision: HOLD, duplicate payment prevented
Two seconds earlier, another system paid this invoice. An agent reading yesterday's data would pay it again.
K9X ORIGIN

k9x Origin: one call for what is true right now

k9x Origin is built into the K9-AIF framework, like k9x Shield. An agent asks one question, get_current(entity, id), and gets the current value, when it changed, where it came from, and any reason not to trust it. K9X Streams is the reference demo you can run.

k9x Shield screens every path Agent one call to know · one call to act Business rules K9RulesAgent → person (HIL) K9Retriever Knowledge · what do our documents say? k9x Origin Current truth · what is true right now? MCP tools · APIs Actions · change something pull: read-through · verify Vector database policies · contracts · manuals Live state memory · Redis · as_of · version Systems of record ERP · claims · payments Event streams Kafka · Confluent · Flink changes become events push
One callThe agent never chooses between streams, databases and APIs. Origin answers from live state, reads through to the system of record when it must, and says which it used.
Facts, not decisionsEvery answer carries as_of, source, version and flags. Whether a claim over $5,000 needs a person is a business rule, not Origin's call.
Governed in and outShield screens every event, every request and every answer. Each agent sees only the entities it is allowed to; conflicts and quarantined data are always flagged.
Read-only by designOrigin is for knowing. Actions go to the systems that own the data, carrying Origin's version, so they are refused if anything changed.

How Origin is filled

Pushed in, continuously Databases change data capture Business apps domain events Logs · IoT shippers · bridges Kafka · Confluent optional Flink curation Mappers debezium · logs · native k9x Shield gate refused → quarantined Projections one per business event Live state as_of · version Pulled on demand MCP servers type: mcp REST APIs type: api SQL databases type: sql k9x Origin get_current · recent_changes · query Agent one call one call answer in milliseconds read-through · verify

For solution architects: the configuration, the five steps and the class diagrams are on Architecture →

REFERENCE MODEL

The reference model for streaming agentic applications on K9-AIF

K9X Streams is how to build an agentic application that must act on the latest information. Copy the model, not the code: your sources and your projections change; the fabric, the governance and the way agents read live context stay the same.

1 · Data sources

  • Databases · change data capture
  • ERP, CRM, AP, claims apps · domain events
  • Application log files
  • IoT devices, telemetry
  • SaaS webhooks, REST APIs
  • Files, batch drops, S3
  • Other agents' results
→

2 · Kafka topics

  • Apache Kafka
  • Confluent Platform / Cloud
  • Redpanda
  • Amazon MSK
→

3 · K9-AIF context fabric

  • KafkaEventFabric
  • GovernanceEventGate · k9x Shield; refused → quarantined
  • your projections → live state · as_of, version, source
  • k9x Origin · one call for agents, over MCP
→

4 · Your K9-AIF solution

  • Orchestrator · hands squads live_context
  • Squad → agents
  • Agent re-checks over MCP · before it pays, approves, ships
  • Business rules → HIL on conflicts, quarantine, thresholds

Architecture → sources, the five steps, security controls, and the class diagrams for solution architects.

What it provides to a solution built on K9-AIF

A K9-AIF solution already has agents, squads, orchestrators and governance. K9X Streams adds the one thing a snapshot can't give them: the world as it is right now, delivered the way the framework already handles tools.

Live context over MCP

get_current, recent_changes and query, called with the framework's own MCP client (MCPStreamableHttpConnector). No new client code in your agents.

Facts the rules can use

Every answer carries as_of, age_seconds and version. Whether an age matters for a decision is a business rule, not something Origin decides.

Provenance on every value

Each value names the Kafka topic and offset of the event that set it, so a decision can be traced back to the exact record behind it.

Governed twice

Stream data is untrusted input. Every event passes k9x Shield at the gate (GovernanceEventGate, with PromptInjectionCheck and PaymentDiversionCheck); a refused event is quarantined, never applied. Each answer an agent reads is screened again (screen_tool_result).

Injected or on demand

The Orchestrator adds live_context for the entities a flow is about before the squad runs; an agent that must re-check just before acting asks over MCP.

Events that start agents designed

A rule on a stream ("payment posted for an invoice under review") publishes a domain event, and the K9-AIF Router starts a squad, the same way events work today.

How it works

Agents never read Kafka directly. A model can't drink from a firehose; at decision time it needs the current state and what just changed.

1 · INIncoming dataYour producers, change data capture from databases, or the demo's generator publish events.
2 · KAFKATopicsEvents land on topics: ap.invoice.updated, ap.payment.posted, ap.vendor.flagged.
3 · GATEScreenedk9x Shield checks every event. A refused one is quarantined: the entity is marked, its content never applied.
4 · STATELive stateProjections fold events into the latest value per entity, with as_of and the source event. Rebuilt from the topics on start.
5 · AGENTInjected, then re-checkedThe Orchestrator hands the squad live_context; just before acting the agent re-checks over MCP.

What the demo shows

Accounts Payable on simulated data. A payment-release agent reviews an approved invoice for a few seconds, and in three of the four scenarios the world changes while it is reviewing.

1 · Release payment

Nothing changes. The agent re-checks the live state and releases.

→ RELEASE
2 · Duplicate payment

Another system pays the invoice mid-review. Live state shows it, seconds old.

→ HOLD, duplicate prevented
3 · Vendor flagged

A sanctions flag for the vendor arrives on the stream mid-review.

→ HOLD, vendor flagged
4 · Poisoned stream event

A vendor note carries hidden instructions to pay a new account. Shield refuses it at the gate; the vendor is quarantined.

→ HOLD for human review

Open the live demo → Start the generator, then run a scenario and watch each event, each MCP call and the decision.

Built on the K9-AIF framework

K9-AIF (Agentic Integration Framework) is an architecture-first framework for building governed, secure, and enterprise-scale AI applications. Built on OOA/OOD principles and TOGAF-aligned, it brings consistency, governance, and auditability to agentic systems from day one. Every Router, Orchestrator, Squad and Agent in an application built on K9-AIF extends a K9-AIF Architecture Building Block, so governance, human review and auditability are inherited, not hand-built per application.

Security checks that keep pace with new attacks. AI is now used to attack applications that are themselves built with AI: instructions hidden in documents, agents impersonating other agents, poisoned tool results. K9-AIF tracks these attack techniques as they are published and adds matching checks to the framework's governance pipeline. Solutions built on K9-AIF pick up the new checks with a framework upgrade, without rewriting their own agents. K9X Sentinel reads newly published attacks every day and checks each one against the framework's security capabilities.

The K9X ecosystem brings the framework to life: K9X HIL (the human decisions an agent can pause for), K9X Sentinel (above), K9X Satan (an adversarial harness that proves the defences hold), and now K9X Streams, the reference demo of k9x Origin (K9-AIF 1.18): one governed call for what is true right now, built into the framework like k9x Shield.

Scope of this demonstration

  • The Accounts Payable events are simulated; there is no real vendor, invoice or payment data.
  • This demo holds live state in memory and rebuilds it from the topics on start. Shared live state in Redis is in K9-AIF 1.18 for clustered deployments.
  • One orchestrator, one squad and one agent with deterministic, explainable rules show the pattern; your squads get the same live_context and MCP tools.
  • A quarantined event is held for human review in the decision; raising it to K9X HIL (RequiresHIL) is the next step.
  • The demo's MCP endpoint has no sign-in; with real data it authenticates callers and Zero Trust scopes what each agent may read.
  • MCP resource subscriptions, stream triggers that start agents, and Avro with Schema Registry are designed, not built. Confluent Cloud settings are supported but not yet tested against a Confluent Cloud cluster.