<?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: Mayank Mahaur</title>
    <description>The latest articles on DEV Community by Mayank Mahaur (@mayank_mahaur_f32032ac132).</description>
    <link>https://dev.to/mayank_mahaur_f32032ac132</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%2F3498874%2Ff250ebb3-1666-4389-ae07-1a50b069e315.png</url>
      <title>DEV Community: Mayank Mahaur</title>
      <link>https://dev.to/mayank_mahaur_f32032ac132</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mayank_mahaur_f32032ac132"/>
    <language>en</language>
    <item>
      <title>Bridging API Workspaces and AI Memory: Building a Postman Connector for Cognee</title>
      <dc:creator>Mayank Mahaur</dc:creator>
      <pubDate>Tue, 06 Oct 2026 11:00:53 +0000</pubDate>
      <link>https://dev.to/mayank_mahaur_f32032ac132/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee-3k3l</link>
      <guid>https://dev.to/mayank_mahaur_f32032ac132/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee-3k3l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Modern software teams manage hundreds of microservices and third-party APIs. Postman collections are the de facto living documentation for these services, housing endpoint routes, authorization requirements, request bodies, query parameters, and sample responses.&lt;/p&gt;

&lt;p&gt;However, AI agents and LLMs typically cannot access this institutional knowledge directly. Developers find themselves manually copying cURL commands and JSON payloads into ChatGPT prompts to ask: &lt;em&gt;"What headers does our payment webhook require?"&lt;/em&gt; or &lt;em&gt;"Which endpoint handles partial refunds?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this article, we explore how we built the official &lt;strong&gt;Postman data-source connector for Cognee&lt;/strong&gt; during Mergetober 2026. This connector automatically ingests Postman collections into Cognee, turning static API documentation into queryable AI knowledge graphs with incremental sync and upstream deletion handling.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Cognee?
&lt;/h2&gt;

&lt;p&gt;Cognee is an open-source memory layer for AI agents. Rather than dumping raw text into a stateless vector store, Cognee processes data through three distinct stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;cognee.add(data)&lt;/code&gt;: Stages documents or structured records.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cognee.cognify()&lt;/code&gt;: Parses content with an LLM to extract domain entities and relationships, constructing a persistent knowledge graph.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cognee.search(query)&lt;/code&gt;: Queries the interconnected graph and vector indexes to retrieve precise contextual memory.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To ingest external systems, Cognee relies on data-source connectors built on top of &lt;code&gt;dlt&lt;/code&gt; (data load tool) sources.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture: How the Postman Connector Works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Postman API v10]
       |
       v
 [PostmanClient] ---&amp;gt; (Rate-limit backoff and 429 Retry-After handling)
       |
       v
[Sync Engine (postman.py)] ---&amp;gt; (State cache checks collection updatedAt)
       |
       +-&amp;gt; Unchanged? ---&amp;gt; Re-yield cached rows (0 detail network requests)
       |
       +-&amp;gt; Modified?  ---&amp;gt; Fetch collection schema and render documents
                                |
                                v
                   [Markdown Renderer (renderer.py)]
                                | (Folder breadcrumbs, parameter tables, schemas)
                                v
                    [@dlt.resource (postman_documents)]
                                | (Tagged: DOCUMENT_SOURCE_ATTR = "postman")
                                v
                          [cognee.add]
                                |
                                v
                        [cognee.cognify]
                                |
                                v
               [Unified Knowledge Graph &amp;amp; Vector Memory]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connecting Postman to Cognee requires solving three core architectural challenges:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Flattening Deeply Nested JSON Trees
&lt;/h3&gt;

&lt;p&gt;Postman collections are hierarchical trees: collections contain folders, folders contain subfolders, and items contain requests and responses. Ingesting this as raw JSON would cause Cognee's graph pipeline to mirror the JSON syntax rather than extracting meaningful API entities.&lt;/p&gt;

&lt;p&gt;Our markdown renderer (&lt;code&gt;renderer.py&lt;/code&gt;) walks the tree up to 50 levels deep, transforming each endpoint into a discrete Markdown document:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Breadcrumbs&lt;/strong&gt;: Explicit folder path navigation (e.g. &lt;code&gt;Orders &amp;gt; Fulfillment &amp;gt; Ship Package&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP Method &amp;amp; Route&lt;/strong&gt;: Clear heading structure (&lt;code&gt;[POST] /v1/orders/{id}/fulfill&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parameter Tables&lt;/strong&gt;: Formatted Markdown tables for headers, path parameters, and query parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payload Schemas&lt;/strong&gt;: Syntax-highlighted JSON, GraphQL, and form-data definitions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sample Responses&lt;/strong&gt;: Documented status codes (200, 400, 404) and example JSON bodies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each request becomes an independent node in Cognee's graph, tagged with a deterministic composite ID (&lt;code&gt;f"{collection_uid}:{item_id}"&lt;/code&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  2. High-Efficiency Incremental Synchronization
&lt;/h3&gt;

&lt;p&gt;Hitting Postman's REST API on every sync cycle quickly exhausts rate limits. &lt;/p&gt;

&lt;p&gt;The connector tracks collection &lt;code&gt;updatedAt&lt;/code&gt; metadata using &lt;code&gt;dlt.current.resource_state()&lt;/code&gt;. On subsequent runs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a collection's &lt;code&gt;updatedAt&lt;/code&gt; timestamp has not changed, the connector bypasses the detail API call entirely (0 API requests) and re-yields document rows directly from the state cache.&lt;/li&gt;
&lt;li&gt;If a collection has been updated, only that modified collection is re-fetched and re-rendered.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Forget-on-Delete via Full-Snapshot Semantics
&lt;/h3&gt;

&lt;p&gt;When an API collection is deleted or unshared in Postman, an AI agent should not continue answering questions based on obsolete endpoints.&lt;/p&gt;

&lt;p&gt;By declaring &lt;code&gt;write_disposition="replace"&lt;/code&gt; on the &lt;code&gt;@dlt.resource&lt;/code&gt; and tagging &lt;code&gt;DOCUMENT_SOURCE_ATTR = "postman"&lt;/code&gt;, the active snapshot only contains currently visible collections. Any removed collection falls out of staging, prompting Cognee's built-in &lt;code&gt;orphan_cleanup&lt;/code&gt; to purge outdated nodes and relations from the knowledge graph.&lt;/p&gt;




&lt;h2&gt;
  
  
  Production Code Standards
&lt;/h2&gt;

&lt;p&gt;Building for open-source production requires rigorous engineering discipline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resilient HTTP Client (&lt;code&gt;client.py&lt;/code&gt;)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Automatic exponential backoff with jitter.&lt;/li&gt;
&lt;li&gt;Native parsing of &lt;code&gt;Retry-After&lt;/code&gt; headers on HTTP 429 rate limits.&lt;/li&gt;
&lt;li&gt;Fallback error parsing handling HTML 502/500 gateways.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Hashing&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;RFC 4122 UUIDv5 fallback keys for items without explicit IDs.&lt;/li&gt;
&lt;li&gt;Volatile timestamps (&lt;code&gt;createdAt&lt;/code&gt;, &lt;code&gt;updatedAt&lt;/code&gt;) are excluded from document bodies to prevent &lt;code&gt;content_hash&lt;/code&gt; churn in Cognee.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Emdash Invariant&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Automated text sanitization ensures complete compliance with repository typographic guidelines.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Test Suite (&lt;code&gt;test_postman.py&lt;/code&gt;)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;180 unit tests spanning 4 tiers, running 100% offline in 0.62 seconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Quickstart: Seeing It In Action
&lt;/h2&gt;

&lt;p&gt;You can run the connector out of the box in demonstration mode without a live Postman account:&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;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_postman&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;postman_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;# Initialize the source (falls back to sample Order API in demo mode)
&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;postman_source&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="c1"&gt;# Cycle 1: Ingest documents
&lt;/span&gt;    &lt;span class="n"&gt;documents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;list&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="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="s"&gt;Ingested &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; endpoint documents into Cognee staging.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Inspect a document
&lt;/span&gt;    &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&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="s"&gt;ID: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&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="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="s"&gt;Title: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&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;When connecting to live Postman workspaces, simply set your API key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;POSTMAN_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-postman-api-key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add and cognify in Cognee:&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;cognee&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_postman&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;postman_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;ingest_api_docs&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;postman_source&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;add&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="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="c1"&gt;# Query your API documentation
&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;How do I authenticate refund requests?&lt;/span&gt;&lt;span class="sh"&gt;"&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;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Conclusion &amp;amp; Mergetober Reflections
&lt;/h2&gt;

&lt;p&gt;Participating in Mergetober 2026 has been an incredible opportunity to expand Cognee's data ecosystem. By connecting Postman collections directly into Cognee's memory layer, developers can now build intelligent coding assistants, automated API auditors, and documentation agents that genuinely understand their services.&lt;/p&gt;

&lt;p&gt;Check out the code in the &lt;a href="https://github.com/topoteretes/cognee-community" rel="noopener noreferrer"&gt;cognee-community repository&lt;/a&gt; under &lt;code&gt;packages/connector/postman/&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Published for Mergetober 2026 by WeMakeDevs and Cognee&lt;/em&gt;  &lt;/p&gt;

</description>
      <category>ai</category>
      <category>mergetober</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
