Subgraphs
Subgraphs
Section titled “Subgraphs”Subgraphs are curated collections of entities from your knowledge graph. They help you organize related knowledge for specific projects, topics, or synthesis tasks.
Why Subgraphs?
Section titled “Why Subgraphs?”Your knowledge graph can grow large with entities from many projects and time periods. Subgraphs let you:
- Focus - Isolate relevant knowledge for a specific task
- Organize - Group entities by project, team, or topic
- Synthesize - Generate documents from curated knowledge
- Share - Create reusable knowledge collections
Creating Subgraphs
Section titled “Creating Subgraphs”From a Semantic Query
Section titled “From a Semantic Query”Let TeamLoop find relevant entities:
teamloop_create_subgraph: name: "Auth System Decisions" description: "All decisions related to authentication" query: "authentication and authorization" limit: 30This searches your knowledge graph semantically and includes matching entities.
From Specific Entities
Section titled “From Specific Entities”Include exact entities by ID:
teamloop_create_subgraph: name: "Q4 Architecture Review" description: "Entities for Q4 2024 architecture review" entity_ids: - "uuid-1" - "uuid-2" - "uuid-3"Use entity IDs from timeline or query results.
Viewing Subgraphs
Section titled “Viewing Subgraphs”Get by ID
Section titled “Get by ID”teamloop_get_subgraph: subgraph_id: "subgraph-uuid"Get by Name
Section titled “Get by Name”teamloop_get_subgraph: name: "Auth System Decisions"Response
Section titled “Response”# Subgraph: Auth System Decisions
- **ID:** abc-123...- **Entity Count:** 15- **Description:** All decisions related to authentication- **Created:** 2024-12-01 10:30:00
## Entities
### 1. [DECISION] Adopt OAuth 2.0- **ID:** def-456...- **Description:** Migrate from session-based auth to OAuth 2.0- **Event Date:** 2024-06-15- **Rationale:** Need SSO support for enterprise customers
### 2. [COMPONENT] Auth Service- **ID:** ghi-789...- **Description:** Handles authentication and token management...Expanding Subgraphs
Section titled “Expanding Subgraphs”Discover connected entities you might have missed:
Basic Expansion
Section titled “Basic Expansion”teamloop_expand_subgraph: subgraph_id: "subgraph-uuid" depth: 1Finds entities one relationship hop away from current members.
Filtered Expansion
Section titled “Filtered Expansion”teamloop_expand_subgraph: subgraph_id: "subgraph-uuid" depth: 2 include_types: ["DECISION", "COMPONENT"]Only include specific entity types.
Auto-Add
Section titled “Auto-Add”teamloop_expand_subgraph: subgraph_id: "subgraph-uuid" depth: 1 auto_add: trueAutomatically add found entities to the subgraph.
Response (without auto_add)
Section titled “Response (without auto_add)”Found 8 related entities (not added, set auto_add=true to add):
1. **[PERSON]** Alice Chen: Senior Engineer on Auth Team (ID: ...)2. **[DOCUMENT]** Auth Service PRD v2 (ID: ...)3. **[DECISION]** Use JWT for mobile clients (ID: ...)...Use Cases
Section titled “Use Cases”Project Context
Section titled “Project Context”Create subgraphs for specific projects:
teamloop_create_subgraph: name: "Payment Service Migration" query: "payment service stripe migration" limit: 40Architecture Review
Section titled “Architecture Review”Gather all relevant decisions for a review:
teamloop_create_subgraph: name: "2024 Architecture Decisions" query: "architecture decision ADR" limit: 50Then expand to find related components:
teamloop_expand_subgraph: subgraph_id: "..." depth: 2 include_types: ["COMPONENT"] auto_add: trueTeam Knowledge
Section titled “Team Knowledge”Create subgraphs per team:
teamloop_create_subgraph: name: "Platform Team Knowledge" query: "infrastructure platform kubernetes deployment" limit: 100Incident Investigation
Section titled “Incident Investigation”After an incident, gather relevant knowledge:
teamloop_create_subgraph: name: "Nov 15 Outage Investigation" query: "payment timeout database connection" limit: 30Subgraphs for Synthesis
Section titled “Subgraphs for Synthesis”Subgraphs are the input for document synthesis:
# 1. Create focused subgraphteamloop_create_subgraph: name: "Auth ADR Context" query: "authentication decision" limit: 20
# 2. Expand to include related contextteamloop_expand_subgraph: subgraph_id: "..." depth: 1 auto_add: true
# 3. Generate ADRteamloop_synthesize: subgraph_id: "..." template_type: "adr"Best Practices
Section titled “Best Practices”1. Name Descriptively
Section titled “1. Name Descriptively”# Goodname: "Q4 2024 Database Scaling Decisions"
# Less usefulname: "Decisions"2. Start Focused, Then Expand
Section titled “2. Start Focused, Then Expand”# Start with narrow queryteamloop_create_subgraph: query: "user service authentication" limit: 10
# Review, then expandteamloop_expand_subgraph: depth: 1 auto_add: false # Preview first
# Add selectivelyteamloop_expand_subgraph: include_types: ["DECISION"] auto_add: true3. Use for Synthesis
Section titled “3. Use for Synthesis”The best subgraphs:
- Have 10-50 entities (focused but comprehensive)
- Include multiple entity types
- Cover the topic thoroughly
- Have good temporal coverage
4. Include Context
Section titled “4. Include Context”Add description for future reference:
teamloop_create_subgraph: name: "Security Audit 2024" description: "Entities gathered for the annual security audit, focusing on authentication, authorization, and data handling decisions"Limitations
Section titled “Limitations”- Subgraphs are user-scoped (personal to your account)
- Maximum 50 entities per query-based creation
- Expansion limited to 3 hops
- Names should be unique per user
Next Steps
Section titled “Next Steps”- Synthesis - Generate documents from subgraphs
- Knowledge Graphs - Understand entity types
- MCP Tools Reference - All subgraph tools