Skip to content

Subgraphs

Subgraphs are curated collections of entities from your knowledge graph. They help you organize related knowledge for specific projects, topics, or synthesis tasks.

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

Let TeamLoop find relevant entities:

teamloop_create_subgraph:
name: "Auth System Decisions"
description: "All decisions related to authentication"
query: "authentication and authorization"
limit: 30

This searches your knowledge graph semantically and includes matching 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.

teamloop_get_subgraph:
subgraph_id: "subgraph-uuid"
teamloop_get_subgraph:
name: "Auth System Decisions"
# 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
...

Discover connected entities you might have missed:

teamloop_expand_subgraph:
subgraph_id: "subgraph-uuid"
depth: 1

Finds entities one relationship hop away from current members.

teamloop_expand_subgraph:
subgraph_id: "subgraph-uuid"
depth: 2
include_types: ["DECISION", "COMPONENT"]

Only include specific entity types.

teamloop_expand_subgraph:
subgraph_id: "subgraph-uuid"
depth: 1
auto_add: true

Automatically add found entities to the subgraph.

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: ...)
...

Create subgraphs for specific projects:

teamloop_create_subgraph:
name: "Payment Service Migration"
query: "payment service stripe migration"
limit: 40

Gather all relevant decisions for a review:

teamloop_create_subgraph:
name: "2024 Architecture Decisions"
query: "architecture decision ADR"
limit: 50

Then expand to find related components:

teamloop_expand_subgraph:
subgraph_id: "..."
depth: 2
include_types: ["COMPONENT"]
auto_add: true

Create subgraphs per team:

teamloop_create_subgraph:
name: "Platform Team Knowledge"
query: "infrastructure platform kubernetes deployment"
limit: 100

After an incident, gather relevant knowledge:

teamloop_create_subgraph:
name: "Nov 15 Outage Investigation"
query: "payment timeout database connection"
limit: 30

Subgraphs are the input for document synthesis:

# 1. Create focused subgraph
teamloop_create_subgraph:
name: "Auth ADR Context"
query: "authentication decision"
limit: 20
# 2. Expand to include related context
teamloop_expand_subgraph:
subgraph_id: "..."
depth: 1
auto_add: true
# 3. Generate ADR
teamloop_synthesize:
subgraph_id: "..."
template_type: "adr"
# Good
name: "Q4 2024 Database Scaling Decisions"
# Less useful
name: "Decisions"
# Start with narrow query
teamloop_create_subgraph:
query: "user service authentication"
limit: 10
# Review, then expand
teamloop_expand_subgraph:
depth: 1
auto_add: false # Preview first
# Add selectively
teamloop_expand_subgraph:
include_types: ["DECISION"]
auto_add: true

The best subgraphs:

  • Have 10-50 entities (focused but comprehensive)
  • Include multiple entity types
  • Cover the topic thoroughly
  • Have good temporal coverage

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"
  • 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