K9X.ai BETA
Questions and answers

FAQ

28 questions about K9X Streams and k9x Origin, from the basics to how it works under the hood.

The basics
1What is K9X Streams?The reference demo of k9x Origin, running at streams.k9x.ai: a payment-release agent on simulated Accounts Payable events, with an agent simulator and a threat simulator. Open source (Apache 2.0).
2What is k9x Origin?A component built into the K9-AIF framework (1.18) that answers one question for an agent: what is true right now about this entity, and where did that come from?
3Is k9x Origin a separate product or service I install?No. It ships inside k9-aif 1.18, like k9x Shield. A solution switches it on in config/config.yaml and describes itself in config/origin.yaml.
4Is k9x Origin an MCP server?It is a framework component (K9Origin). Agents reach it over MCP through OriginMCPServer; orchestrators call it directly, in-process. MCP is how agents call it, not what it is.
5Agents can already call APIs. Why do they need this?For data that lives in one system with a good API, calling that API is the right design. Origin earns its place when a decision spans several systems: one call instead of many, the history of what changed, being told when something happens, less load on the systems of record, and governance applied once at the edge.
6What does an agent get back?One answer: the value, as_of (when it changed at its source), age_seconds, version, source (a stream event or the system of record) and flags (quarantined, in review, conflict).
7What is "live state"?A read model: the latest value of each entity (an invoice, a vendor, a claim), built from events as they arrive, with the change history and the event behind every value. It can be rebuilt from the topics at any time.
8Is live state a system of record?No. It is read-only and derived. The systems that own the data (ERP, claims, payments) stay the truth; their changes flow back into live state as events.
9Does Origin execute actions?No, it is read-only by design. Actions go to the system that owns the data, as a separate call, carrying Origin's version so the action is refused if anything changed.
10How is it different from RAG and a vector database?They answer different questions. The retriever (K9Retriever) searches documents by meaning: policies, contracts, manuals. Origin returns the exact current state of a known entity. A squad often uses both.
Using it
11Where does Origin's data come from?Two ways. Pushed in continuously: events from databases (change data capture), business applications, logs and IoT, through Kafka. Pulled on demand: the system of record, over MCP, REST or SQL, when an entity is missing or a step must be verified.
12Which brokers does it work with?Anything that speaks the Kafka protocol: Apache Kafka, Confluent Platform and Confluent Cloud, Redpanda, Amazon MSK. SSL and SASL are set in .env (Confluent Cloud: SASL_SSL with PLAIN and an API key).
13Do my sources have to send K9-AIF events?No. An envelope mapper per topic converts what arrives: debezium for database change records, log_line for application logs, native for K9-AIF events, or your own mapper.
14Can I use it without Kafka?Yes. With streams off, Origin answers from the systems of record alone (read-through), still governed and audited. A webhook receiver can also feed live state directly with ContextIngest.ingest_raw().
15What happens if an entity is not in live state?If the entity has a system of record, Origin reads it through, stores it and answers with source.kind: system_of_record. Without one, the answer is found: false, never an invented value.
16What does "verify" do?For steps you mark as irreversible (verify_before in origin.yaml), Origin also asks the system of record and compares the fields it owns. A disagreement is flagged as a conflict.
17How does Origin decide whether data is too old?It doesn't. It reports as_of and age_seconds as facts. Whether an age matters for a decision is a business rule.
18Where do business rules go, for example "claims over $5,000 need a person"?In a rules step in the squad: K9RulesAgent with rules in YAML (K9RulesAdapter) or a decision service (RestRulesAdapter: Drools, ODM, OpenL and others). A matching rule raises a human-review case.
19How is it secured?k9x Shield screens every event at the gate, every request before data is read, and every answer before it leaves. Each agent sees only the entities its scope allows. Quarantine, review and conflict flags are always returned, never hidden.
20What does "quarantined" mean?An event for this entity was refused by Shield, for example a vendor note with planted instructions or a raw card number. Its content is never applied; the entity is marked so agents know untrusted data arrived.
Under the hood
21What if events arrive out of order?Live state applies events by when they happened at the source, not when they arrived. A late event never overwrites newer data; it is kept in the history, and a late event that contradicts a watched field is flagged.
22What is a conflict?A status that reverses within a window (for example approved -> disapproved), a late event that contradicts current data, or a disagreement with the system of record. Origin flags it; business rules decide what follows, usually a person.
23Does it replace Apache Flink?No. Flink (or Kafka Streams, ksqlDB) is an optional tier in front of it for heavy curation: filtering, joining, enriching at volume. Origin reads the curated topics.
24How does it scale?Origin and the ingest workers keep no state of their own; shared live state lives in Redis. Run several Origin MCP servers behind a load balancer. Consumer groups for ingest workers are the next step.
25What happens when Redis runs out of memory?Run Redis with volatile-lru: the least recently used entities are evicted, quarantine markers never are. An evicted entity comes back by read-through, marked history_available: false.
26Can a duplicate action still happen?Origin shrinks the window to seconds, but cannot close it alone. The final guarantee belongs in the system of record: send Origin's version with the action (a conditional update) or use an idempotency key, so a changed record refuses the action.
27Does my existing K9-AIF solution change?No. Without origin: in config.yaml, nothing changes. Solutions using the 1.17 context fabric keep working.
28How do I add it to my solution, and which versions do I need?Five steps, on the Architecture page. pip install "k9-aif[kafka,mcp,redis]>=1.18"; MCP SDK 1.x and 2.x are both supported. Run the demo locally with ./run.sh, or in Podman with ./ubuntu/build-run.sh all.

More detail: Architecture · Live demo · k9x Origin design ↗