Skip to navigation

Query a graph

Alpha

Experimental. Answers a natural-language question about a graph with a read-only agent. Returns the answer, the cited graph items, and the graph records that the agent retrieved. Set stream to true to get the agent steps as server-sent events. The operation is experimental: its request, response, and events can change. Zep enables the operation for each account. A request from an account without access returns 404 not_found. To get access, contact support@getzep.com.

Authentication

AuthorizationApi-Key

Type “Api-Key” followed by a space and the project API key.

Request

Graph query
graph_uuidslist of stringsRequired
The graph UUIDs to query. The current release accepts one UUID.
querystringRequired

The natural-language question about the graph.

streamfalseRequired

When true, return agent events as server-sent events.

guidancestringOptional
Optional caller guidance for the answer. The agent treats it as untrusted text.

Response

answerstringOptional
The final answer with citation handles removed.
citationsobjectOptional
The UUIDs of the graph items cited by the answer.
resultsobjectOptional
The distinct graph records retrieved during the query.
truncatedbooleanOptional
Whether the record limit omitted any results.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error