Schema-valid extraction
The model extracts entities, relationships, and mentions that match your strict schema.
Define the nodes and relationships your domain cares about, let the model extract schema-valid facts from your documents, and give the agent one search tool that combines vector and full-text search with bounded relationship traversal. Every result carries the chunks it came from.
One schema drives extraction, indexing, and search.
Declare typed nodes such as Product and Incident, and relationships such as AFFECTS.
A managed knowledge graph creates constraints plus vector and full-text indexes.
One ingestGraphText() call chunks, extracts, embeds, and replaces the source document.
createGraphSearchTool() gives the agent hybrid search with bounded traversal and chunk evidence.
The model extracts entities, relationships, and mentions that match your strict schema.
Stable source IDs make re-ingesting a document a transactional replacement, not a duplicate.
Limit relationships, direction, depth, nodes, and edges so a search never wanders the whole graph.
The search tool and GraphExplorer work across both, including graphs you already have.
Search seeds from chunks and entities, then walks only the relationships you allow.
1import { createGraphSearchTool } from '@anvia/graph'23const searchGraph = createGraphSearchTool({4 name: 'search_incident_graph',5 description: 'Search incidents, affected products, and supporting evidence.',6 graph,7 model: embeddingModel,8 search: {9 type: 'hybrid', seeds: ['chunks', 'entities'],10 topK: 6, candidatesPerSeed: 12, rrfK: 60,11 },12 traversal: {13 relationships: ['AFFECTS'], direction: 'both',14 maxDepth: 2, maxNodes: 24, maxRelationships: 36,15 },16 evidence: { type: 'chunks', maxChunks: 8 },17})Existing graphs get search but not index provisioning, ingestion helpers, or document replacement. Provenance evidence on an existing graph needs evidence type none.
Start from the guide, run the example, or look at what else Anvia handles.