API Reference

Long-running requests and events

Running an agent or executing a network does real work — model calls, tool calls, retrieval — and a single request can take minutes. These endpoints are synchronous: the response arrives when the work is done.

Configure a read timeout of several minutes in your HTTP client for these calls, and raise the timeout of any proxy or load balancer you place between your application and your deployment. A client that gives up early loses the answer, and the work it started may still complete.

Generous timeout
import os

import requests

response = requests.post(
    f"{os.environ['VDF_BASE_URL']}/agent-hub-api/api/agent/execute",
    headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
    json={"agent_name": "contract-reviewer", "prompt": "Summarise the renewal terms."},
    timeout=600,
)
response.raise_for_status()
print(response.json())

Following a network run

A network run is recorded as it executes. To follow one, poll the run record every few seconds and read its status, then fetch individual node outputs as they complete. Stop polling when the run reports a final status.

Once a run has finished, its record, node outputs, artifacts, approvals, and proof remain available from the Runs endpoints.

Background jobs

Some operations start work in the background and return immediately: integration synchronisations, knowledge indexing, and vector index builds. They return a status you can poll with the matching status endpoint. Poll at a modest interval — every few seconds — and stop when the status reports completion or failure.