{"slug": "bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee", "title": "Bridging API Workspaces and AI Memory: Building a Postman Connector for Cognee", "summary": "A developer built the official Postman data-source connector for Cognee, an open-source memory layer for AI agents, during Mergetober 2026. The connector ingests Postman collections into Cognee as queryable knowledge graphs, rendering each endpoint into a discrete Markdown document with folder breadcrumbs and parameter tables, and uses dlt resource state to skip unchanged collections for incremental sync. It also handles upstream deletions by declaring write_disposition=\"replace\" so removed collections fall out of staging and are orphaned from the graph.", "body_md": "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.\n\nHowever, 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: *\"What headers does our payment webhook require?\"* or *\"Which endpoint handles partial refunds?\"*\n\nIn this article, we explore how we built the official **Postman data-source connector for Cognee** 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.\n\nCognee 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:\n\n`cognee.add(data)`: Stages documents or structured records.` cognee.cognify()`: Parses content with an LLM to extract domain entities and relationships, constructing a persistent knowledge graph.`cognee.search(query)`: Queries the interconnected graph and vector indexes to retrieve precise contextual memory.\nTo ingest external systems, Cognee relies on data-source connectors built on top of `dlt` (data load tool) sources.\n\n``` php\n[Postman API v10]\n       |\n       v\n [PostmanClient] ---> (Rate-limit backoff and 429 Retry-After handling)\n       |\n       v\n[Sync Engine (postman.py)] ---> (State cache checks collection updatedAt)\n       |\n       +-> Unchanged? ---> Re-yield cached rows (0 detail network requests)\n       |\n       +-> Modified?  ---> Fetch collection schema and render documents\n                                |\n                                v\n                   [Markdown Renderer (renderer.py)]\n                                | (Folder breadcrumbs, parameter tables, schemas)\n                                v\n                    [@dlt.resource (postman_documents)]\n                                | (Tagged: DOCUMENT_SOURCE_ATTR = \"postman\")\n                                v\n                          [cognee.add]\n                                |\n                                v\n                        [cognee.cognify]\n                                |\n                                v\n               [Unified Knowledge Graph & Vector Memory]\n```\n\nConnecting Postman to Cognee requires solving three core architectural challenges:\n\nPostman 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.\n\nOur markdown renderer (`renderer.py`) walks the tree up to 50 levels deep, transforming each endpoint into a discrete Markdown document:\n\n`Orders > Fulfillment > Ship Package`).`[POST] /v1/orders/{id}/fulfill`).\nEach request becomes an independent node in Cognee's graph, tagged with a deterministic composite ID (`f\"{collection_uid}:{item_id}\"`).\n\nHitting Postman's REST API on every sync cycle quickly exhausts rate limits.\n\nThe connector tracks collection `updatedAt` metadata using `dlt.current.resource_state()`. On subsequent runs:\n\n`updatedAt` 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.\nWhen an API collection is deleted or unshared in Postman, an AI agent should not continue answering questions based on obsolete endpoints.\n\nBy declaring `write_disposition=\"replace\"` on the `@dlt.resource` and tagging `DOCUMENT_SOURCE_ATTR = \"postman\"`, the active snapshot only contains currently visible collections. Any removed collection falls out of staging, prompting Cognee's built-in `orphan_cleanup` to purge outdated nodes and relations from the knowledge graph.\n\nBuilding for open-source production requires rigorous engineering discipline:\n\n`client.py`)` Retry-After` headers on HTTP 429 rate limits.`createdAt`, `content_hash` churn in Cognee.`test_postman.py`)\nYou can run the connector out of the box in demonstration mode without a live Postman account:\n\n``` python\nimport asyncio\nfrom cognee_community_connector_postman import postman_source\n\nasync def main():\n    # Initialize the source (falls back to sample Order API in demo mode)\n    source = postman_source()\n\n    # Cycle 1: Ingest documents\n    documents = list(source)\n    print(f\"Ingested {len(documents)} endpoint documents into Cognee staging.\")\n\n    # Inspect a document\n    doc = documents[0]\n    print(f\"ID: {doc['id']}\")\n    print(f\"Title: {doc['title']}\")\n    print(doc[\"content\"])\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nWhen connecting to live Postman workspaces, simply set your API key:\n\n```\nexport POSTMAN_API_KEY=\"your-postman-api-key\"\n```\n\nThen add and cognify in Cognee:\n\n``` python\nimport cognee\nfrom cognee_community_connector_postman import postman_source\n\nasync def ingest_api_docs():\n    source = postman_source()\n    await cognee.add(source)\n    await cognee.cognify()\n\n    # Query your API documentation\n    results = await cognee.search(\"How do I authenticate refund requests?\")\n    print(results)\n```\n\nParticipating 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.\n\nCheck out the code in the [cognee-community repository](https://github.com/topoteretes/cognee-community) under `packages/connector/postman/`!\n\n*Published for Mergetober 2026 by WeMakeDevs and Cognee*", "url": "https://wpnews.pro/news/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee", "canonical_source": "https://dev.to/mayank_mahaur_f32032ac132/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee-3k3l", "published_at": "2026-10-06 11:00:53+00:00", "updated_at": "2026-10-06 11:18:18.005663+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "mlops", "artificial-intelligence"], "entities": ["Postman", "Cognee", "dlt", "Mergetober 2026"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee", "markdown": "https://wpnews.pro/news/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee.md", "text": "https://wpnews.pro/news/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee.txt", "jsonld": "https://wpnews.pro/news/bridging-api-workspaces-and-ai-memory-building-a-postman-connector-for-cognee.jsonld"}}