GraphsClient
GraphsClient(gateway: GraphsGateway, *, config: "Config | None" = None)Async-first graphs client.
Graph databases are the persistence primitive consumed by the Logic reasoner; they are exposed via the RAI Direct Access HTTP API. This client is a thin, async wrapper around those endpoints with stable domain models and exceptions.
On deployments that do not expose Direct Access (for example, SQL-only
Snowflake installations), the root Client still surfaces client.graphs
for stable typing, but every method raises
GraphsUnsupportedError.
Methods
Section titled “Methods”.aclose()
Section titled “.aclose()”GraphsClient.aclose() -> NoneClose the client (best-effort).
Returns:
None- Always returnsNone.
.list()
Section titled “.list()”GraphsClient.list() -> list[Graph]List all graphs visible to the caller.
Returns:
list[Graph] - The graphs the server returns, sorted by name.
.get()
Section titled “.get()”GraphsClient.get(name: str) -> Graph | NoneGet a graph by name, returning None if it does not exist.
Returns:
Graph|None- The graph, orNoneif not found.
.create()
Section titled “.create()”GraphsClient.create(name: str) -> NoneCreate a new (empty) graph.
Args: name: The graph name to create.
Returns:
None- Always returnsNone.
.clone()
Section titled “.clone()”GraphsClient.clone(source: str, target: str, *, force: bool = False) -> NoneClone source to a new graph target.
Args:
source: Existing graph to clone from.
target: New graph to create.
force: When True, delete an existing target before cloning.
Returns:
None- Always returnsNone.
.delete()
Section titled “.delete()”GraphsClient.delete(name: str, *, force: bool = False, language: str = "rel") -> NoneDelete (or release the index for) a graph.
Args:
name: The graph to delete.
force: Bypass model.reuse_model and force a full delete.
language: Language hint forwarded only on index-release deletes
("rel" or "lqp"). Ignored when use_graph_index is
disabled — the plain database-delete endpoint does not accept
a language hint. Matches v0 delete_graph(..., language=...)
behavior.
Returns:
None- Always returnsNone. Missing graphs are treated as a no-op.