Resolve graph
Answers what holds for one entity and relation at a point, winner first, with every weaker account that disagreed.
POST /v1/graph/resolve
| Address | https://api.hanzo.ai/v1/graph/resolve |
| Method | POST |
| Operation | graphResolve |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Answers what holds for one entity and relation at a point, winner first, with every weaker account that disagreed.
The winner is the holding statement begun most recently, then the strongest under the rule vocabulary names. A relation that holds many values answers each; a disagreement is reported as contested, never resolved into silence.
Time: as_of is the instant of the world asked about and as_known how much this plane had heard; either absent is now.
Request
4 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
as_known | body | string | — | AsKnown is how much this plane had heard, RFC 3339: the answer as it would have been given then, which is what makes a past answer reproducible. |
as_of | body | string | — | AsOf is the instant of the world to answer about, RFC 3339: what held then. |
entity | body | string | yes | Entity is the thing to answer about. |
relation | body | string | yes | Relation is the one relation to settle. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | graph.graphResolveOut | ok |
default | problem-details | refused |
200 body — 49 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
as_known | body | string | — | AsKnown is the knowledge instant it was taken at, RFC 3339, the same way. |
as_of | body | string | — | AsOf is the valid instant this answer was taken at, RFC 3339: the one asked for, or the server's clock when none was. |
conflicts | body | graph.wireFact[] | — | Conflicts is, for a relation holding one value, every weaker account of the winner's moment that names a different value, strongest first. |
conflicts[].at | body | string | — | At is when the thing was so, RFC 3339, as the asserter gave it. |
conflicts[].by | body | string | — | By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body. |
conflicts[].confidence | body | number (double) | — | Confidence in [0,1] as the asserter gave it; absent is 0. |
conflicts[].entity | body | string | — | Entity is the thing described, in the organization's own namespace. |
conflicts[].evidence | body | string | — | Evidence points at the record the claim came from. |
conflicts[].id | body | string | — | ID is the assertion's content address, minted by the server from what was asserted. |
conflicts[].knowable | body | string | — | Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. |
conflicts[].names | body | boolean | — | Names true means the assertion is an edge and Value is an entity. |
conflicts[].relation | body | string | — | Relation is what was asserted of it. |
conflicts[].seen | body | string | — | Seen is when the asserter says it became knowable, RFC 3339. |
conflicts[].source | body | string | — | Source names who asserted, as the caller gave it. |
conflicts[].until | body | string | — | Until is when the thing stopped being so, RFC 3339, as the asserter gave it. |
conflicts[].value | body | string | — | Value is what the relation points at: another entity's key when Names is true, otherwise a scalar. |
contested | body | boolean | — | Contested is true exactly when Conflicts is not empty. |
entity | body | string | — | Entity is the entity the question named, echoed so a stored answer still says what it is about. |
held | body | graph.wireFact[] | — | Held is every statement holding at the point, Winner first, one per value: one for a relation that holds one value at a time, and every one the pair holds for a relation that holds many — the five holders of a position over five terms are five. |
held[].at | body | string | — | At is when the thing was so, RFC 3339, as the asserter gave it. |
held[].by | body | string | — | By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body. |
held[].confidence | body | number (double) | — | Confidence in [0,1] as the asserter gave it; absent is 0. |
held[].entity | body | string | — | Entity is the thing described, in the organization's own namespace. |
held[].evidence | body | string | — | Evidence points at the record the claim came from. |
held[].id | body | string | — | ID is the assertion's content address, minted by the server from what was asserted. |
held[].knowable | body | string | — | Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. |
held[].names | body | boolean | — | Names true means the assertion is an edge and Value is an entity. |
held[].relation | body | string | — | Relation is what was asserted of it. |
held[].seen | body | string | — | Seen is when the asserter says it became knowable, RFC 3339. |
held[].source | body | string | — | Source names who asserted, as the caller gave it. |
held[].until | body | string | — | Until is when the thing stopped being so, RFC 3339, as the asserter gave it. |
held[].value | body | string | — | Value is what the relation points at: another entity's key when Names is true, otherwise a scalar. |
known | body | boolean | — | Known is false when nothing held at the point. |
relation | body | string | — | Relation is the relation the question named, echoed for the same reason. |
truncated | body | boolean | — | Truncated says this pair holds more statements than one read returns, so the answer was decided from the ceiling-full begun most recently. |
winner | body | graph.wireFact | — | |
winner.at | body | string | — | At is when the thing was so, RFC 3339, as the asserter gave it. |
winner.by | body | string | — | By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body. |
winner.confidence | body | number (double) | — | Confidence in [0,1] as the asserter gave it; absent is 0. |
winner.entity | body | string | — | Entity is the thing described, in the organization's own namespace. |
winner.evidence | body | string | — | Evidence points at the record the claim came from. |
winner.id | body | string | — | ID is the assertion's content address, minted by the server from what was asserted. |
winner.knowable | body | string | — | Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. |
winner.names | body | boolean | — | Names true means the assertion is an edge and Value is an entity. |
winner.relation | body | string | — | Relation is what was asserted of it. |
winner.seen | body | string | — | Seen is when the asserter says it became knowable, RFC 3339. |
winner.source | body | string | — | Source names who asserted, as the caller gave it. |
winner.until | body | string | — | Until is when the thing stopped being so, RFC 3339, as the asserter gave it. |
winner.value | body | string | — | Value is what the relation points at: another entity's key when Names is true, otherwise a scalar. |
Failure carries the platform error shape — see Errors.
Examples
hanzo graph resolveimport { Configuration, GraphApi } from 'hanzoai';
const api = new GraphApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.graphResolve({ entity: "<entity>", relation: "<relation>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import GraphApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = GraphApi(client).graph_resolve(entity="<entity>", relation="<relation>")cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.GraphAPI.GraphResolve(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, graph_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = graph_api::graph_resolve(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GraphApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new GraphApi(client).graphResolve();curl -X POST https://api.hanzo.ai/v1/graph/resolve \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity": "<entity>",
"relation": "<relation>"
}'Tool graph, op graphResolve — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "graph",
"arguments": {
"op": "graphResolve",
"input": {
"entity": "<entity>",
"relation": "<relation>"
}
}
}
}'