CerebeCerebe Docs

Knowledge Graph

Build and query temporal knowledge graphs with entities and relationships.

Knowledge Graph

Cerebe's Knowledge Graph stores entities, relationships, and facts that evolve over time. Powered by Graphiti, it provides temporal awareness — you can query what was true at any point in time.

Core Operations

Ingest Knowledge

Add content to the graph. Cerebe automatically extracts entities and relationships:

await client.knowledge.ingest(
    content="Alice is a senior engineer at Acme Corp. She mentors Bob.",
    entity_id="team_alpha",
    source="onboarding_notes",
)

Query the Graph

Search for entities and relationships:

results = await client.knowledge.query(
    query="Who does Alice mentor?",
    depth=2,
    limit=10,
)

Visualize

Get graph data ready for visualization:

viz = await client.knowledge.visualize(
    query="team relationships",
    depth=3,
)
# Returns nodes and edges for rendering

API Reference

MethodEndpointDescription
POST/api/v1/knowledge/ingestAdd to knowledge graph
POST/api/v1/knowledge/queryQuery entities/relationships
GET/api/v1/knowledge/entitiesList entities
POST/api/v1/knowledge/visualizeGet visualization data

On this page