Urgent.News

What's breaking now, across thousands of outlets.

AI

Building Persistent AI Memory for Event-Driven Architectures Using Cognee and AsyncAPI

As distributed systems expand, message brokers and event streams (such as Apache Kafka, RabbitMQ, WebSockets, and MQTT) form the central nervous system of modern enterprise architectures. Teams standardize these event contracts using AsyncAPI (the Linux Foundation open standard). However, AI agents, architecture copilots, and debugging tools struggle to reason across event-driven systems: They…

Modern distributed systems utilize message brokers and event streams as the central nervous system, with protocols like Apache Kafka, RabbitMQ, WebSockets, and MQTT forming the backbone of enterprise architectures. Teams standardize these event contracts using AsyncAPI, an open standard maintained by the Linux Foundation. However, AI agents, architecture copilots, and debugging tools struggle to reason across event-driven systems due to their complexity.

They fail to connect producers, topics, and consumers into unified flows, cannot track how JSON schema payload structures evolve across microservices, and lack persistent relational awareness of which services subscribe to which events.

To address this gap, engineers have created the AsyncAPI Specification Data Connector for Cognee. This solution transforms asynchronous event architectures into interconnected, queryable knowledge graphs. Knowledge graphs are crucial for event-driven systems as they represent event topologies as graph networks, allowing brokers/servers to host channels/topics, producers to publish messages with specific payload schemas, and consumers to subscribe to topics and trigger downstream business logic.

The pipeline architecture of the AsyncAPI connector involves several steps. First, the AsyncAPI Specification (YAML/JSON) is parsed, discovering servers, topics, and schemas. The event payload and operation normalization process converts the event contracts into semantic markdown documents. These documents are then fed into Cognee's engine to build a persistent knowledge graph and vector store.

The connector supports automatic discovery of various brokers, including Kafka, WebSocket, RabbitMQ, and MQTT. It also performs full-snapshot sync and forget-on-delete, ensuring that deprecated topics or removed messages are automatically removed from the graph. Document-mode processing sets the DOCUMENT_SOURCE_ATTR to asyncapi, directing event schemas straight into Cognee's natural language cognify entity-extraction pipeline.

To get started, users can install the cognee-community-connector-asyncapi and cognee packages using pip. They then need to import the necessary modules, including asyncio, pathlib, cognee, and the asyncapi_source function from cognee_community_connector_asyncapi. The main function demonstrates how to point to an AsyncAPI file or directory, ingest the AsyncAPI event schemas into Cognee, and build the event graph using the cognify function.

Once the event knowledge graph is persistent, users can query the graph using the search function to retrieve insights about the event flow, such as which Kafka topics handle user registrations and what fields are required in the payload. This autonomous AI architecture agent can provide valuable insights into event-driven systems, enabling better understanding and management of complex distributed architectures.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at dev.to →

More in AI

Building Persistent AI Memory for VitePress Documentation Sites Using Cognee

The modern frontend tooling ecosystem (including Vite, Vue.js, Rollup, Vitest, and Pinia) relies on VitePress to power its lightning-fast static documentation sites.

  • VitePress ecosystem uses Vite, Vue.js, Rollup, Vitest, and Pinia
  • Cognee connector transforms VitePress sites into persistent knowledge graphs
  • Connector automatically parses sidebar groups and custom containers

Local AI Email Summarizer

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built Whether you're a small business owner or have a side hustle, you likely deal with a lot of…

  • Local AI Email Summarizer simplifies lengthy emails for small business owners
  • Web app connects to local AI servers like Ollama, preserving data privacy
  • Generates concise summaries to reduce cognitive burden and decision fatigue

More from Saturday 24 October →