Extension reference
An agent-data extension improves a public API while preserving its existing calls. It keeps the same listing ID, the catalog identifier for that API.
Submit a saved request through CLI, HTTP, or MCP. The request’s prompt describes the improvement.
Inspect the target
Section titled “Inspect the target”Use an API handle for <api-reference>. The handle news-ycombinator-com identifies the Hacker News Read API. The command also accepts a listing ID.
agent-data parse extension target news-ycombinator-comSupply an API key before this request.
curl --fail-with-body \ 'https://agent-data.motie.dev/api/v1/parse/extensions/targets/news-ycombinator-com' \ -H "Authorization: Bearer $AGENT_DATA_API_KEY"Call extension_target.
{"api_reference":"news-ycombinator-com"}This is the actual CLI target response from November 17, 2026.
{ "listingId": "c96b10fb-7db3-4761-8b45-be46c4825d78", "name": "Hacker News Read API", "sourceHost": "news.ycombinator.com", "contractVersion": "2adfa30c4a23c71c52ee59b5cbedd260c60bd34a18ffa81b4d5e9203781ebe09", "operations": [ {"method":"GET","path":"/v1/domains"}, {"method":"GET","path":"/v1/feeds"}, {"method":"GET","path":"/v1/feeds/{feed}"}, {"method":"GET","path":"/v1/items/{item_id}"}, {"method":"GET","path":"/v1/items/{item_id}/discussion"}, {"method":"GET","path":"/v1/poll"}, {"method":"GET","path":"/v1/search"}, {"method":"GET","path":"/v1/users/{username}"}, {"method":"GET","path":"/v1/users/{username}/activity"} ], "canStart": true}| Field | Meaning |
|---|---|
listingId | The API’s catalog identifier. |
sourceHost | The source website’s hostname. |
contractVersion | The version of the inspected contract. |
operations | The API’s existing HTTP methods and paths. |
canStart | Whether the target permits an extension start. |
Copy the current contractVersion into your request. canStart does not guarantee acceptance, allowance, or a successful improvement.
Current saved request
Section titled “Current saved request”CLI submission, HTTP POST /api/v1/parse/extensions, and MCP extension_submit require these fields.
| Field | Required value |
|---|---|
requestId | A UUID generated once for the saved request. |
listingId | Copy this value from target inspection into the saved request. |
contractVersion | The target’s 64-character lowercase hexadecimal version. |
url | An HTTP or HTTPS source URL, at most 4,096 characters, from the target source. |
prompt | Nonempty text describing the improvement, inputs, and required outputs. |
Prepare the saved request from your requirements and the current target. The file lives in your working directory.
./└── extension.json # Complete saved requestCheck the saved request without submitting work.
agent-data parse extension submit extension.json --dry-runSubmit the file when you intend to create extension work.
agent-data parse extension submit extension.jsonSubmit the saved file when you intend to create extension work.
curl --fail-with-body \ 'https://agent-data.motie.dev/api/v1/parse/extensions' \ -H "Authorization: Bearer $AGENT_DATA_API_KEY" \ -H 'Content-Type: application/json' \ --data-binary @extension.jsonThe success status is HTTP 202. Read the returned state before you follow the build.
Call extension_submit with the JSON object saved in extension.json. The tool accepts the object, not a filename. It has no preview argument.
Read saved-request status
Section titled “Read saved-request status”requestId identifies the saved extension, separately from its pj_… build ID. Use the same account that submitted the request.
Read the request ID from the extension.json file you prepared and submitted.
request_id=$(node -p 'require("./extension.json").requestId')agent-data parse extension status "$request_id"request_id=$(node -p 'require("./extension.json").requestId')curl --fail-with-body \ "https://agent-data.motie.dev/api/v1/parse/extensions/requests/$request_id" \ -H "Authorization: Bearer $AGENT_DATA_API_KEY"Call extension_status with request_id set to the requestId in extension.json.
| Response field | Meaning |
|---|---|
requestId | The saved request identifier. |
buildId | The associated build ID, or null without an available build. |
state | starting, building, verifying, published, failed, or cancelled. |
rejection | null, contract_changed, daily_limit, or start_failed. |
After published, read the updated contract. Call the changed operation to check its result.
Retry and errors
Section titled “Retry and errors”Keep the saved request unchanged after a transport failure. Read its status before a retry. If you need a retry, submit the same document.
| What you see | What to do |
|---|---|
request.prompt: unknown field | Install the current CLI with npm install -g agent-data@latest. Keep the saved document intact. |
contract_changed | Read the target again. Prepare a new request against that contract. |
daily_limit | Check your build allowance before another request. |
start_failed or a failed build. | Retain both identifiers. Follow build recovery. |
extension_request_not_found | Check the submitting account and saved request ID. |
| Rejection after reuse of an ID with changed content. | Keep retries identical to the saved request. Use a new ID for new content. |
CLI options
Section titled “CLI options”target, submit, and status accept --api-key, --base-url, --verbose, and --help. submit also accepts --dry-run for local validation. Authentication may still resolve or refresh credentials during that preview.
When to build instead
Section titled “When to build instead”Use Build an API for a website without an existing source API. Use the extension guide to prepare and follow an improvement.