| name | knowledge-graph-integration |
| description | Build and query knowledge graphs automatically to capture relationships between entities, concepts, and project artifacts. |
Skill: Knowledge Graph Integration
Category: Agent Memory & Reasoning
Priority: High
Description
This skill enables DevinOS to build and manage knowledge graphs automatically. It extracts entities and relationships from code, documentation, and conversations, then stores them in a graph database for querying, reasoning, and discovery.
Purpose
To deepen DevinOS understanding of complex projects by representing knowledge as connected entities and relationships. This improves reasoning, inference, and answers to questions that span multiple concepts.
Trigger
Use this skill when:
- A project has many related components, services, or concepts.
- You need to trace dependencies, ownership, or impact across a codebase.
- You want to discover hidden relationships in requirements or documentation.
- You are building a complex system and need to reason about its architecture.
Context
- Codebase structure and documentation.
- Existing memory entries and skills.
- Graph database or in-memory graph library.
- Entity and relationship schemas relevant to the domain.
- Query patterns the agent needs to support.
Workflow
- Define schema. Identify entity types (Component, Service, Person, Concept) and relationship types (depends_on, owns, implements, uses).
- Extract entities. Parse code, docs, and memory entries to identify entities.
- Extract relationships. Link entities based on imports, references, calls, and descriptions.
- Build the graph. Insert nodes and edges into a graph database or library.
- Query and reason. Use graph queries to answer questions like "What depends on Service X?" or "Who owns this module?"
- Update continuously. Refresh the graph as the project evolves.
- Visualize (optional). Render a subgraph for human review when useful.
Examples
Good: Trace a dependency impact
User Input: "If I change the payment service, what else is affected?"
Agent Action:
- Queries the knowledge graph for nodes connected to
PaymentService via depends_on or uses.
- Returns the list of affected components and files.
- Highlights the most critical downstream consumers.
Bad: Build a graph without a clear schema
User Input: "Create a knowledge graph of everything."
Agent Action:
- Defines a schema first based on the project domain.
- Extracts entities and relationships incrementally rather than trying to graph everything at once.
Anti-patterns
- Building a graph without a schema or query purpose.
- Storing every possible relationship without ranking importance.
- Letting the graph become stale as the project changes.
- Querying the graph with ambiguous or untested questions.
- Failing to link graph entities to code and memory sources.
Verification
Cross Skill References
- Semantic Memory Fabric: Layered, embedded memory for semantic retrieval.
- Knowledge Distillation: Extracting reusable patterns from project experience.
- Architecture: Understanding system structure and dependencies.
- Advanced Cognitive Architecture: Reasoning across multiple concepts and paths.
- Memory Manager: Basic memory entry persistence.
References