Extract a typed graph. Traverse what is allowed. Return the evidence.

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.

From documents to graph evidence.

One schema drives extraction, indexing, and search.

  1. 01

    Define the schema

    Declare typed nodes such as Product and Incident, and relationships such as AFFECTS.

  2. 02

    Provision the graph

    A managed knowledge graph creates constraints plus vector and full-text indexes.

  3. 03

    Ingest documents

    One ingestGraphText() call chunks, extracts, embeds, and replaces the source document.

  4. 04

    Search and traverse

    createGraphSearchTool() gives the agent hybrid search with bounded traversal and chunk evidence.

A graph the agent can trust.

Schema-valid extraction

The model extracts entities, relationships, and mentions that match your strict schema.

Clean re-ingestion

Stable source IDs make re-ingesting a document a transactional replacement, not a duplicate.

Bounded traversal

Limit relationships, direction, depth, nodes, and edges so a search never wanders the whole graph.

Neo4j and Memgraph

The search tool and GraphExplorer work across both, including graphs you already have.

One tool for hybrid graph search.

Search seeds from chunks and entities, then walks only the relationships you allow.

search.ts
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.

Build it.

Start from the guide, run the example, or look at what else Anvia handles.

Anvia