"Design a knowledge graph that models org structure, systems, relationships, and permissions. The AI agent uses this graph for context-aware decision making."
| Dimension | Clarification | Assumption |
|---|---|---|
| Data Sources | Where does graph data come from? | HR systems, AD/LDAP, ITSM, CMDB, ticketing systems |
| Entity Types | What kinds of nodes? | Person, Team, Role, Application, Permission, Document, Ticket |
| Query Patterns | What questions does the agent ask? | "Who manages X?", "Who has access to Y?", "What team owns Z?" |
| Freshness | How current must the graph be? | Real-time for org changes, daily for CMDB/app data |
| Scale | How large? | 50K nodes/customer, 500K edges/customer, 350 customers |
ENTERPRISE KNOWLEDGE GRAPH
═══════════════════════════════════════════════════════════════════
DATA SOURCES SYNC PIPELINE GRAPH STORE
┌──────────┐ ┌──────────────┐ ┌──────────────┐
│ HR System│──webhook──-->│ │ │ │
│ (Workday)│ │ Change │ │ Neo4j │
├──────────┤ │ Detection │ │ │
│ AD/LDAP │──webhook──-->│ + │──────────>│ Nodes: │
├──────────┤ │ Conflict │ │ Person │
│ ITSM │──polling──-->│ Resolution │ │ Team │
│ (CMDB) │ │ + │ │ Role │
├──────────┤ │ Validation │ │ Application│
│ Ticketing│──polling──-->│ │ │ Permission │
└──────────┘ └──────────────┘ │ Document │
│ Ticket │
└──────┬───────┘
│
┌─────────v────────┐
│ Query Engine │
│ Cypher queries │
│ Cached paths │
└─────────┬────────┘
│
┌─────────v────────┐
│ AI Agent │
│ Context-aware │
│ decisions │
└──────────────────┘
| Node Type | Key Properties | Source System |
|---|---|---|
| Person | name, email, employee_id, department, location, title, status | HR (Workday), AD/LDAP |
| Team | name, team_id, type (engineering/ops/support), size | HR, ServiceNow |
| Role | name, role_id, level (viewer/editor/admin), scope | IAM, AD |
| Application | name, app_id, type (SaaS/internal), criticality, owner_team | CMDB |
| Permission | permission_id, type (read/write/admin), scope, expiry | IAM, AD, App-specific |
| Document | title, doc_id, type, created_by, space, last_modified | Confluence, SharePoint |
| Ticket | ticket_id, type, status, priority, assignee, created_date | ServiceNow, Jira |
| Edge Type | From → To | Properties |
|---|---|---|
| MANAGES | Person → Person | since_date |
| MEMBER_OF | Person → Team | role_in_team, since_date |
| HAS_ROLE | Person → Role | granted_date, granted_by |
| HAS_ACCESS_TO | Person/Role → Application | access_level, granted_date, expiry |
| OWNS | Team → Application | ownership_type (primary/secondary) |
| CREATED_BY | Document/Ticket → Person | created_date |
EXAMPLE: "Who can approve Jane's access to Salesforce?"
═══════════════════════════════════════════════════════
(Jane)──MEMBER_OF──>(Engineering Team)
│ │
│ └──OWNS──>(Internal Tools)
│
└──MANAGES──>(Sarah Chen - Manager)
│
└──HAS_ROLE──>(Approver Role)
│
└──HAS_ACCESS_TO──>(Salesforce)
Traversal: Jane → MANAGES → Sarah → HAS_ROLE → Approver
Answer: "Sarah Chen (Jane's manager) can approve Salesforce access.
She has the Approver role with admin-level access."
ANOTHER EXAMPLE: "What systems does the Security team own?"
═══════════════════════════════════════════════════════
(Security Team)──OWNS──>(Okta)
│ └──>(CrowdStrike)
│ └──>(Vault)
│ └──>(PagerDuty)
│
└──MEMBER_OF──>(Alice - Lead)
└──MEMBER_OF──>(Bob - Engineer)
└──MEMBER_OF──>(Carol - Analyst)
When two sources disagree about the same fact, the source system of record wins:
Org structure (manager, department): HR system (Workday) is truth
Group memberships: AD/LDAP is truth
Application ownership: CMDB is truth
Permissions: IAM system is truth
If Workday says Jane reports to Sarah but ServiceNow says Jane reports to Mike, Workday wins. Always.
1 Context Queries
When a user starts a conversation, the agent enriches context by querying the graph:
User: jane@acme.com starts a conversation
Agent queries graph:
─────────────────────────────────────────
MATCH (p:Person {email: "jane@acme.com"})
OPTIONAL MATCH (p)-[:MEMBER_OF]->(t:Team)
OPTIONAL MATCH (p)-[:MANAGES]->(m:Person)
OPTIONAL MATCH (p)-[:HAS_ACCESS_TO]->(a:Application)
RETURN p, t, m, a
Result enriches conversation context:
"Jane is in Engineering, managed by Sarah,
has access to Jira, GitHub, Salesforce."
2 Approval Routing (Traverse MANAGES)
3 Permission Checking (Traverse HAS_ACCESS_TO)
4 Smart Suggestions