Skip to content
Prooftask
Create a results agreementCreateSign in

Connect an agent to an agreed delivery.

Read agreements, submit delivered materials and export verifiable records through the Agent API.

On this page

Quick start

Connect your workspace and read an authorized project. Reading does not submit materials or confirm completion.

No project yet? Create a results agreement · Try public discovery without a credential

1. Download the client

Node.js 24+ · no dependencies

Save the client in a local folder. Review its source, then run the commands below from that folder.

2. Request access

Node.js
node agent-client.mjs connect-start "Delivery assistant" connection.json

Open verificationUrl, sign in or create an account, and choose your workspace. Match userCode, choose your role, project and expiry, and leave tasks unselected for this first read.

3. Save the approved credential

After approving access in the browser, run this command. If the state is PENDING or SLOW_DOWN, wait the returned interval before checking again. Continue only when the state is CONNECTED.

Node.js
node agent-client.mjs connect-poll connection.json credential.json
Connection success example
JSON
{
  "state": "CONNECTED",
  "message": "Credential saved privately. Set PROOFTASK_AGENT_TOKEN_FILE to the output file."
}

Keep connection.json and credential.json private. An expired or denied connection needs a new connection file; existing files are never overwritten.

4. Read your project

After CONNECTED, point the environment variable to credential.json and check your access.

macOS / Linux
export PROOFTASK_AGENT_TOKEN_FILE="$PWD/credential.json"
node agent-client.mjs me
Windows PowerShell commands
PowerShell
$env:PROOFTASK_AGENT_TOKEN_FILE = (Resolve-Path ./credential.json).Path
node agent-client.mjs me

Check tenantId and organizationId in the response. Replace delivery_YOUR_UUID below with an ID from projectIds.

Node.js
node agent-client.mjs inspect delivery_YOUR_UUID

A successful read returns project.taskId, project.state, availableActions, blockedActions and humanUrl. Use humanUrl to open the same project in your workspace.

Further command examples use Node.js. The workflow guide lists the operations supported by each client.

Manage agent access · Connection and recovery guide

Next: Submit delivered work · Export and verify a record

Try public discovery without a credential

Public discovery uses the Node.js client. These commands send no credential and do not change project data.

Download Node.js client · View public discovery JSON

Node.js 24+ · no dependencies
node agent-client.mjs discover "automation"
node agent-client.mjs specification business-automation 2

This example pins version 2. For a new draft, use the exact version and digest returned by discovery. Do not silently upgrade an agreed version.

Public discovery OpenAPI · How to accept an automation delivery

Agreement and delivery

Read, submit and obtain a record

  1. Use an agreed project with SUBMIT_MATERIALS only. Prepare and save the exact submission, review it, then send that saved request.
  2. Wait for the buyer's decision. Follow requests for corrections or evidence against the exact submitted version.
  3. Once the Result Record is issued, export its verification package and check it with independently trusted issuer keys.

Complete submission walkthrough · Commands · Export and verify a record

Prepare a draft

Use CREATE_DRAFT to prepare a complete buyer agreement draft or supplier proposal draft for human review. Dates, original-file arrangements, contract references and requirements use the same editor fields. Preparation does not send, agree, accept, sign or pay.

POST /api/agents/v1/drafts

Save the request ID and reuse the same payload if the response is uncertain. Open the returned humanUrl to review the draft before sending an agreement.

OpenAPI contract · Create an agreement

Create your first agreement.

Enable CREATE_PROJECT in agent access. Creation commits a buyer agreement; it is not a private draft. A human invites the supplier.

  1. Replace the example parties, scope, dates, criteria and original-storage terms. Explicitly choose the purpose, contract basis and sharing policy. The example uses TEST; do not use example terms for a real commitment.
  2. Run prepare-create. It reads the current documents, previews the exact confirmation and saves the complete input locally. This creates no agreement and records no consent.
  3. Review every term, the current service documents and the displayed confirmation. Only after explicit approval, run create with that same file. Keep it unchanged for retries after an uncertain response.
  4. Open the returned humanUrl to invite the supplier. After human action, reread the project before planning another command.
Prepare, review, then explicitly create
node agent-client.mjs prepare-create agent-project.json prepared-project.json
# Review prepared-project.json and the displayed confirmation before continuing.
node agent-client.mjs create prepared-project.json

For raw HTTP, send the complete prepared file to POST /api/agents/v1/projects. Required fields include baselineStatement, termsPolicy, legalContext with current documents, and confirmationDigest from the preview.

First read GET /api/acceptance/legal-config, then POST /api/acceptance/confirmation-preview with legalContext and operation AGREEMENT. OpenAPI includes both public preparation operations with a root server URL and no credential requirement.

If documents change before submission, prepare a new file from the unprepared input and review again. Do not update a saved retry payload automatically.

Full public workflow guide · OpenAPI contract

Manage supplier proposals

Use separate CREATE_PROPOSAL, UPDATE_PROPOSAL, PUBLISH_PROPOSAL, RESPOND_PROPOSAL and WITHDRAW_PROPOSAL permissions through /api/agents/v1/proposals. Each write checks the exact proposal version and current authorization.

Publishing gives the named buyer a review URL; it does not send an invitation email or accept the proposal. Buyer acceptance creates the final agreement. The supplier must separately confirm that version before submitting materials.

Supplier proposal guide · OpenAPI contract

Roles and decisions

Both parties can work from the same versioned agreement. The supplier submits the delivered version and materials. The buyer reviews each criterion and makes the completion decision. Agent permissions narrow what an automation may do within that flow; they do not transfer the other party’s commitments.

Authorization and permissions

Choose your role and tasks, then the exact projects or proposals. You can adjust individual permissions. Leave tasks unselected for read-only access. Renewal preserves the existing scope and actions.

The buyer decides by default. An agent may confirm completion only with separate, explicit CONFIRM_COMPLETION authorization. Required signatures and resuming a paused agent remain human actions.

Exact project versions

Access covers selected agreement versions, selected proposals and their exact accepted projects. Later agreement revisions need new authorization. Credentials expire within 30 days and can be revoked.

Explicit write permissions

Drafting, creating, publishing, responding, submitting, reviewing, accepting and issuing records are separately granted actions. Permission to request corrections does not permit acceptance.

Human pause and handoff

Pause stops agent writes for that project version in your workspace. Reads and human actions remain available. Only a human can resume.

Actions with a clear source

Signed events name the agent and authorizing person. Delegation does not add permissions or identity assurance.

Signing out of the browser does not revoke an agent credential. Revoke it in agent access when it should stop working. Buyer and supplier workspaces control their own agents separately.

Acceptance and record issuance need separate approvals; neither is included in a task preset. Issuance uses existing coverage and does not authorize a purchase. An Agent with acceptance permission alone records the decision and waits for issuance.

Send credentials only in the HTTPS Authorization header.

Manage agent access · Connection and recovery guide

Events and workflows

Return project status to your workflow

Map materials, save a request, deliberately submit it, then verify notifications and read current job results. Job IDs and workflow references stay attached across retries.

Subscriptions authorize exact projects and event types. Configure an HTTPS callback and keep the signing secret private. Events can arrive late, out of order, or more than once. Use event IDs for deduplication and read the current state before updating your workflow.

A successful notification is not acceptance or payment. Revoke or pause a subscription to stop future sends.

Connect an existing n8n workflow

Use one agreed project and grant only submission access. The buyer continues to review in their own workspace and makes the completion decision. No new decision or payment permissions are added.

Import each JSON file into n8n. In each HTTP Request node, select a Header Auth credential with name Authorization and value Bearer <your scoped agent credential>. Never put the credential in the input, workflow export or material references.

Map a single project and its actual materials in Input. Preparing makes no submission: save its entire output in your existing durable job store before running Submit. Retries must reuse that saved envelope, including its request ID. Do not prepare again after an uncertain send.

Read decision returns the current state and exact references; it does not accept work, independently verify quality or move money. Run it from your existing workflow when a status check is needed. There is no automatic polling schedule.

Material mapping and safe recovery

Use one material item per agreed criterion: its criterion ID, explanation, references, file names, sizes and SHA-256 fingerprints. Retain the current agreement digest, previous submission ID and correction request ID. Use the example client to hash local files.

On a timeout, retry the exact saved submission. On a version conflict, pause or revoked grant, stop and ask the authorized person to review. Only a new deliberate operation gets a new request ID. Keep n8n execution data private and use your existing retention controls.

API reference

The Agent API is available at https://prooftask.com/api/agents/v1.

OpenAPI 3.1.1 (JSON)

All paths below are relative to /api/agents/v1. The example client supports these commands; inspect the current project and confirmation requirements before a write. Historical record, current status, and standard export are separate reads: the export does not mint a second receipt, and declared compatibility metadata is not external verification.

Commands and recovery

A project read returns project, automation, humanUrl, availableActions, and blockedActions. A blocked action includes its reason, WAIT_FOR_HUMAN, requiredHumanAction and humanUrl. Required signatures must be completed in the human signing workspace; reread after human action. A human also manages the separate Signed Delivery service quote and payment. A record credit does not buy external signatures. The available actions are hints; current permissions, dates, confirmations, and material requirements still apply.

Every project command binds to the current project.headEventHash and automation.revision. Persist the entire envelope with a stable UUIDv4 request ID before sending.

Project command envelope · values come from the current read
{
  "expectedEventHash": "exact current project.headEventHash",
  "automationRevision": 0,
  "input": {
    "requestId": "a fresh UUIDv4 for this action",
    "reason": "Explain the operation"
  }
}

Try a deliberate handoff

This example is a write: it pauses agent actions and leaves a note for the human. Use a selected test project with at least one granted write action. Save the following as handoff.json:

handoff.json
{"reason":"Please review the materials before automation continues."}
Prepare locally, review the saved envelope, then send
node agent-client.mjs prepare delivery_YOUR_UUID handoff handoff.json pending-handoff.json
# Review pending-handoff.json before running the next command.
node agent-client.mjs send delivery_YOUR_UUID handoff pending-handoff.json

The prepare command writes a new file without overwriting an existing one. After an uncertain network result, retry the same saved envelope and request ID. A successful replay does not create a second business event. Changed content under the same ID is rejected.

Recover with the right next step

ResponseNext step
REVIEW_CREATION_REQUIREMENTSReview current documents and preview the exact confirmation using the first-agreement guide. First agreement
WAIT_FOR_HUMAN · signature or pauseShow the returned human instruction and link. Wait for the person, then reread; do not repeatedly resubmit.
401 · AUTH_INVALIDAsk the owner to reauthorize.
403 · action or project forbiddenReview the explicitly granted permissions and exact project scope.
409 · AGENT_PAUSEDWait for the human. The agent cannot resume itself.
409 · changed, stale, or conflicting stateRead the current project and replan. Use a new request ID for a changed action.

Error responses include error, retryable: false, and nextAction. Do not blindly retry validation errors or overwrite the expected head of a queued command. A failed notification does not undo a saved decision; use workspace notification controls instead of repeating the decision.

Routes and permissions

Scroll the table horizontally to see all columns →

Method and pathPurposeRequired grant
GET /meCredential, authorizer, expiry, scopeActive credential
GET /projects/{id}Current state and human workspace URLSelected project
GET /projects/{id}/recordRead the existing signed historical record plus declared compatibility assertionsSelected project
POST /projects/{id}/statusRead a fresh nonce-bound current statusSelected project
POST /projects/{id}/exports/standard-recordExport the same signed record in a stable JSON interchange envelopeSelected project
POST /projects/{id}/exports/result-packageExport a verification package with fresh signed statusSelected project
POST /draftsPrepare a complete unsent buyer or supplier draftCREATE_DRAFT
POST /projectsCreate a buyer-side agreement for a buyer–supplier projectCREATE_PROJECT
POST /projects/{id}/respondRespond to agreement termsRESPOND_TERMS
POST /projects/{id}/submitSubmit materials or replacementsSUBMIT_MATERIALS
POST /projects/{id}/reviewRequest corrections/evidence or rejectREVIEW_DELIVERY
POST /projects/{id}/review
input.action=ACCEPT
Explicitly confirm completionCONFIRM_COMPLETION
POST /projects/{id}/issue-recordIssue an accepted record using existing coverageISSUE_RESULT_RECORD
POST /projects/{id}/date-revisionRequest revised datesREQUEST_DATE_CHANGE
POST /projects/{id}/concernRaise a post-confirmation concernRAISE_CONCERN
POST /projects/{id}/handoffPause agent writes for a humanSelected project + a write grant

Business commands retain their checks

Review is not acceptance. Review may request changes, request evidence or reject a delivery. Acceptance is a separate, explicit action bound to the exact submission and checked materials.

Creating an agreement commits a buyer–supplier agreement, not a private draft. The API can create a buyer-side project when the credential has CREATE_PROJECT; supplier-led drafts and invitations remain in the human workspace. Current documents are at the legal configuration endpoint; the agreement requires reviewed terms, legal context, and its exact confirmation digest. Never manufacture consent. Use the returned human URL to invite the supplier.

Submitting identifies the exact agreement, prior submission or review when applicable, and one material set per criterion. Include original-file references, names, byte sizes, and SHA-256 fingerprints; a fingerprint alone does not establish access or correctness.

Accepting requires every criterion to be met, the exact submission and checked original files, and the applicable acceptance confirmation. A general review permission is insufficient.

Start with the first-agreement example and read access before enabling decisions. Full public workflow guide · Contact support

Capabilities and limits
  • Project polling and authorized event webhooks are supported. This version does not provide a workflow scheduler or an MCP endpoint.
  • Supplier-led drafts, invitations, replacement agreement terms, receipt sharing, and final concern resolution remain in the human workspace.
  • Handoff notes appear in the project. When project emails are enabled and the current recipient is eligible, Prooftask can send a reminder. Email delivery does not complete the handoff.
  • An agent cannot issue credentials, manage users, elevate authority, or resume itself.

Evaluating a production API integration as a deliverable? That is a separate acceptance workflow with agreed technical evidence. Review its preparation requirements.

Record export and verification

Export for independent verification

A read-only agent can download the same verification package as the human workspace. Read the project first; the client binds the export to its agreement and event history, then saves a new file without overwriting.

Save a portable verification package
node agent-client.mjs export delivery_YOUR_UUID result.json

Load the saved file in the receipt verifier. Confirm issuer keys through an independently trusted channel; saving a package does not verify work quality, company authority or payment.

Verify a receipt · Portable results and verification

Download verification package from an authorized receipt. The same browser checker supports Result Packages v1/v2, native buyer records, standard JWS and API proof packages.

Selected Result Passports, Commerce Records and Transaction Closure v2 use the same checker.

Legacy Transaction Closure v1 is also supported, with its original signature and reference checks; internal signatures, policy and current status remain separately unverified.

Portable results and economic records: API and trust limits

Verify a receipt · Download unified offline verifier

node verify-result.mjs result.json trusted-keys.json CURRENT_UTC_TIME
# Optional: --status=current-status.json --authority=approved-authority-policy.json

Replace CURRENT_UTC_TIME with your actual observation time in UTC. Historical checks do not refresh current status.

Authorized export API

Use a workspace credential authorized for the exact project. An ID or lineage reference grants no access.

  • GET /api/acceptance/tasks/{id}/result/package
  • GET /api/acceptance/provider-tasks/{id}/result/package
  • GET /api/transactions/{id}/result/package

Result Package v2 schema · Recorded authority chain schema

Record formats and company authority

Use the record outside Prooftask.

Trust should not depend on keeping a record inside one product. Export buyer-reviewed delivery records as standard JWS with public JWK keys, then use external JOSE tools or the local verifier to check the outer signature.

The export keeps the agreed version, material references, JEP events and TSTO references together. External compatibility makes the record portable; it does not make the recipient accept the business decision, evidence, authority or current status without their own checks.

Standard export

JWS, JWK and deterministic JSON let compatible tools inspect the signed record.

External verification

Offline and command-line verifiers can check local files without uploading them or relying on a live Prooftask page.

Agent and workflow access

The Agent API and n8n templates let an authorized system work from the same agreement state while the decision-makers keep control.

Clear limits

Format compatibility is not certification, legal recognition, quality verification, payment or third-party approval.

See supported formats and verification steps →

How to establish company authority

  1. Verify the package using issuer keys confirmed through a trusted channel.
  2. Download the mandate review request from the verification report. Check the organization, person, scope, dates and grant fingerprint with an independently known organization representative.
  3. Have your organization approve a separate authority policy. Record the evidence in your own review process. Never approve a mandate only because the sender supplied it.
  4. Load the approved policy under Advanced, or use the offline verifier’s authority option. Missing mandates remain unknown. Review later revocations before a new decision.

A buyer’s designation of a supplier contact is not an independent mandate from the supplier’s company. Historical authority and current authority remain separate.

Authority policy format
{
  "schema": "prooftask.authority-policy/v1",
  "authorityAnchors": [{
    "grantDigest": "independently-reviewed-grant-sha256",
    "organizationId": "exact-recorded-organization",
    "subjectId": "exact-recorded-person",
    "validFrom": "2026-09-01T00:00:00.000Z",
    "validUntil": "2026-10-01T00:00:00.000Z",
    "revokedAt": null
  }],
  "authorityRevocations": []
}

This example is not a trusted policy. Replace every example value only after independent review; it does not certify company authority or establish current revocation status.

Published operator and document configuration

Technical configuration shows the declared operator and document versions. It is not independent registry verification or acceptance of your project.

View the published configuration