Skip to main content
The Graph SDK is a programmable interface to Anyshift’s infrastructure graph. Use it when you need graph answers inside automation, dashboards, CI checks, incident workflows, deployment gates, or developer tools. For the exhaustive source-of-truth matrix, see CAPABILITIES.md in the SDK repository.

Resource Discovery

graph.resolve() returns the resolve intent with typed candidates containing resource identity, type, namespace, and cluster context. Use the selected candidate’s stable id with resource-scoped helpers such as graph.connections(), graph.path(), or graph.blast(). If a fuzzy helper selector remains ambiguous, the SDK throws BadQueryError with selectionCode: "ambiguous_resource" and the bounded retry candidates instead of choosing one silently.

Dependency and Impact Analysis

For dependencies derived from APM data, pass source: "auto" | "datadog" | "tempo" to graph.serviceTree(). Typed graph.path() selectors can connect an exact Kubernetes workload to a Tempo service or datastore with scope: "operational". The equivalent terminal workflows are documented in the Annie CLI guide.

Timelines and Change Feeds

For GCP activity, operation is the provider-native identifier and is distinct from the Anyshift correlation ID returned on each event. Missing status, freshness, or provenance evidence stays unknown; the SDK does not convert it into success, stale, or unmanaged.

Topology and Diagrams

Topology supports context, container, component, and dynamic levels plus source: "auto" | "datadog" | "tempo". Dynamic topology renders as a sequence diagram; the other levels render as flowcharts.

Kubernetes Safety and Hygiene

Security and Exposure

Observability and Alerting

Service Dependencies and Ownership

graph.datastore(), graph.flow(), graph.externalDep(), and graph.calls() also accept source: "auto" | "datadog" | "tempo". Tempo mode reads services, calls, datastores, messaging destinations, external endpoints, and Kubernetes identity bridges derived from Grafana Tempo traces. It does not expose individual trace or span search.

Choosing the Right Entry Point

Use typed helpers when you need deterministic automation. Use graph.query() when you want to compose a precise query from the documented targets and filters. Use graph.ask() when the caller has a natural-language question and can accept server-side routing.
For full helper parameter details and underlying intent names, use the SDK repository’s CAPABILITIES.md. For raw Graph Query Language syntax, use the complete query reference.