AI Infra
Ingest Knowledge
Add content to the knowledge graph with automatic entity and relationship extraction.
Ingest Knowledge
Ingest text content into Cerebe's Knowledge Graph. The system automatically extracts entities and relationships using Graphiti, building a temporal knowledge graph that evolves over time.
Endpoint
POST /api/v1/knowledge/ingestRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Text content to ingest into the knowledge graph |
entity_id | string | No | Entity to associate the knowledge with |
source | string | No | Source identifier (e.g., onboarding_notes, lesson_plan) |
metadata | object | No | Additional metadata for the ingestion |
Examples
from cerebe import AsyncCerebe
client = AsyncCerebe(api_key="ck_live_...")
result = await client.knowledge.ingest(
content="Alice is a senior engineer at Acme Corp. She mentors Bob, who joined the team in January.",
entity_id="team_alpha",
source="onboarding_notes",
)
print(result)
# → {"entities_created": 3, "relationships_created": 2, "status": "completed"}import Cerebe from '@cerebe/sdk'
const client = new Cerebe({ apiKey: 'ck_live_...' })
const result = await client.knowledge.ingest({
content: 'Alice is a senior engineer at Acme Corp. She mentors Bob, who joined the team in January.',
entityId: 'team_alpha',
source: 'onboarding_notes',
})
console.log(result)
// → { entitiesCreated: 3, relationshipsCreated: 2, status: "completed" }curl -X POST https://api.cerebe.ai/api/v1/knowledge/ingest \
-H "X-API-Key: ck_live_..." \
-H "Content-Type: application/json" \
-d '{
"content": "Alice is a senior engineer at Acme Corp. She mentors Bob, who joined the team in January.",
"entity_id": "team_alpha",
"source": "onboarding_notes"
}'Response
{
"entities_created": 3,
"relationships_created": 2,
"status": "completed"
}Status Values
| Status | Description |
|---|---|
completed | Ingestion succeeded |
unavailable | Knowledge graph service is not available |
How It Works
- Content Analysis — The text is parsed to identify entities (people, organizations, concepts) and their relationships.
- Entity Extraction — Graphiti extracts structured entities with types and properties.
- Relationship Mapping — Connections between entities are identified and stored with temporal metadata.
- Temporal Tracking — All facts include timestamps, enabling point-in-time queries (e.g., "Who was Bob's mentor in March?").
Error Responses
| Status | Description |
|---|---|
401 | Missing or invalid API key |
503 | Knowledge graph service unavailable |
Next Steps
- Query Knowledge — Search entities and relationships
- Knowledge Overview — Full guide to the Knowledge Graph