The four most common agent flows, end‑to‑end. Every snippet expects two environment variables:Documentation Index
Fetch the complete documentation index at: https://docs.riftmap.dev/llms.txt
Use this file to discover all available pages before exploring further.
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 atgithub.com/myorg/payments-api and needs to find the corresponding Riftmap repo.
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 in a single call.dependencies_total and dependents_total to detect when you need to paginate the full lists separately (the bundled arrays are capped at 100).
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 BFS over confidence‑filtered edges.
max_depth defaults to 10 (range 1–20). min_confidence defaults to 0.8 — drop to 0.5 if you want to include heuristic matches in the radius.
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.{ 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
Fordependencies / dependents lists past 100 items:
Errors agents should handle
| Status | Meaning | Recommended action |
|---|---|---|
401 | Missing or invalid API key | Surface to user; never retry. |
404 | Repo not in this workspace, or never scanned | Try lookup with the alternate parameter; fall back to “unknown repo”. |
409 | Lookup matched multiple repos | Disambiguate using full_path. |
422 | Out‑of‑range pagination, or invalid query param | Fix the request; do not retry. |
429 | Rate limit (mutations only) | Honour Retry-After header before retrying. |
