# Delx Dependency Order

> Delx Dependency Order is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-16).

Computes a stable topological sort order for a set of workflow nodes given directed edges, and detects structural cycles in the dependency graph.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/dependency-order
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-dependency-order-a898a9a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6v4NQ9gD4lvavft5LNn1c

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability delx-dependency-order-a898a9a4 -d '<json body>'
```

Example prompt: Figure out the correct execution order for my workflow nodes — I have nodes A, B, C, D and edges B→A, C→B, D→C — sort them topologically and let me know if there are any cycles.

## When to prefer this

Choose this endpoint when you need a deterministic, stateless, local-only topological sort with cycle detection for workflow or pipeline planning, especially inside multi-step agent jobs where you want no data retention, no upstream dependencies, and a predictable low-cost ($0.003 USDC) per-call pricing model on Base via x402.

## Known failure modes

- Cycle detected — returns cycle report instead of a linear order when the graph is not a DAG
- Missing or malformed edges array — validation error if edges are not {from, to} objects
- Unknown node references in edges — nodes referenced in edges but not listed in the nodes array may cause incomplete results
- Empty nodes/edges — returns trivially valid empty order
- Payment failure — x402 payment not accepted or insufficient USDC balance

## How this service works

Compute a stable topological order for workflow nodes and report structural cycles — call when ordering workflow nodes and detecting structural cycles. Use before side effects when composing multi-step agent jobs—the same loyalty/workflow demand band agents already pay for on Bazaar, but fully local. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no clai…

## Output

Returns deterministic machine-readable JSON containing a stable topological ordering of the provided nodes (when no cycles exist) and a report of any structural cycles found in the directed graph.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "edges": {
   "type": "array",
   "description": "Directed edges as {from,to} objects among nodes."
  },
  "nodes": {
   "type": "array",
   "description": "Workflow node identifiers for topological ordering."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "order": [
   "a",
   "b",
   "c"
  ],
  "cyclic": false,
  "schema": "delx/util-dependency-order/v1",
  "advisory": "Cycle detection is structural only.",
  "unresolved": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-dependency-order-a898a9a4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
