<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shubham Vernekar</title>
    <description>The latest articles on DEV Community by Shubham Vernekar (@shubham_vernekar_67e4a407).</description>
    <link>https://dev.to/shubham_vernekar_67e4a407</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4204483%2F3412abf5-86d4-447b-a8aa-0926960596cd.png</url>
      <title>DEV Community: Shubham Vernekar</title>
      <link>https://dev.to/shubham_vernekar_67e4a407</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shubham_vernekar_67e4a407"/>
    <language>en</language>
    <item>
      <title>Zero-Hallucination Reverse Proxies for AI DevOps: Building a Caddyfile Connector for Cognee</title>
      <dc:creator>Shubham Vernekar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 07:24:19 +0000</pubDate>
      <link>https://dev.to/shubham_vernekar_67e4a407/zero-hallucination-reverse-proxies-for-ai-devops-building-a-caddyfile-connector-for-cognee-37f</link>
      <guid>https://dev.to/shubham_vernekar_67e4a407/zero-hallucination-reverse-proxies-for-ai-devops-building-a-caddyfile-connector-for-cognee-37f</guid>
      <description>&lt;p&gt;Autonomous AI DevOps and site reliability engineering (SRE) agents—such as Claude Code, Devin, Cursor, and GitHub Copilot—are increasingly being used to diagnose routing issues, configure SSL certificates, and manage reverse proxies for microservices.&lt;/p&gt;

&lt;p&gt;But there's a catch: &lt;strong&gt;an AI agent can generate a plausible configuration without knowing how your infrastructure is actually configured.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That gap can lead to problems such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Port confusion:&lt;/strong&gt; Routing requests to &lt;code&gt;localhost:8000&lt;/code&gt; when the service actually listens on port &lt;code&gt;8080&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incorrect path matching:&lt;/strong&gt; Confusing Caddy's named matchers, such as &lt;code&gt;@api&lt;/code&gt;, with directives such as &lt;code&gt;handle_path&lt;/code&gt;, or overlooking when a path prefix needs to be stripped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Header-handling mistakes:&lt;/strong&gt; Misunderstanding how request headers such as &lt;code&gt;X-Forwarded-For&lt;/code&gt; and &lt;code&gt;X-Real-IP&lt;/code&gt; are configured or propagated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLS misconfiguration:&lt;/strong&gt; Suggesting invalid directives or overlooking existing HTTPS and certificate settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why does this happen? An LLM may rely on general examples instead of the application's actual routing rules, upstream addresses, and server configuration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://caddyserver.com/" rel="noopener noreferrer"&gt;Caddy&lt;/a&gt; is a modern web server known for automatic HTTPS and its human-readable, declarative &lt;code&gt;Caddyfile&lt;/code&gt; configuration format. A Caddyfile describes site addresses, handlers, matchers, reverse proxies, and other aspects of server behavior.&lt;/p&gt;

&lt;p&gt;As part of &lt;strong&gt;Mergetober&lt;/strong&gt;, I built the &lt;strong&gt;Caddy Web Server Data-Source Connector&lt;/strong&gt; for &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt;, named &lt;code&gt;cognee-community-connector-caddy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The goal is to make Caddy configuration available through Cognee's knowledge and retrieval workflow, helping AI agents access relevant routing context before recommending infrastructure changes.&lt;/p&gt;

&lt;p&gt;In this article, we'll explore why Caddyfile context matters, look at the connector's intended architecture, and walk through an example ingestion workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Caddyfile Routing Context Matters
&lt;/h2&gt;

&lt;p&gt;In modern cloud and edge infrastructure, Caddy often acts as an entry point for web traffic. A production Caddyfile may define several important pieces of infrastructure context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Site addresses and ports:&lt;/strong&gt; Hosts and listening addresses such as &lt;code&gt;example.com&lt;/code&gt;, &lt;code&gt;api.example.com&lt;/code&gt;, &lt;code&gt;:80&lt;/code&gt;, and &lt;code&gt;:443&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path matchers and handlers:&lt;/strong&gt; Routing rules such as &lt;code&gt;@api path /api/*&lt;/code&gt; and &lt;code&gt;handle_path /docs/*&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse proxy upstreams:&lt;/strong&gt; Backend addresses and proxy targets, such as &lt;code&gt;reverse_proxy 127.0.0.1:8080&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Headers and URL rewrites:&lt;/strong&gt; Request and response header behavior, along with path transformations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TLS configuration:&lt;/strong&gt; Automatic HTTPS behavior and custom certificate settings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Imagine asking an AI DevOps agent to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Add a route for the analytics service."&lt;/li&gt;
&lt;li&gt;"Troubleshoot why the docs endpoint returns a 404."&lt;/li&gt;
&lt;li&gt;"Find out which backend handles requests to &lt;code&gt;/api/*&lt;/code&gt;."&lt;/li&gt;
&lt;li&gt;"Check whether the existing reverse proxy uses the correct port."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before suggesting changes, the agent needs to understand the existing configuration.&lt;/p&gt;

&lt;p&gt;Making the Caddyfile searchable gives the agent a way to retrieve relevant routing definitions rather than relying entirely on generic configuration patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Introducing Cognee: Memory for Web Routing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt; is an open-source framework for building AI memory systems using structured knowledge and retrieval.&lt;/p&gt;

&lt;p&gt;The Caddy connector aims to make routing configuration easier for developers and AI agents to discover.&lt;/p&gt;

&lt;p&gt;Its intended use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Site and proxy discovery:&lt;/strong&gt; Finding site blocks, matchers, and reverse proxy definitions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routing relationships:&lt;/strong&gt; Representing relationships between hosts, path matchers, and upstream backends where supported by the connector and ingestion pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic retrieval:&lt;/strong&gt; Asking natural-language questions such as, "Which backend handles requests to &lt;code&gt;/auth/&lt;/code&gt;?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context-informed configuration:&lt;/strong&gt; Providing relevant configuration details before an agent proposes routing or reverse proxy changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, an agent could ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What backend port handles &lt;code&gt;/v1/*&lt;/code&gt; requests on &lt;code&gt;api.company.com&lt;/code&gt;?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the corresponding configuration has been ingested and the retrieval pipeline returns the relevant information, the agent can use that context to inform its answer.&lt;/p&gt;

&lt;p&gt;The important distinction is that retrieval provides &lt;strong&gt;evidence for an agent to reason from&lt;/strong&gt;. It doesn't automatically guarantee that every answer is correct or that a proposed configuration is safe to deploy.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Architectural Overview: The Caddy Connector
&lt;/h2&gt;

&lt;p&gt;The intended workflow connects a Caddyfile to Cognee's ingestion and retrieval pipeline, making configuration information available to an AI DevOps agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌───────────────────────────────┐
│       Caddyfile               │
│  Sites, Matchers, Proxies     │
└───────────────┬───────────────┘
                │
                ▼
┌───────────────────────────────┐
│  Caddy Web Server Connector   │
│  cognee-community-connector-  │
│  caddy                        │
└───────────────┬───────────────┘
                │
                ▼
┌───────────────────────────────┐
│  Parse Relevant Configuration │
│  Sites, Proxies, Matchers,    │
│  and Directives               │
└───────────────┬───────────────┘
                │
                ▼
┌───────────────────────────────┐
│      Cognee Ingestion         │
│  Knowledge Processing         │
└───────────────┬───────────────┘
                │
                ▼
┌───────────────────────────────┐
│  Structured Knowledge and    │
│  Retrieval                    │
└───────────────┬───────────────┘
                │
                ▼
┌───────────────────────────────┐
│       AI DevOps Agent         │
│  Context-Informed Suggestions │
└───────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The diagram illustrates the intended architecture, not a claim that every stage has been independently validated in production.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1. Stable Entity Identifiers
&lt;/h3&gt;

&lt;p&gt;A connector can assign deterministic identifiers to site blocks and other configuration entities.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;caddy:site:{primary_address_slug}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Possible identifiers include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;caddy:site:example_com
caddy:site:api_company_com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Consistent identifiers can help identify the same logical entity across repeated imports. Whether this prevents duplicate knowledge nodes depends on how the connector and Cognee ingestion pipeline handle entity identity and deduplication.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2. Keeping Routing Knowledge Synchronized
&lt;/h3&gt;

&lt;p&gt;Web server configurations change as services are deployed, decommissioned, and reconfigured. A useful connector should account for those changes so that retrieved knowledge doesn't continue to describe routes that no longer exist.&lt;/p&gt;

&lt;p&gt;A replacement strategy, such as &lt;code&gt;write_disposition="replace"&lt;/code&gt;, may be relevant to this workflow. However, &lt;strong&gt;replacing imported data does not by itself prove that all obsolete knowledge entities and relationships will be deleted&lt;/strong&gt;. That behavior depends on the connector's implementation and Cognee's cleanup semantics.&lt;/p&gt;

&lt;p&gt;For reliable synchronization, test the complete lifecycle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ingest a Caddyfile containing a site and upstream.&lt;/li&gt;
&lt;li&gt;Remove or change that site or upstream.&lt;/li&gt;
&lt;li&gt;Re-ingest the modified configuration.&lt;/li&gt;
&lt;li&gt;Search for the old route and verify that obsolete information is no longer returned.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is especially important when AI agents use retrieved configuration to recommend changes to production infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3. Agent-Friendly Configuration Representations
&lt;/h3&gt;

&lt;p&gt;A Caddy site can be summarized in a compact, readable representation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Site&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api.company.com&lt;/span&gt;
&lt;span class="na"&gt;Matchers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;@api"&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/v1/*"&lt;/span&gt;
&lt;span class="na"&gt;Handlers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;reverse_proxy&lt;/span&gt;
    &lt;span class="na"&gt;upstream&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1:8080"&lt;/span&gt;
&lt;span class="na"&gt;Headers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;Strict-Transport-Security&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max-age=31536000"&lt;/span&gt;
&lt;span class="na"&gt;TLS&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Automatic HTTPS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative summary, not native Caddyfile syntax. The exact representation produced by the connector depends on its parser and data model.&lt;/p&gt;

&lt;p&gt;It highlights the information an agent may need when reasoning about routing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Site address&lt;/li&gt;
&lt;li&gt;Path matcher&lt;/li&gt;
&lt;li&gt;Reverse proxy target&lt;/li&gt;
&lt;li&gt;Relevant headers&lt;/li&gt;
&lt;li&gt;TLS behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The more accurately these details are represented and retrieved, the better the agent can ground its recommendations in the application's existing configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Step-by-Step: Ingesting a Caddyfile into Cognee
&lt;/h2&gt;

&lt;p&gt;Let's look at an example workflow for loading routing configuration into Cognee and querying it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The commands and code below illustrate the intended integration. Confirm the connector's published package name, import path, function signature, and supported Cognee API parameters against the implementation in &lt;a href="https://github.com/topoteretes/cognee-community/pull/496" rel="noopener noreferrer"&gt;PR #496&lt;/a&gt; before running the example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install the Dependencies
&lt;/h3&gt;

&lt;p&gt;Install Cognee and the connector:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;cognee cognee-community-connector-caddy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the connector has not been published to the package index, install it using the installation instructions provided by the pull request instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Prepare Your Directory
&lt;/h3&gt;

&lt;p&gt;Create a project directory containing your Caddyfile and Python script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;routing-project/
├── Caddyfile
└── index_routes.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this example, the Caddyfile defines separate routes for the API and analytics services.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api.company.com {
    @api path /v1/*
    reverse_proxy @api 127.0.0.1:8080

    @analytics path /analytics/*
    reverse_proxy @analytics 127.0.0.1:9090
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requests matching &lt;code&gt;/v1/*&lt;/code&gt; are sent to &lt;code&gt;127.0.0.1:8080&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Requests matching &lt;code&gt;/analytics/*&lt;/code&gt; are sent to &lt;code&gt;127.0.0.1:9090&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;path&lt;/code&gt; matcher selects matching requests. Unlike &lt;code&gt;handle_path&lt;/code&gt;, it does not itself strip the matched path prefix before proxying.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Ingest and Search the Routing Configuration
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;index_routes.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_caddy&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;caddy_source&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# 1. Load the Caddyfile through the connector.
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Loading Caddyfile into Cognee...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;caddy_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;caddyfile_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./Caddyfile&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 2. Ingest the configuration.
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;web_routing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;max_rows_per_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 3. Process the ingested information.
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Building routing knowledge...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;web_routing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 4. Search for routing information.
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Searching routing configuration...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What backend port handles /v1/* requests on api.company.com?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;web_routing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example demonstrates four conceptual stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Load:&lt;/strong&gt; Read the Caddyfile using the connector.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingest:&lt;/strong&gt; Pass the source to Cognee.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process:&lt;/strong&gt; Build the knowledge representation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieve:&lt;/strong&gt; Ask a natural-language question about a route.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;code&gt;caddy_source&lt;/code&gt; import, &lt;code&gt;caddyfile_path&lt;/code&gt; argument, and &lt;code&gt;max_rows_per_table&lt;/code&gt; parameter are example API usage and should be checked against the actual connector and Cognee versions. You may also need to configure Cognee's storage and language-model settings before ingestion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Inspect the Results
&lt;/h3&gt;

&lt;p&gt;For the sample configuration, the expected answer to the query is that requests matching &lt;code&gt;/v1/*&lt;/code&gt; on &lt;code&gt;api.company.com&lt;/code&gt; are proxied to &lt;code&gt;127.0.0.1:8080&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Treat this as the expected result of the example, not a verified execution result.&lt;/p&gt;

&lt;p&gt;Before relying on the connector in a real environment, test several cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A route that exists.&lt;/li&gt;
&lt;li&gt;A route that does not exist.&lt;/li&gt;
&lt;li&gt;A changed upstream port.&lt;/li&gt;
&lt;li&gt;A removed matcher or site.&lt;/li&gt;
&lt;li&gt;Multiple site blocks with different upstreams.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tests help establish whether the connector captures the relevant configuration correctly and whether retrieval reflects subsequent changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. From Retrieved Context to Better-Informed Proxy Changes
&lt;/h2&gt;

&lt;p&gt;Suppose an AI agent retrieves the existing routing configuration and discovers that the API and analytics services use different backend ports.&lt;/p&gt;

&lt;p&gt;It can use that context when proposing a configuration such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api.company.com {
    @api path /v1/*
    reverse_proxy @api 127.0.0.1:8080

    @analytics path /analytics/*
    reverse_proxy @analytics 127.0.0.1:9090
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of guessing the upstream targets from generic examples, the agent can reference the configuration available through the retrieval workflow.&lt;/p&gt;

&lt;p&gt;That distinction matters in DevOps: a plausible configuration isn't necessarily the right configuration for a particular application.&lt;/p&gt;

&lt;p&gt;The connector is intended to support a more grounded workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieve the existing configuration.&lt;/li&gt;
&lt;li&gt;Identify the relevant site, matcher, and upstream.&lt;/li&gt;
&lt;li&gt;Propose a change based on the retrieved information.&lt;/li&gt;
&lt;li&gt;Validate the proposed configuration.&lt;/li&gt;
&lt;li&gt;Test the behavior before deploying it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Retrieval alone doesn't eliminate hallucinations or guarantee safe changes. Production use should still include Caddy configuration validation, appropriate tests, and human review for consequential changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Open-Source Pull Request and References
&lt;/h2&gt;

&lt;p&gt;This connector was developed as part of the Cognee Mergetober community contribution series.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Connector pull request:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee-community/pull/496" rel="noopener noreferrer"&gt;Cognee Community PR #496&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related issue:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee/issues/6318" rel="noopener noreferrer"&gt;Cognee issue #6318&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognee repository:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;github.com/topoteretes/cognee&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caddy documentation:&lt;/strong&gt; &lt;a href="https://caddyserver.com/docs/" rel="noopener noreferrer"&gt;caddyserver.com/docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the pull request for the connector's current implementation, supported configuration features, and installation instructions.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. The Grand Finale: Five Connectors for AI Engineering Context
&lt;/h2&gt;

&lt;p&gt;This concludes my &lt;strong&gt;five-connector Mergetober series&lt;/strong&gt; for &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Throughout this series, I explored ways to make different kinds of software engineering context accessible to AI agents.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Day&lt;/th&gt;
&lt;th&gt;Connector&lt;/th&gt;
&lt;th&gt;Input Source&lt;/th&gt;
&lt;th&gt;Problem Addressed&lt;/th&gt;
&lt;th&gt;Pull Request&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Hoppscotch&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;collection.json&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;API endpoints, query parameters, authentication, and payload schemas&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/topoteretes/cognee-community/pull/490" rel="noopener noreferrer"&gt;#490&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Prisma&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;schema.prisma&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Database models, relations, field constraints, and enums&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/topoteretes/cognee-community/pull/491" rel="noopener noreferrer"&gt;#491&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Docker Compose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Container services, network links, and port bindings&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/topoteretes/cognee-community/pull/492" rel="noopener noreferrer"&gt;#492&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GraphQL SDL&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;schema.graphql&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Typed operations, inputs, mutations, and unions&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/topoteretes/cognee-community/pull/495" rel="noopener noreferrer"&gt;#495&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Caddy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Caddyfile&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Web server routing, reverse proxies, path matchers, and TLS configuration&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/topoteretes/cognee-community/pull/496" rel="noopener noreferrer"&gt;#496&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The common idea behind these contributions is simple: &lt;strong&gt;AI agents need access to relevant engineering context, not just general programming knowledge.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An agent that can retrieve information about an application's APIs, database models, container topology, GraphQL schema, and web server configuration has more project-specific evidence to work with when answering questions or proposing changes.&lt;/p&gt;

&lt;p&gt;That doesn't remove the need for validation, but it creates a foundation for more context-aware engineering workflows.&lt;/p&gt;

&lt;p&gt;A huge thank you to the &lt;strong&gt;Cognee team and community&lt;/strong&gt; for hosting Mergetober and providing an opportunity to contribute to the open-source ecosystem!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which of these five connectors would be most useful in your engineering stack?&lt;/strong&gt; Let me know in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>caddy</category>
      <category>python</category>
    </item>
    <item>
      <title>GraphQL Schema Memory for AI Coding Agents: Building a GraphQL SDL Connector for Cognee</title>
      <dc:creator>Shubham Vernekar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 07:13:31 +0000</pubDate>
      <link>https://dev.to/shubham_vernekar_67e4a407/graphql-schema-memory-for-ai-coding-agents-building-a-graphql-sdl-connector-for-cognee-172h</link>
      <guid>https://dev.to/shubham_vernekar_67e4a407/graphql-schema-memory-for-ai-coding-agents-building-a-graphql-sdl-connector-for-cognee-172h</guid>
      <description>&lt;p&gt;Imagine asking an AI coding agent to fetch a user's profile, and it generates this query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"123"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;profilePicture&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks reasonable. There is just one problem: your API does not have a &lt;code&gt;profilePicture&lt;/code&gt; field. It uses &lt;code&gt;avatarUrl&lt;/code&gt; instead.&lt;/p&gt;

&lt;p&gt;The query fails validation, and you have to correct the agent's assumption before continuing.&lt;/p&gt;

&lt;p&gt;This illustrates a frustrating challenge with AI-assisted development: &lt;strong&gt;GraphQL schema hallucination&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agents invent nonexistent field names or subfields.&lt;/li&gt;
&lt;li&gt;They confuse input types, such as &lt;code&gt;input CreateUserInput&lt;/code&gt;, with output object types, such as &lt;code&gt;type User&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;They miss required non-nullable arguments, such as &lt;code&gt;String!&lt;/code&gt;, or use incorrect argument names like &lt;code&gt;filter&lt;/code&gt; instead of &lt;code&gt;where&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;They request subfields on scalar fields or assume union members that do not exist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As part of &lt;strong&gt;Mergetober&lt;/strong&gt;, I built the &lt;strong&gt;GraphQL Schema Data-Source Connector&lt;/strong&gt; for &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt;, named &lt;code&gt;cognee-community-connector-graphql&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The goal is to make GraphQL Schema Definition Language (SDL) files accessible through Cognee's knowledge and retrieval workflow, giving AI agents relevant schema context before they generate queries or mutations.&lt;/p&gt;

&lt;p&gt;In this article, I'll explain why GraphQL SDL memory matters, explore the connector's architecture, and walk through an example ingestion workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why GraphQL Schema Context Matters
&lt;/h2&gt;

&lt;p&gt;GraphQL is strongly typed by design. Its Schema Definition Language (SDL) describes the contract between a client and a server.&lt;/p&gt;

&lt;p&gt;A typical &lt;code&gt;schema.graphql&lt;/code&gt; file defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Object types and scalars:&lt;/strong&gt; Entities such as &lt;code&gt;User&lt;/code&gt;, &lt;code&gt;Product&lt;/code&gt;, and &lt;code&gt;Order&lt;/code&gt;, with fields and type modifiers such as &lt;code&gt;String!&lt;/code&gt; and &lt;code&gt;[Item!]!&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Root operations:&lt;/strong&gt; &lt;code&gt;Query&lt;/code&gt;, &lt;code&gt;Mutation&lt;/code&gt;, and &lt;code&gt;Subscription&lt;/code&gt; types, including operation names, arguments, and return types.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Input types:&lt;/strong&gt; Dedicated input objects such as &lt;code&gt;CreateUserInput&lt;/code&gt; and &lt;code&gt;PaginationInput&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enums and unions:&lt;/strong&gt; Allowed values and alternative result types.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interfaces and directives:&lt;/strong&gt; Shared type contracts and additional schema behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Descriptions:&lt;/strong&gt; Documentation explaining the purpose of types, fields, and arguments.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consider this schema fragment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;avatarUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;!):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An agent with access to this definition can determine that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;user&lt;/code&gt; query field accepts an argument named &lt;code&gt;id&lt;/code&gt; of type &lt;code&gt;ID!&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The return type is &lt;code&gt;User&lt;/code&gt;, which may be &lt;code&gt;null&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;User&lt;/code&gt; type exposes &lt;code&gt;avatarUrl&lt;/code&gt;, not &lt;code&gt;profilePicture&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt; fields are non-nullable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without this context, an LLM may generate a query based on patterns it has encountered in other applications rather than the actual contract of the current API.&lt;/p&gt;

&lt;p&gt;Pasting an entire large schema into every prompt can consume tokens and make relevant information harder to locate. A more scalable approach is to &lt;strong&gt;ingest schema definitions, organize them as searchable knowledge, and retrieve relevant context on demand&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Introducing Cognee: Knowledge Graphs and Retrieval
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt; is an open-source framework for building AI memory systems using structured knowledge and retrieval.&lt;/p&gt;

&lt;p&gt;The GraphQL connector aims to make schema information easier for developers and AI agents to discover and use.&lt;/p&gt;

&lt;p&gt;The intended workflow focuses on four capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schema discovery:&lt;/strong&gt; Make types, operations, and input definitions searchable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relationship preservation:&lt;/strong&gt; Represent useful connections between fields and the types they reference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic retrieval:&lt;/strong&gt; Allow developers to ask questions in natural language, such as, &lt;em&gt;"Which mutation updates a user's subscription, and what arguments are required?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context-informed generation:&lt;/strong&gt; Supply relevant schema definitions to a coding agent before it writes a query or mutation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, a developer could ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which mutation updates an organization's subscription, what arguments does it require, and what fields does it return?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Retrieved schema information can help the agent generate code that better matches the API contract instead of relying exclusively on learned conventions.&lt;/p&gt;

&lt;p&gt;This approach can reduce schema-related mistakes, although the generated operation should still be validated against the current schema.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Architectural Overview: The GraphQL Connector
&lt;/h2&gt;

&lt;p&gt;The high-level workflow can be represented as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;schema.graphql / schema.gql SDL File
                |
                v
       GraphQL Schema Connector
  (cognee-community-connector-graphql)
                |
                v
 Parse schema entities and definitions
 Types, fields, inputs, enums, arguments
                |
                v
         Cognee Ingestion
                |
                v
    Structured Knowledge + Retrieval
                |
                v
         AI Coding Agent
                |
                v
    Schema-Informed GraphQL Code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.1. Stable Entity Identifiers
&lt;/h3&gt;

&lt;p&gt;A connector can use deterministic identifiers to represent different GraphQL entities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graphql:{kind}:{name}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graphql:type:user
graphql:input:createuserinput
graphql:enum:role
graphql:mutation:updatesubscription
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Consistent identifiers can help identify the same entity across repeated imports. Whether they prevent duplicate records depends on the connector's identity and deduplication logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2. Keeping Schema Knowledge Synchronized
&lt;/h3&gt;

&lt;p&gt;API schemas evolve as features are added, changed, and removed.&lt;/p&gt;

&lt;p&gt;A useful ingestion workflow should account for these changes so retrieval does not continue returning obsolete definitions.&lt;/p&gt;

&lt;p&gt;A snapshot-based replacement strategy, such as &lt;code&gt;write_disposition="replace"&lt;/code&gt;, may be used to replace previously ingested data. However, its exact effect depends on the ingestion API and how existing entities and relationships are managed.&lt;/p&gt;

&lt;p&gt;Before relying on replacement behavior, verify that re-ingestion also removes stale definitions and relationships associated with deleted schema elements.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3. Agent-Friendly Schema Representations
&lt;/h3&gt;

&lt;p&gt;A mutation can be represented in a compact, readable format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mutation&lt;/span&gt;
&lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;updateSubscription&lt;/span&gt;
&lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Updates the billing tier for an active organization.&lt;/span&gt;
&lt;span class="na"&gt;Arguments&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;orgId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ID!&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;plan&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SubscriptionPlan!&lt;/span&gt;
&lt;span class="na"&gt;Return Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;SubscriptionPayload!&lt;/span&gt;
&lt;span class="na"&gt;Payload Fields&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Boolean!&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;subscription&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Subscription&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;errors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;String!&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative representation, not GraphQL SDL. It highlights information useful for code generation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operation name&lt;/li&gt;
&lt;li&gt;Argument names and types&lt;/li&gt;
&lt;li&gt;Return type&lt;/li&gt;
&lt;li&gt;Relevant nested fields&lt;/li&gt;
&lt;li&gt;Descriptions and constraints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The objective is to make the API contract easier to retrieve and interpret when an agent needs to generate a specific operation.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Step-by-Step: Ingesting &lt;code&gt;schema.graphql&lt;/code&gt; into Cognee
&lt;/h2&gt;

&lt;p&gt;The following example illustrates the intended ingestion and retrieval workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before running it:&lt;/strong&gt; Verify the connector's current package instructions, exported function names, and function signatures against the actual implementation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install Dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;cognee cognee-community-connector-graphql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Prepare Your Schema
&lt;/h3&gt;

&lt;p&gt;Place your GraphQL schema and Python script in the same directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graphql-project/
├── schema.graphql
└── index_schema.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;code&gt;schema.graphql&lt;/code&gt; file should contain the SDL definitions for your API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Ingest and Search GraphQL Memory
&lt;/h3&gt;

&lt;p&gt;Create &lt;code&gt;index_schema.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_graphql&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;graphql_source&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# 1. Load the GraphQL schema file
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Loading schema.graphql into Cognee...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;graphql_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;schema_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./schema.graphql&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 2. Ingest the schema into Cognee
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;graphql_api&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;max_rows_per_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 3. Process the ingested information
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Building GraphQL knowledge...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;graphql_api&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 4. Search for a relevant operation
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Searching the GraphQL schema...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which mutation updates a user&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s subscription, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;and what arguments are required?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;graphql_api&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example illustrates four stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the GraphQL schema through the connector.&lt;/li&gt;
&lt;li&gt;Ingest the schema into Cognee.&lt;/li&gt;
&lt;li&gt;Process the ingested information.&lt;/li&gt;
&lt;li&gt;Search for relevant operations using a natural-language question.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The meaning of &lt;code&gt;max_rows_per_table=0&lt;/code&gt;, as well as the connector import path and ingestion API signatures, should be confirmed against the actual package version. Do not assume this setting guarantees a complete schema snapshot without checking the implementation.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Result: More Schema-Informed GraphQL Queries
&lt;/h2&gt;

&lt;p&gt;Suppose the schema defines an &lt;code&gt;updateSubscription&lt;/code&gt; mutation that accepts &lt;code&gt;orgId&lt;/code&gt; and &lt;code&gt;plan&lt;/code&gt; arguments and returns a &lt;code&gt;SubscriptionPayload&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;With relevant schema context available, an agent could generate an operation like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;UpdateBilling&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nv"&gt;$orgId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;!,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nv"&gt;$plan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SubscriptionPlan&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;updateSubscription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;orgId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$orgId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;plan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$plan&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;success&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;subscription&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;plan&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;renewalDate&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative example, not a verified operation from a specific API. It is valid only if the actual schema defines the mutation, argument types, return fields, and nested fields shown here.&lt;/p&gt;

&lt;p&gt;The key difference is the workflow: the agent has relevant schema information to consult before generating code instead of relying exclusively on learned patterns.&lt;/p&gt;

&lt;p&gt;For a more reliable development workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieve the relevant schema definitions.&lt;/li&gt;
&lt;li&gt;Generate the query or mutation using that context.&lt;/li&gt;
&lt;li&gt;Validate the operation against the current GraphQL schema.&lt;/li&gt;
&lt;li&gt;Run tests and handle any remaining errors.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Schema retrieval can reduce unsupported assumptions, but it does not guarantee zero hallucinations or eliminate all validation and runtime errors.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Open-Source Pull Request and References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Connector pull request:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee-community/pull/495" rel="noopener noreferrer"&gt;Cognee Community PR #495&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related issue:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee/issues/6308" rel="noopener noreferrer"&gt;Cognee issue #6308&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognee repository:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;github.com/topoteretes/cognee&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GraphQL documentation:&lt;/strong&gt; &lt;a href="https://graphql.org/" rel="noopener noreferrer"&gt;graphql.org&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These links provide starting points for exploring the contribution, its motivation, and the GraphQL concepts discussed in this article.&lt;/p&gt;




&lt;p&gt;I'm curious about your experience: What's the most common mistake your AI coding agent makes when working with GraphQL—wrong field names, incorrect arguments, or confusing nested return types?&lt;/p&gt;

&lt;p&gt;Share your experience in the comments!&lt;/p&gt;




</description>
      <category>ai</category>
      <category>graphql</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Stop AI Agents from Hallucinating Infrastructure: Building a Docker Compose Connector for Cognee</title>
      <dc:creator>Shubham Vernekar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 06:56:22 +0000</pubDate>
      <link>https://dev.to/shubham_vernekar_67e4a407/stop-ai-agents-from-hallucinating-infrastructure-building-a-docker-compose-connector-for-cognee-16hd</link>
      <guid>https://dev.to/shubham_vernekar_67e4a407/stop-ai-agents-from-hallucinating-infrastructure-building-a-docker-compose-connector-for-cognee-16hd</guid>
      <description>&lt;p&gt;Autonomous AI DevOps and coding agents such as Claude Code, Devin, Cursor, and GitHub Copilot are increasingly trusted to troubleshoot deployment failures, configure CI/CD pipelines, and manage local multi-container development environments.&lt;/p&gt;

&lt;p&gt;Yet, when developers ask an agent to &lt;em&gt;"write an end-to-end test script"&lt;/em&gt; or &lt;em&gt;"debug the backend network connection"&lt;/em&gt;, they can encounter a common problem: &lt;strong&gt;container topology hallucination&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hallucinating service hostnames:&lt;/strong&gt; Calling &lt;code&gt;localhost:5432&lt;/code&gt; instead of the internal network alias &lt;code&gt;db:5432&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port confusion:&lt;/strong&gt; Guessing incorrect host-to-container port mappings, such as assuming Redis is exposed on &lt;code&gt;6380&lt;/code&gt; when the Compose file maps &lt;code&gt;6379:6379&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing volume mounts:&lt;/strong&gt; Assuming persistent file paths that do not match the configured mounts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency blind spots:&lt;/strong&gt; Missing &lt;code&gt;depends_on&lt;/code&gt; relationships or health-check conditions such as &lt;code&gt;service_healthy&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does This Happen?
&lt;/h2&gt;

&lt;p&gt;Large language models (LLMs) generate responses based on learned patterns and the context available to them. Without reliable access to an application's actual infrastructure configuration, they may generate plausible-looking but incorrect commands and deployment scripts.&lt;/p&gt;

&lt;p&gt;In containerized development, &lt;code&gt;compose.yaml&lt;/code&gt; or &lt;code&gt;docker-compose.yml&lt;/code&gt; defines services, networks, volumes, port mappings, and environment configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if AI agents could retrieve this infrastructure information instead of guessing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As part of &lt;strong&gt;Mergetober&lt;/strong&gt;, I worked on a Docker Compose data-source connector for &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt;, intended to make container configuration available through a structured knowledge graph and retrieval pipeline.&lt;/p&gt;

&lt;p&gt;In this article, I'll explain why infrastructure context matters, outline the connector architecture, and demonstrate the intended workflow for ingesting Docker Compose configuration into Cognee.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Docker Compose Topology Matters
&lt;/h2&gt;

&lt;p&gt;In a multi-container application, services communicate through configured networks, expose ports, mount volumes, and depend on other services.&lt;/p&gt;

&lt;p&gt;A typical Docker Compose file defines several important components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Services and images:&lt;/strong&gt; Container images such as &lt;code&gt;postgres:16-alpine&lt;/code&gt; and &lt;code&gt;redis:7&lt;/code&gt;, along with build contexts and Dockerfiles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port bindings:&lt;/strong&gt; Host-to-container mappings such as &lt;code&gt;"8080:80"&lt;/code&gt; and &lt;code&gt;"5432:5432"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service dependencies:&lt;/strong&gt; &lt;code&gt;depends_on&lt;/code&gt; relationships and conditions such as &lt;code&gt;service_healthy&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment variables:&lt;/strong&gt; Connection strings, credentials, and service URLs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Volumes and networks:&lt;/strong&gt; Named volumes, bind mounts, and custom networks such as &lt;code&gt;app-network&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When an AI DevOps agent attempts to run migrations, seed a database, write integration tests, or debug network connectivity without this context, it may make incorrect assumptions.&lt;/p&gt;

&lt;p&gt;Pasting an entire 500-line Compose file into every prompt is one possible workaround, but it can consume context-window space and make relevant configuration harder to find.&lt;/p&gt;

&lt;p&gt;A better approach is to &lt;strong&gt;ingest, structure, index, and retrieve infrastructure topology on demand&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Introducing Cognee: Infrastructure Memory for AI Agents
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt; is an open-source framework for building AI memory systems using structured knowledge and retrieval.&lt;/p&gt;

&lt;p&gt;The idea behind combining Docker Compose with Cognee is to make infrastructure configuration easier for AI agents to retrieve when needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Service entities:&lt;/strong&gt; Represent services and their configuration as searchable information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependency relationships:&lt;/strong&gt; Preserve relationships between services where supported by the ingestion pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic retrieval:&lt;/strong&gt; Let developers ask natural-language questions about ports, volumes, networks, and dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grounded DevOps workflows:&lt;/strong&gt; Provide configuration context before an agent generates commands, tests, or deployment scripts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, a developer could ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What services depend on PostgreSQL, which ports are published, and what health-check conditions are configured?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A retrieval system can provide relevant Compose configuration as context for the agent's response. The quality of the result depends on how completely the configuration is parsed, represented, and retrieved.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Architectural Overview: The Docker Compose Connector
&lt;/h2&gt;

&lt;p&gt;The intended data flow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose.yml / compose.yaml
              |
              v
   Docker Compose Connector
              |
              v
Parse Services, Ports, Volumes, Networks and Dependencies
              |
              v
       Cognee Ingestion
              |
              v
Knowledge Graph + Vector Retrieval
              |
              v
       AI DevOps Agent
              |
              v
Infrastructure-Grounded Commands
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.1. Stable Service Identifiers
&lt;/h3&gt;

&lt;p&gt;A connector can assign stable identifiers to individual services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker_compose:service:{service_name}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stable identifiers help distinguish services across repeated imports. Whether they prevent duplicate nodes depends on how the connector and the ingestion pipeline handle entity identity.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2. Full-Snapshot Synchronization
&lt;/h3&gt;

&lt;p&gt;Infrastructure configurations evolve as services are added, removed, or modified.&lt;/p&gt;

&lt;p&gt;A snapshot-based synchronization strategy can help keep indexed infrastructure information aligned with the current Compose file. However, a setting such as &lt;code&gt;write_disposition="replace"&lt;/code&gt; only provides the expected replacement behavior if the connector and the underlying ingestion pipeline explicitly support it.&lt;/p&gt;

&lt;p&gt;Removed services must be handled by the synchronization process; simply ingesting an updated file does not necessarily delete stale entities from existing memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3. Rich, Agent-Friendly Service Representations
&lt;/h3&gt;

&lt;p&gt;A connector can represent each service in a structured, human-readable format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api&lt;/span&gt;
&lt;span class="na"&gt;Image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-org/api:v1.2.0&lt;/span&gt;
&lt;span class="na"&gt;Ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8000:8000"&lt;/span&gt;
&lt;span class="na"&gt;Environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres://&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;@db:5432/app&lt;/span&gt;
&lt;span class="na"&gt;Depends On&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;db&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;condition&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service_healthy&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cache&lt;/span&gt;
&lt;span class="na"&gt;Volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./logs:/var/log/api&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative representation of a service, not a complete Docker Compose file. In a real implementation, sensitive environment values should be redacted or excluded before configuration is stored or exposed to an AI agent.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Step-by-Step: Ingesting Docker Compose into Cognee
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Install Dependencies
&lt;/h3&gt;

&lt;p&gt;The intended installation command is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;cognee cognee-community-connector-docker-compose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm that the connector package is published and that its installation instructions match the implementation you are using.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Prepare Your Directory
&lt;/h3&gt;

&lt;p&gt;Locate your Docker Compose configuration and create a Python script for ingestion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;infrastructure-project/
├── docker-compose.yml
└── ingest_topology.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Ingest and Query Infrastructure Memory
&lt;/h3&gt;

&lt;p&gt;The following example illustrates the intended workflow. Verify the connector's actual import path, function signature, and Cognee API against the repository before running it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_docker_compose&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;docker_compose_source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Step 1: Load the Docker Compose configuration
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Loading Docker Compose configuration...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;docker_compose_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;compose_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./docker-compose.yml&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 2: Ingest the configuration into Cognee
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;infrastructure_topology&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 3: Build the knowledge representation
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Processing infrastructure knowledge...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;infrastructure_topology&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 4: Search infrastructure memory
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Searching container architecture...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What services depend on PostgreSQL, and which ports are published?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;infrastructure_topology&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example demonstrates the intended sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load the Compose configuration through the connector.&lt;/li&gt;
&lt;li&gt;Submit the source to Cognee.&lt;/li&gt;
&lt;li&gt;Process the ingested information into a searchable representation.&lt;/li&gt;
&lt;li&gt;Query the resulting infrastructure context.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The exact behavior depends on the connector implementation and the Cognee version being used.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Result: More Reliable, Topology-Grounded DevOps Workflows
&lt;/h2&gt;

&lt;p&gt;With infrastructure-aware retrieval, an agent can consult the relevant configuration before recommending commands.&lt;/p&gt;

&lt;p&gt;For example, a Compose file might define a service named &lt;code&gt;db&lt;/code&gt; and an application service named &lt;code&gt;api&lt;/code&gt;. Depending on the configuration and the commands supported by the application, the resulting workflow might include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose &lt;span class="nb"&gt;exec &lt;/span&gt;db pg_isready &lt;span class="nt"&gt;-U&lt;/span&gt; postgres
docker compose run &lt;span class="nt"&gt;--rm&lt;/span&gt; api python manage.py migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands are examples, not universal solutions. The service names, database user, executable, and migration command must match the actual project.&lt;/p&gt;

&lt;p&gt;The objective is to help AI agents make better-informed decisions about service names, ports, dependencies, and execution contexts.&lt;/p&gt;

&lt;p&gt;Retrieval can reduce configuration-related guesswork, but it does not guarantee hallucination-free output. Agents should still validate commands against the current configuration and test them in an appropriate environment before using them in production.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Open-Source Pull Request and References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pull request:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee-community/pull/492" rel="noopener noreferrer"&gt;topoteretes/cognee-community#492&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related issue:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee/issues/6307" rel="noopener noreferrer"&gt;topoteretes/cognee#6307&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognee repository:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;github.com/topoteretes/cognee&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker Compose documentation:&lt;/strong&gt; &lt;a href="https://docs.docker.com/compose/" rel="noopener noreferrer"&gt;docs.docker.com/compose&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>ai</category>
      <category>devops</category>
      <category>docker</category>
      <category>python</category>
    </item>
    <item>
      <title>Stop AI Agents from Hallucinating Database Schemas: Prisma ORM Connector for Cognee</title>
      <dc:creator>Shubham Vernekar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 06:48:38 +0000</pubDate>
      <link>https://dev.to/shubham_vernekar_67e4a407/stop-ai-agents-from-hallucinating-database-schemas-prisma-orm-connector-for-cognee-1li2</link>
      <guid>https://dev.to/shubham_vernekar_67e4a407/stop-ai-agents-from-hallucinating-database-schemas-prisma-orm-connector-for-cognee-1li2</guid>
      <description>&lt;p&gt;Autonomous AI coding agents such as Claude Code, Cursor, Devin, and GitHub Copilot are increasingly trusted to write database migrations, backend services, and API controllers. But when developers ask an agent to &lt;em&gt;"add a feature that filters orders by organization role"&lt;/em&gt;, they can encounter a common problem: &lt;strong&gt;database schema hallucination&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent invents field names, calling &lt;code&gt;user.organizationId&lt;/code&gt; when the actual field is &lt;code&gt;user.org_id&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It hallucinates relationships that do not exist between tables.&lt;/li&gt;
&lt;li&gt;It invents enum variants or overlooks foreign key constraints.&lt;/li&gt;
&lt;li&gt;It produces code that looks syntactically correct but fails at runtime.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why does this happen?
&lt;/h3&gt;

&lt;p&gt;Large language models (LLMs) generate responses based on learned patterns and the context available to them. Without reliable access to the application's actual database schema, they may generate plausible-looking but incorrect code.&lt;/p&gt;

&lt;p&gt;In modern full-stack engineering, the &lt;code&gt;schema.prisma&lt;/code&gt; file defines Prisma models, relations, field types, constraints, enums, and indexes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if AI coding agents could retrieve this schema information instead of guessing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As part of &lt;strong&gt;Mergetober&lt;/strong&gt;, I worked on a Prisma Schema Data-Source Connector for &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt;, intended to make Prisma schema information available through a structured knowledge graph and memory pipeline.&lt;/p&gt;

&lt;p&gt;In this article, I'll explain why Prisma schema context matters, how the connector is designed, and how developers can use a schema-ingestion workflow to give AI agents more reliable database context.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Prisma Schemas?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.prisma.io/" rel="noopener noreferrer"&gt;Prisma&lt;/a&gt; is an ORM used across the TypeScript, Node.js, and web development ecosystem.&lt;/p&gt;

&lt;p&gt;A typical &lt;code&gt;schema.prisma&lt;/code&gt; file defines several kinds of information that are essential for generating correct database code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Models and scalar fields:&lt;/strong&gt; Types such as &lt;code&gt;String&lt;/code&gt;, &lt;code&gt;Int&lt;/code&gt;, &lt;code&gt;Boolean&lt;/code&gt;, and &lt;code&gt;DateTime&lt;/code&gt;, along with optional fields (&lt;code&gt;?&lt;/code&gt;) and list fields (&lt;code&gt;[]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Primary keys and attributes:&lt;/strong&gt; &lt;code&gt;@id&lt;/code&gt;, &lt;code&gt;@default(uuid())&lt;/code&gt;, &lt;code&gt;@unique&lt;/code&gt;, and &lt;code&gt;@updatedAt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relational mappings:&lt;/strong&gt; Relations and foreign key declarations such as &lt;code&gt;@relation(fields: [authorId], references: [id])&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enums and custom types:&lt;/strong&gt; Allowed values for roles, statuses, and permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum Role {
  USER
  ADMIN
  OWNER
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Documentation comments:&lt;/strong&gt; Triple-slash comments (&lt;code&gt;///&lt;/code&gt;) that describe models and fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If an AI agent does not have access to the actual schema, it might invent an enum value, use an incorrect field name, or misunderstand a relationship.&lt;/p&gt;

&lt;p&gt;Pasting an entire 2,000-line schema into every prompt is one possible workaround, but it can consume context-window space and make relevant details harder to retrieve.&lt;/p&gt;

&lt;p&gt;A better approach is to &lt;strong&gt;structure, index, and retrieve schema information when it is needed&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Introducing Cognee: Structured Knowledge for AI Agents
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt; is an open-source framework for building AI memory systems using structured knowledge and retrieval.&lt;/p&gt;

&lt;p&gt;The idea behind integrating Prisma with Cognee is to make database schema information easier to retrieve when an AI coding agent needs it.&lt;/p&gt;

&lt;p&gt;A schema-aware workflow can support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Schema entities:&lt;/strong&gt; Represent models and enums as distinct pieces of information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relationship context:&lt;/strong&gt; Preserve relationships between models where supported by the ingestion pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic retrieval:&lt;/strong&gt; Search for relevant models, fields, and relationships using natural-language questions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced guesswork:&lt;/strong&gt; Provide schema context before an agent generates ORM calls, queries, or backend services.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, a developer could ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which model links Users to Organizations, and which field is used as the foreign key?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The system can retrieve relevant schema information and provide it to the agent as supporting context.&lt;/p&gt;

&lt;p&gt;The goal is to ground code generation in the application's actual schema rather than relying on the model's assumptions alone.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Architectural Overview: The Prisma Connector
&lt;/h2&gt;

&lt;p&gt;The connector is located in &lt;code&gt;cognee-community/packages/connector/prisma&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The conceptual architecture looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;schema.prisma File
        |
        v
Prisma Schema Connector (cognee-community)
        |
        v
Extract Models, Relations, Enums and Documentation
        |
        v
Cognee Ingestion Pipeline (dlt resource)
        |
        v
Knowledge Graph + Vector Retrieval
        |
        v
AI Coding Agent (Cursor, Devin, Claude Code)
        |
        v
Schema-Grounded ORM Code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3.1. Deterministic Primary Keys
&lt;/h3&gt;

&lt;p&gt;A connector can use stable identifiers to distinguish models and enums:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prisma:model:{model_name}
prisma:enum:{enum_name}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stable identifiers help track schema entities across repeated imports. However, identifier stability alone does not guarantee idempotent synchronization; the ingestion and storage layers must also handle updates, renamed entities, and duplicate records correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2. Full-Snapshot Synchronization
&lt;/h3&gt;

&lt;p&gt;Database schemas evolve rapidly. Developers add models, rename fields, change relationships, and remove obsolete definitions.&lt;/p&gt;

&lt;p&gt;A snapshot-based synchronization strategy, such as &lt;code&gt;write_disposition="replace"&lt;/code&gt;, may help keep indexed schema information aligned with the current source file.&lt;/p&gt;

&lt;p&gt;However, verify the actual cleanup behavior before assuming that deleted models are automatically removed from every graph and vector index.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3. Rich, Agent-Friendly Schema Representations
&lt;/h3&gt;

&lt;p&gt;A connector can represent schema information in a structured, human-readable format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;Model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;User&lt;/span&gt;
&lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Active user account&lt;/span&gt;
&lt;span class="na"&gt;Fields&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;String @id @default(uuid())&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;String @unique&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;role: Role (default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;USER)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;orgId&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;String&lt;/span&gt;
&lt;span class="na"&gt;Relations&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;organization&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Organization (optional)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;posts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Post[] (one-to-many)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative representation. The actual fields, relationships, and formatting depend on the source schema and connector implementation.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Step-by-Step: Ingesting &lt;code&gt;schema.prisma&lt;/code&gt; into Cognee
&lt;/h2&gt;

&lt;p&gt;The following workflow illustrates the intended integration. Verify the package name, import path, function arguments, and supported APIs against the actual connector implementation before running the example.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Install Dependencies
&lt;/h3&gt;

&lt;p&gt;If the connector is published under the package name shown below, install it using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;cognee cognee-community-connector-prisma
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the connector is available only through a GitHub branch or pull request, follow the repository's installation instructions instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Prepare Your Schema
&lt;/h3&gt;

&lt;p&gt;Locate your Prisma schema file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-project/
├── prisma/
│   └── schema.prisma
└── index_schema.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your schema may be located elsewhere depending on your project configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Ingest and Search Schema Memory
&lt;/h3&gt;

&lt;p&gt;The following Python script assumes that the connector exposes &lt;code&gt;prisma_schema_source()&lt;/code&gt; and that the installed Cognee version supports the APIs shown.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_prisma&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;prisma_schema_source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Step 1: Load schema.prisma.
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Loading schema.prisma into Cognee...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;prisma_schema_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;schema_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./prisma/schema.prisma&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 2: Ingest the schema.
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;database_schema&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 3: Build the knowledge representation.
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Processing schema knowledge...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;database_schema&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Step 4: Query schema memory.
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Searching database schema...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which model links Users to Organizations, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;and which field is used as the foreign key?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;database_schema&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Implementation notes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify that the connector exposes &lt;code&gt;prisma_schema_source()&lt;/code&gt; with a &lt;code&gt;schema_path&lt;/code&gt; argument.&lt;/li&gt;
&lt;li&gt;Confirm that the installed Cognee version supports the shown ingestion, processing, and search interfaces.&lt;/li&gt;
&lt;li&gt;Configure any required LLM, embedding, and storage providers according to Cognee's documentation.&lt;/li&gt;
&lt;li&gt;Test retrieval against known models, fields, and relationships from your schema.&lt;/li&gt;
&lt;li&gt;Treat retrieved schema information as supporting context, not a guarantee of correct generated code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an illustrative integration pattern, not a verified, drop-in script until the connector's actual APIs have been checked.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Result: More Reliable, Schema-Grounded Database Queries
&lt;/h2&gt;

&lt;p&gt;With schema-aware retrieval, an AI coding agent can first retrieve relevant model definitions and use them to construct a query.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;usersInOrg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;prisma&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findMany&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;orgId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;organizationId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ADMIN&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;include&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;organization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; This query is valid only if the actual Prisma schema defines &lt;code&gt;orgId&lt;/code&gt;, the &lt;code&gt;ADMIN&lt;/code&gt; enum value, and the &lt;code&gt;organization&lt;/code&gt; relation as shown. If the schema uses different field names or relationships, the query must be adapted accordingly.&lt;/p&gt;

&lt;p&gt;The goal is to help AI agents use the real schema instead of inventing fields or relationships.&lt;/p&gt;

&lt;p&gt;To evaluate whether this approach works, compare generated code with and without retrieved schema context.&lt;/p&gt;

&lt;p&gt;Potential evaluation metrics include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Field-name accuracy.&lt;/li&gt;
&lt;li&gt;Model and relationship accuracy.&lt;/li&gt;
&lt;li&gt;Enum-value validity.&lt;/li&gt;
&lt;li&gt;Type correctness.&lt;/li&gt;
&lt;li&gt;Successful Prisma type checking.&lt;/li&gt;
&lt;li&gt;Query execution against a test database.&lt;/li&gt;
&lt;li&gt;Frequency of unsupported fields and relations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Testing representative database tasks can help measure whether schema retrieval improves the reliability of AI-generated code.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Open-Source Pull Request and References
&lt;/h2&gt;

&lt;p&gt;This work is part of my exploration of open-source tools that can make AI-assisted software development more reliable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pull request:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee-community/pull/491" rel="noopener noreferrer"&gt;topoteretes/cognee-community#491&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related issue:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee/issues/6306" rel="noopener noreferrer"&gt;topoteretes/cognee#6306&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognee repository:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;https://github.com/topoteretes/cognee&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prisma ORM:&lt;/strong&gt; &lt;a href="https://www.prisma.io/" rel="noopener noreferrer"&gt;https://www.prisma.io/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the repository and pull request for the connector's current implementation, installation instructions, and contribution status.&lt;/p&gt;




</description>
      <category>ai</category>
      <category>python</category>
      <category>prisma</category>
      <category>database</category>
    </item>
    <item>
      <title>Eliminating AI Hallucinations in API Integration: Building a Hoppscotch Connector for Cognee</title>
      <dc:creator>Shubham Vernekar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 06:40:42 +0000</pubDate>
      <link>https://dev.to/shubham_vernekar_67e4a407/eliminating-ai-hallucinations-in-api-integration-building-a-hoppscotch-connector-for-cognee-2716</link>
      <guid>https://dev.to/shubham_vernekar_67e4a407/eliminating-ai-hallucinations-in-api-integration-building-a-hoppscotch-connector-for-cognee-2716</guid>
      <description>&lt;p&gt;Autonomous AI coding agents such as Claude Code, Cursor, GitHub Copilot, and other AI-powered development tools are rapidly changing how we build software. Yet, developers who ask an agent to &lt;em&gt;"write a client to call our internal billing and user service"&lt;/em&gt; often encounter the same problem: &lt;strong&gt;API hallucination&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;An agent might invent nonexistent query parameters, omit required headers like &lt;code&gt;X-Workspace-ID&lt;/code&gt;, choose the wrong authentication method, or generate requests for outdated endpoints.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does this happen?
&lt;/h3&gt;

&lt;p&gt;Large language models (LLMs) generate responses based on learned patterns and the context provided to them. Without reliable, up-to-date API specifications, they may produce plausible-looking but incorrect integrations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if AI coding agents could retrieve structured API knowledge instead of guessing?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As part of &lt;strong&gt;Mergetober&lt;/strong&gt;, I worked on a dedicated Hoppscotch data-source connector for &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt; to address this problem.&lt;/p&gt;

&lt;p&gt;In this article, I'll explain why API schema memory matters, how the connector fits into the architecture, and how API collections can be ingested into Cognee to provide reliable context for AI-generated integration code.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Hoppscotch?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://hoppscotch.io/" rel="noopener noreferrer"&gt;Hoppscotch&lt;/a&gt; is an open-source API development platform that helps developers create, organize, and test API requests.&lt;/p&gt;

&lt;p&gt;Hoppscotch collections contain critical information about how an API should be used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Endpoints:&lt;/strong&gt; HTTP methods, paths, path parameters, and query parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Headers:&lt;/strong&gt; Required and optional HTTP headers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; Bearer tokens, Basic authentication, OAuth 2.0, and API keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request bodies:&lt;/strong&gt; JSON payloads, nested objects, and sample data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment variables:&lt;/strong&gt; Dynamic values such as &lt;code&gt;&amp;lt;&amp;lt;baseUrl&amp;gt;&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;&amp;lt;apiToken&amp;gt;&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Organization:&lt;/strong&gt; Collections, folders, and request names.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When API collections remain isolated in exported JSON files or desktop tools, an AI agent cannot reference them. Pasting an entire 10,000-line JSON export into a prompt floods the context window, burns tokens, and degrades attention.&lt;/p&gt;

&lt;p&gt;A better approach is to &lt;strong&gt;ingest, structure, index, and retrieve API knowledge on demand&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Introducing Cognee: Knowledge Graphs and AI Memory
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;Cognee&lt;/a&gt; is an open-source framework for building AI memory systems using structured knowledge and retrieval.&lt;/p&gt;

&lt;p&gt;Instead of relying exclusively on raw text chunks in a vector database, Cognee organizes API information into a &lt;strong&gt;hybrid knowledge graph + vector index&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured endpoint knowledge:&lt;/strong&gt; Represents API requests with methods, URLs, headers, parameters, and payloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relationship preservation:&lt;/strong&gt; Maintains parent-child relationships between collections, folders, and individual requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic retrieval:&lt;/strong&gt; Allows AI agents to search for relevant API information using natural language questions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero guesswork:&lt;/strong&gt; Provides ground-truth API context before an agent generates integration code.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Architectural Overview: The Hoppscotch Connector
&lt;/h2&gt;

&lt;p&gt;The connector bridges exported API collections and Cognee's memory pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hoppscotch API Collection (.json)
           │
           ▼
Hoppscotch Connector (cognee-community)
           │
           ▼
Parse, Normalize &amp;amp; Resolve Variables
           │
           ▼
Cognee Ingestion Pipeline (dlt resource)
           │
           ▼
Knowledge Graph + Vector Store
           │
           ▼
AI Coding Agent (Claude, Cursor, Devin)
           │
           ▼
Schema-Grounded, Hallucination-Free Code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Design Considerations
&lt;/h3&gt;

&lt;h3&gt;
  
  
  3.1. Stable Endpoint Identifiers
&lt;/h3&gt;

&lt;p&gt;The connector assigns a deterministic composite identifier to each API request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hoppscotch:{collection_slug}:{folder_path}:{request_name}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stable IDs ensure idempotent syncs. When you re-export your collection, existing graph nodes are cleanly updated rather than duplicated.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2. Synchronization and Deleted Endpoints
&lt;/h3&gt;

&lt;p&gt;APIs evolve continuously. The connector sets &lt;code&gt;write_disposition="replace"&lt;/code&gt; so that when an obsolete endpoint is deleted upstream, Cognee's automatic orphan cleanup purges it from both the vector index and the knowledge graph.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.3. Environment Variables and Secret Handling
&lt;/h3&gt;

&lt;p&gt;Hoppscotch environments use &lt;code&gt;&amp;lt;&amp;lt;variable&amp;gt;&amp;gt;&lt;/code&gt; syntax. The connector resolves non-sensitive base URLs (e.g., &lt;code&gt;&amp;lt;&amp;lt;baseUrl&amp;gt;&amp;gt;/v1/orders&lt;/code&gt; ➔ &lt;code&gt;https://api.example.com/v1/orders&lt;/code&gt;) while ensuring real production credentials and access tokens are not uploaded to memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.4. Structured, Agent-Friendly API Context
&lt;/h3&gt;

&lt;p&gt;Each endpoint is formatted into a clean, markdown representation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;### POST /v1/orders
Collection: E-Commerce / Orders
Headers:
  - Content-Type: application/json
  - Idempotency-Key: &amp;lt;uuid&amp;gt;
Request Body:
{
  "customer_id": "string",
  "items": [
    { "sku": "string", "qty": 1 }
  ],
  "currency": "USD"
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Step-by-Step: Ingesting a Hoppscotch Collection
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Install Dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;cognee cognee-community-connector-hoppscotch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Export Your Hoppscotch Workspace
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;In Hoppscotch, open &lt;strong&gt;Collections&lt;/strong&gt; ➔ click &lt;strong&gt;Export&lt;/strong&gt; ➔ save as &lt;code&gt;collection.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;(Optional)&lt;/em&gt; Export your active environment as &lt;code&gt;environment.json&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api-memory-project/
├── collection.json
├── environment.json
└── main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Ingest and Query the Collection
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_hoppscotch&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;hoppscotch_source&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# 1. Load the exported API collection
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Loading Hoppscotch collection...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;hoppscotch_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;collection_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./collection.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;environment_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./environment.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# optional
&lt;/span&gt;    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 2. Ingest into Cognee memory
&lt;/span&gt;    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api_documentation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 3. Cognify: Build the semantic knowledge graph
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Processing API knowledge graph...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cognify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api_documentation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# 4. Search API memory with natural language
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Searching API memory...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which endpoint creates a customer order, and what headers and request fields are required?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api_documentation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. What Does Better API Grounding Look Like?
&lt;/h2&gt;

&lt;p&gt;With a searchable API memory system, the agent retrieves the exact endpoint contract before writing code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"sku"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"qty"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"currency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"USD"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of guessing query params or inventing auth headers, the coding agent writes correct, production-ready integration clients on the very first try.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Open-Source Pull Request &amp;amp; Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔗 &lt;strong&gt;Pull Request:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee-community/pull/490" rel="noopener noreferrer"&gt;topoteretes/cognee-community#490&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📌 &lt;strong&gt;Issue Tracking:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee/issues/6305" rel="noopener noreferrer"&gt;topoteretes/cognee#6305&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Cognee Repository:&lt;/strong&gt; &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;https://github.com/topoteretes/cognee&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Hoppscotch:&lt;/strong&gt; &lt;a href="https://hoppscotch.io" rel="noopener noreferrer"&gt;https://hoppscotch.io&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;What is the biggest source of hallucinations in your AI coding workflows: API contracts, database schemas, or infrastructure configs? Let me know in the comments!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
