Skip to content

Knowledge Graphs

TeamLoop builds a temporal knowledge graph from your enterprise tools. Unlike flat document stores, knowledge graphs capture relationships, enabling rich queries and synthesis.

A knowledge graph consists of:

  • Entities - Things you know about (decisions, people, systems)
  • Relationships - How entities connect to each other
  • Embeddings - Vector representations for semantic search
  • Temporal metadata - When knowledge was valid
┌──────────┐ AUTHORED_BY ┌──────────┐
│ Decision │ ─────────────────────── │ Person │
│ Adopt │ │ Alice │
│ Postgres │ └──────────┘
└────┬─────┘
│ PART_OF
┌──────────┐ SUPERSEDES ┌──────────┐
│Component │ │ Decision │
│ Database│ │Use MySQL │
│ Service │ └──────────┘
└──────────┘

TeamLoop supports six core entity types:

Architectural choices, policy changes, technology selections.

Fields:

  • name - The decision title
  • description - What was decided
  • rationale - Why this choice was made
  • alternatives - Other options considered
  • status - active, superseded, proposed
  • event_date - When the decision was made

Example:

{
"type": "DECISION",
"name": "Adopt PostgreSQL for primary database",
"description": "Selected PostgreSQL over MySQL for the user service",
"rationale": "Need JSONB support for flexible user preferences schema",
"alternatives": ["MySQL", "MongoDB", "CockroachDB"],
"status": "active",
"event_date": "2024-03-15"
}

PRDs, ADRs, specs, meeting notes, wiki pages.

Fields:

  • name - Document title
  • description - Summary or excerpt
  • source_url - Link to original
  • event_date - Last modified date

Example:

{
"type": "DOCUMENT",
"name": "User Service PRD v2",
"description": "Product requirements for user profile management",
"source_url": "https://notion.so/...",
"source_integration": "notion",
"event_date": "2024-04-01"
}

Code commits, configuration changes, status updates.

Fields:

  • name - Change description
  • description - Details of the change
  • change_type - commit, field_update, status_change
  • event_date - When the change occurred

Example:

{
"type": "CHANGE",
"name": "Issue #123: Status changed to In Progress",
"description": "Status: Backlog → In Progress (by Alice)",
"change_type": "field_update",
"event_date": "2024-05-10"
}

Team members, authors, decision makers.

Fields:

  • name - Person’s name
  • description - Role or title

Example:

{
"type": "PERSON",
"name": "Alice Chen",
"description": "Senior Backend Engineer, Auth Team"
}

Initiatives, features, workstreams.

Fields:

  • name - Project name
  • description - Project overview
  • status - active, completed, archived

Example:

{
"type": "PROJECT",
"name": "Auth Service Migration",
"description": "Migrate from legacy auth to OAuth 2.0",
"status": "active"
}

Systems, services, modules, infrastructure.

Fields:

  • name - Component name
  • description - What it does

Example:

{
"type": "COMPONENT",
"name": "User Service",
"description": "Handles user profiles, preferences, and authentication"
}

Entities connect through typed relationships:

TypeDescriptionExample
DECIDED_BYWho made a decisionDecision → Person
AUTHORED_BYWho wrote a documentDocument → Person
PART_OFComponent hierarchyChange → Document
RELATES_TOGeneral associationDecision → Component
SUPERSEDESDecision lineageNew Decision → Old Decision
DEPENDS_ONDependency chainComponent → Component
IMPLEMENTSDecision realizationComponent → Decision

The SUPERSEDES relationship is special - it tracks decision evolution:

┌─────────────────┐
│ Use JWT Tokens │ (2024-12)
│ (current) │
└────────┬────────┘
│ SUPERSEDES
┌─────────────────┐
│ Use Session │ (2024-06)
│ Cookies │
└────────┬────────┘
│ SUPERSEDES
┌─────────────────┐
│ Use Basic Auth │ (2024-01)
│ (original) │
└─────────────────┘

Query this chain with teamloop_timeline using entity_id.

When you query with teamloop_query, results include extraction instructions. Claude will suggest entities to create:

Found 5 results...
## Extraction Instructions
Based on these results, consider extracting:
- DECISION: "Adopt microservices architecture"
- COMPONENT: "Order Service"
- PERSON: "Bob (author)"

Use teamloop_save_knowledge to explicitly create entities:

teamloop_save_knowledge:
entities:
- type: DECISION
name: "Use GraphQL for mobile API"
rationale: "Better mobile performance with field selection"
event_date: "2024-08-15"
relationships:
- source_name: "Use GraphQL for mobile API"
source_type: DECISION
target_name: "Mobile Team"
target_type: PROJECT
relationship_type: PART_OF

All entities are embedded for semantic search:

  • Queries match by meaning, not just keywords
  • “database” finds “PostgreSQL”, “MySQL”, “data storage”
  • Similarity scores rank results

Every entity tracks time:

FieldDescription
event_dateWhen the event occurred (from source)
created_atWhen added to TeamLoop
updated_atLast modification
valid_fromStart of validity window
valid_toEnd of validity (for superseded)

This enables:

  • Point-in-time queries (as_of)
  • Evolution tracking (from_date to to_date)
  • Comparison (date_a vs date_b)
{
"type": "DECISION",
"name": "Adopt Kubernetes",
"event_date": "2024-03-15" // Critical for temporal queries!
}
{
"source_url": "https://github.com/...",
"source_integration": "github",
"source_external_id": "issue-123"
}

Isolated entities are less useful. Connect them:

{
"relationships": [
{
"source_name": "New Decision",
"source_type": "DECISION",
"target_name": "Old Decision",
"target_type": "DECISION",
"relationship_type": "SUPERSEDES"
}
]
}
  • DECISION for choices, not documents
  • DOCUMENT for artifacts, not decisions within them
  • CHANGE for modifications, not new entities

Once built, query your knowledge:

# Semantic search
teamloop_query:
query: "authentication decisions"
# Timeline view
teamloop_timeline:
query: "auth"
# Point-in-time
teamloop_query:
query: "auth"
mode: "as_of"
as_of: "2024-01-01"