OptionalcontextKeeps only the entities mentioned by contexts matching the filter. Without entityId or search, they
are ranked by how many matching contexts mention them. Filters on context-record metadata only, not on
per-chunk keys.
OptionalentityCenters the subgraph on one entity: the entity plus its neighbors, strongest relationships first. Ids
come from KnowledgeBaseGraphNode.id and churn on rebuild; an unknown id fails with
ENTITY_NOT_FOUND. Cannot be combined with topicId or search.
OptionalincludeWhether to attach the topic table (topics). Default true. A caller that already holds it can pass false:
on a large graph the table runs to thousands of topics.
The id of the AiKnowledgeBase.
OptionalnodeHard cap on returned nodes. Default 200, at most KNOWLEDGE_BASE_GRAPH_EXPLORE_MAX_NODES.
OptionalsearchFinds entities by name: exact names and aliases first, then prefixes, then substrings, each by degree.
When no name matches, returns the entities nearest in meaning instead (searchMatch: 'similar').
At most KNOWLEDGE_BASE_GRAPH_SEARCH_MAX_LENGTH characters. Cannot be combined with topicId or
entityId.
OptionaltopicRestricts the subgraph to entities under the given topic node id — any hierarchy level; an entity
matches when the topic appears anywhere in its topicPath. Unknown ids fail with
TOPIC_NOT_FOUND. Ids come from KnowledgeBaseGraphTopic.id and churn on rebuild.
Request structure for exploring a bounded subgraph of a knowledge base's graph (visualization). By default it returns the highest-degree entities and the relationships among them;
topicId,entityIdandsearchselect other entity pools, andcontextMetadataFilternarrows any of them.