ai newsSo., 25. Okt.
EilmeldungVergleich: Claude Desktop, Codex in ChatGPT und Hermes IDE als Coding-GUIs

Bridging Container Orchestration and Autonomous AI: The Cognee Portainer Connector

Managing modern cloud-native architectures is fraught with container sprawl. Across distributed development teams, thousands of microservice containers, Swarm stacks, and Kubernetes deployments run simultaneously across local workstations, staging clusters, and remote edge gateways. While Portainer

dev.toSonntag 11:47 · 25.10.2 Min. Lesezeit
Bild: dev.to

Managing modern cloud-native architectures is fraught with container sprawl. Across distributed development teams, thousands of microservice containers, Swarm stacks, and Kubernetes deployments run simultaneously across local workstations, staging clusters, and remote edge gateways.

While Portainer (boasting over 33,000+ GitHub stars) provides a premier GUI and management plane for containerized infrastructure, the rich architectural context inside those containers—such as exposed ports, volume mount topologies, restart policies, and Docker Compose definitions—remains siloed inside dashboards and daemon sockets.

With the release of the Portainer Connector for Cognee, developers can now seamlessly stream their live container infrastructure directly into Cognee, transforming raw DevOps telemetry into an AI-queryable knowledge graph and memory layer.

Autonomous AI coding agents, DevOps assistants, and Site Reliability Engineers (SREs) frequently require real-time infrastructure answers that static codebases cannot provide:

The Portainer Cognee connector is built to production standards:

Install Cognee and the community Portainer connector:

pip install cognee cognee-community-connector-portainer Enter fullscreen mode Exit fullscreen mode Or using uv:

uv add cognee cognee-community-connector-portainer Enter fullscreen mode Exit fullscreen mode 2. Ingesting Infrastructure into Memory import asyncio import os import cognee from cognee_community_connector_portainer import ( PortainerConfig, portainer_connector, ) async def main (): # 1. Configure the connector config = PortainerConfig ( api_url = os. getenv ( " PORTAINER_URL ", " https://portainer.local:9443 " ), api_key = os. getenv ( " PORTAINER_API_KEY ", " ptr_your_api_key " ), include_containers = True, include_stacks = True, ) print ( " Fetching Portainer environment & container telemetry...

" ) documents = await portainer_connector ( config ) print ( f " Retrieved { len ( documents ) } infrastructure documents. " ) # 2. Ingest into Cognee memory print ( " Ingesting into Cognee...

" ) await cognee. add ( documents, dataset_name = " infrastructure_topology " ) await cognee. cognify ( dataset_name = " infrastructure_topology " ) # 3. Query container and cluster topology with natural language query = " What containers are currently running with exposed ports? " print ( f " \n Querying Cognee: ' { query } '" ) results = await cognee. search ( query, dataset_name = " infrastructure_topology " ) for r in results: print ( f " \n Memory Result: { r } " ) if __name__ == " __main__ ": asyncio. run ( main ()) Enter fullscreen mode Exit fullscreen mode What Does Ingested Memory Look Like?

The connector parses complex Docker daemon JSON into clean, structured Markdown reports optimized for embedding and graph extraction:

# Container Runtime State: Primary Docker Cluster (ID: 1) **Total Containers**: 2 ## Container Catalog ### Container: /redis-master - **Container ID**: `abc123456789` - **Image**: `redis:7-alpine` - **State / Status**: `running` (Up 4 days, healthy) - **Port Forwarding**: 6379->6379/tcp - **Volume Mounts**: `/var/lib/redis` -> `/data` Enter fullscreen mode Exit fullscreen mode When Cognee processes this markdown through cognify(), it constructs knowledge graph nodes representing:

The Portainer connector is an open-source contribution to the Cognee Community ecosystem.

Try it out today to bring intelligent container topology memory to your DevOps workflows!

Quelle: dev.to (dev.to). Original öffnen