Skip to main content
The four most common agent flows, end‑to‑end. Every snippet expects two environment variables:
The Python examples use httpx (async). The TypeScript examples use the runtime‑native fetch (Node 22+ / modern browsers).

1. Resolve a clone URL

The agent has a working tree at github.com/myorg/payments-api and needs to find the corresponding Riftmap repo.
Returns the repo row including freshness fields. Use full_path=myorg/payments-api instead of url= if you only have the slug.

2. Hydrate context in one round‑trip

Once you have the repo ID, fetch repo + capped dependencies + capped dependents + artifacts + a slim ownership summary in a single call.
Use dependencies_total and dependents_total to detect when you need to paginate the full lists separately (the bundled arrays are capped at 100). Both lists are declaration rows, so a repository using several of this repo’s actions or packages appears once per use: dependent_repositories_total is the number of distinct repositories.

3. Compute the transitive blast radius

When you actually need to know “if I change repo A, what transitively breaks?”, call /impact. This runs a Python traversal over confidence-filtered edges.
max_depth defaults to 10 (range 1–20). min_confidence defaults to 0.4, which admits every reference a machine could act on and excludes only references a human reads (prose, templates, generated blobs). Two fields on the response keep a filtered answer honest:
  • applied_min_confidence — the floor actually used, so you can tell a narrowed answer from a complete one.
  • excluded_by_confidence — how many repos the floor removed. An empty affected_repositories with a non-zero count here means “filtered out”, not “nothing breaks”.
Each affected repo’s own confidence is the weakest edge on the strongest chain reaching it. To narrow the radius, filter that field client-side rather than re-requestingconfidence >= 0.8 gives you deterministic parser edges plus build-file and manifest evidence, using data the response already carries.

4. Walk the local subgraph

For visualisation, or for an agent that wants the local neighbourhood rather than the full transitive set, request a subgraph anchored at a repo.
Returns { nodes: [{id, type, label, metadata: {archived, last_activity_at, health_status, …}}], edges: [{source, target, dependency_type, version_constraint, confidence}] }. The shape is G6‑ready, but plain enough to drive any visualisation library.

Pagination

For dependencies / dependents lists past 100 items:

Group dependents by action or package

Each /dependents row is one use: the consuming repository is target_repository_id / target_repository_name, and raw_reference is what it uses — for GitHub Actions the full uses: path, such as grafana/shared-workflows/actions/send-slack-message. Grouping on it answers “which repos use this action, pinned where?” before you deprecate or break it.
Python
A consumer last scanned before v1.25.0 still reports the bare owner/repo of the hub as its raw_reference until it is rescanned.

Errors agents should handle