Import a receipt
curl --request POST \
--url https://useorgx.com/api/v1/agent-work-receipts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"receipt": {
"schema_version": "agent-work-receipt/v0.1",
"receipt_id": "awr:example:launch-review-001",
"intent": {
"summary": "Add a portable receipt validator and prove it with focused tests.",
"objective": "Produce an account-free contract that another runtime can validate without OrgX identifiers.",
"acceptance_criteria": [
"The JSON Schema accepts opaque external identifiers.",
"The focused conformance tests pass."
],
"constraints": [
"Do not change application routes."
],
"request_ref": {
"system": "example-app",
"type": "task",
"id": "launch-review-001"
}
},
"actor": {
"type": "agent",
"id": "launch-review-agent",
"display_name": "Launch Review Agent",
"runtime": {
"name": "example-runtime",
"version": "1.0.0"
},
"model": {
"provider": "example",
"name": "workflow-model"
}
},
"authority": {
"mode": "delegated",
"status": "restricted",
"scope": {
"actions": [
"read_source",
"edit_package",
"run_tests"
],
"resources": [
{
"system": "git",
"type": "repository",
"id": "launch-planning"
}
],
"systems": [
"filesystem",
"git"
],
"spend_limit": {
"currency": "USD",
"amount": 1
}
},
"delegated_by": {
"type": "human",
"id": "launch-owner"
},
"authorization_ref": {
"system": "example-app",
"type": "task_message",
"id": "launch-review-message-001"
},
"constraints": [
"Write only inside packages/agent-work-receipt."
],
"valid_from": "2026-07-19T15:00:00.000Z",
"valid_until": "2026-07-19T16:00:00.000Z"
},
"actions": [
{
"id": "inspect-receipt",
"type": "source.inspect",
"summary": "Reviewed the receipt fields required by the integration.",
"status": "completed",
"system": "filesystem",
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:02:00.000Z"
},
{
"id": "run-conformance",
"type": "test.run",
"summary": "Ran the Agent Work Receipt conformance suite.",
"status": "completed",
"system": "vitest",
"tool_ref": {
"system": "vitest",
"type": "command",
"id": "receipt-conformance"
},
"output_refs": [
{
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
}
],
"started_at": "2026-07-19T15:08:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z"
}
],
"artifacts": [
{
"id": "artifact-schema",
"kind": "json_schema",
"name": "Agent Work Receipt v0.1 schema",
"role": "output",
"ref": {
"system": "git",
"type": "file",
"id": "packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json",
"uri": "file:packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json"
},
"media_type": "application/schema+json",
"digest": {
"algorithm": "sha256",
"value": "1111111111111111111111111111111111111111111111111111111111111111",
"encoding": "hex"
},
"created_at": "2026-07-19T15:07:00.000Z"
}
],
"evidence": [
{
"id": "evidence-tests",
"kind": "test_result",
"summary": "Focused conformance tests passed.",
"ref": {
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
},
"observed_at": "2026-07-19T15:08:05.000Z",
"excerpt": "Tests: passed",
"supports": [
"verification",
"outcome"
]
}
],
"outcome": {
"status": "succeeded",
"summary": "The portable schema, types, validator, and fixtures were produced.",
"observed_effects": [
"An external runtime can emit a receipt without an OrgX account."
],
"metrics": [
{
"name": "focused_tests_passed",
"value": 1,
"unit": "boolean",
"target": 1,
"observed_at": "2026-07-19T15:08:05.000Z",
"evidence_ids": [
"evidence-tests"
]
}
]
},
"verification": {
"status": "passed",
"method": "Deterministic JSON Schema and semantic conformance suite.",
"verifier": {
"type": "service",
"id": "vitest-local"
},
"checks": [
{
"id": "check-conformance",
"name": "Agent Work Receipt conformance",
"status": "passed",
"method": "vitest run",
"evidence_ids": [
"evidence-tests"
]
}
],
"evidence_ids": [
"evidence-tests"
],
"verified_at": "2026-07-19T15:08:05.000Z"
},
"cost": {
"currency": "USD",
"total": 0.08,
"components": [
{
"category": "model",
"amount": 0.08
}
],
"usage": [
{
"name": "agent_runtime",
"quantity": 8,
"unit": "minutes",
"cost": 0.08
}
],
"human_minutes": 0,
"estimated": true
},
"lineage": {
"run_ref": {
"system": "example-app",
"type": "run",
"id": "run-2026-07-19-001"
},
"parent_receipt_refs": [],
"references": [
{
"relationship": "produced_in",
"ref": {
"system": "git",
"type": "branch",
"id": "example-app/launch-review-001"
}
}
],
"trace_id": "launch-review-trace-001"
},
"human_interventions": [],
"timestamps": {
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z",
"issued_at": "2026-07-19T15:08:06.000Z",
"duration_ms": 485000
}
}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
receipt: {
schema_version: 'agent-work-receipt/v0.1',
receipt_id: 'awr:example:launch-review-001',
intent: {
summary: 'Add a portable receipt validator and prove it with focused tests.',
objective: 'Produce an account-free contract that another runtime can validate without OrgX identifiers.',
acceptance_criteria: [
'The JSON Schema accepts opaque external identifiers.',
'The focused conformance tests pass.'
],
constraints: ['Do not change application routes.'],
request_ref: {system: 'example-app', type: 'task', id: 'launch-review-001'}
},
actor: {
type: 'agent',
id: 'launch-review-agent',
display_name: 'Launch Review Agent',
runtime: {name: 'example-runtime', version: '1.0.0'},
model: {provider: 'example', name: 'workflow-model'}
},
authority: {
mode: 'delegated',
status: 'restricted',
scope: {
actions: ['read_source', 'edit_package', 'run_tests'],
resources: [{system: 'git', type: 'repository', id: 'launch-planning'}],
systems: ['filesystem', 'git'],
spend_limit: {currency: 'USD', amount: 1}
},
delegated_by: {type: 'human', id: 'launch-owner'},
authorization_ref: {system: 'example-app', type: 'task_message', id: 'launch-review-message-001'},
constraints: ['Write only inside packages/agent-work-receipt.'],
valid_from: '2026-07-19T15:00:00.000Z',
valid_until: '2026-07-19T16:00:00.000Z'
},
actions: [
{
id: 'inspect-receipt',
type: 'source.inspect',
summary: 'Reviewed the receipt fields required by the integration.',
status: 'completed',
system: 'filesystem',
started_at: '2026-07-19T15:00:00.000Z',
completed_at: '2026-07-19T15:02:00.000Z'
},
{
id: 'run-conformance',
type: 'test.run',
summary: 'Ran the Agent Work Receipt conformance suite.',
status: 'completed',
system: 'vitest',
tool_ref: {system: 'vitest', type: 'command', id: 'receipt-conformance'},
output_refs: [
{
system: 'local-filesystem',
type: 'test_output',
id: 'receipt-conformance-output'
}
],
started_at: '2026-07-19T15:08:00.000Z',
completed_at: '2026-07-19T15:08:05.000Z'
}
],
artifacts: [
{
id: 'artifact-schema',
kind: 'json_schema',
name: 'Agent Work Receipt v0.1 schema',
role: 'output',
ref: {
system: 'git',
type: 'file',
id: 'packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json',
uri: 'file:packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json'
},
media_type: 'application/schema+json',
digest: {
algorithm: 'sha256',
value: '1111111111111111111111111111111111111111111111111111111111111111',
encoding: 'hex'
},
created_at: '2026-07-19T15:07:00.000Z'
}
],
evidence: [
{
id: 'evidence-tests',
kind: 'test_result',
summary: 'Focused conformance tests passed.',
ref: {
system: 'local-filesystem',
type: 'test_output',
id: 'receipt-conformance-output'
},
observed_at: '2026-07-19T15:08:05.000Z',
excerpt: 'Tests: passed',
supports: ['verification', 'outcome']
}
],
outcome: {
status: 'succeeded',
summary: 'The portable schema, types, validator, and fixtures were produced.',
observed_effects: ['An external runtime can emit a receipt without an OrgX account.'],
metrics: [
{
name: 'focused_tests_passed',
value: 1,
unit: 'boolean',
target: 1,
observed_at: '2026-07-19T15:08:05.000Z',
evidence_ids: ['evidence-tests']
}
]
},
verification: {
status: 'passed',
method: 'Deterministic JSON Schema and semantic conformance suite.',
verifier: {type: 'service', id: 'vitest-local'},
checks: [
{
id: 'check-conformance',
name: 'Agent Work Receipt conformance',
status: 'passed',
method: 'vitest run',
evidence_ids: ['evidence-tests']
}
],
evidence_ids: ['evidence-tests'],
verified_at: '2026-07-19T15:08:05.000Z'
},
cost: {
currency: 'USD',
total: 0.08,
components: [{category: 'model', amount: 0.08}],
usage: [{name: 'agent_runtime', quantity: 8, unit: 'minutes', cost: 0.08}],
human_minutes: 0,
estimated: true
},
lineage: {
run_ref: {system: 'example-app', type: 'run', id: 'run-2026-07-19-001'},
parent_receipt_refs: [],
references: [
{
relationship: 'produced_in',
ref: {system: 'git', type: 'branch', id: 'example-app/launch-review-001'}
}
],
trace_id: 'launch-review-trace-001'
},
human_interventions: [],
timestamps: {
started_at: '2026-07-19T15:00:00.000Z',
completed_at: '2026-07-19T15:08:05.000Z',
issued_at: '2026-07-19T15:08:06.000Z',
duration_ms: 485000
}
}
})
};
fetch('https://useorgx.com/api/v1/agent-work-receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://useorgx.com/api/v1/agent-work-receipts"
payload = { "receipt": {
"schema_version": "agent-work-receipt/v0.1",
"receipt_id": "awr:example:launch-review-001",
"intent": {
"summary": "Add a portable receipt validator and prove it with focused tests.",
"objective": "Produce an account-free contract that another runtime can validate without OrgX identifiers.",
"acceptance_criteria": ["The JSON Schema accepts opaque external identifiers.", "The focused conformance tests pass."],
"constraints": ["Do not change application routes."],
"request_ref": {
"system": "example-app",
"type": "task",
"id": "launch-review-001"
}
},
"actor": {
"type": "agent",
"id": "launch-review-agent",
"display_name": "Launch Review Agent",
"runtime": {
"name": "example-runtime",
"version": "1.0.0"
},
"model": {
"provider": "example",
"name": "workflow-model"
}
},
"authority": {
"mode": "delegated",
"status": "restricted",
"scope": {
"actions": ["read_source", "edit_package", "run_tests"],
"resources": [
{
"system": "git",
"type": "repository",
"id": "launch-planning"
}
],
"systems": ["filesystem", "git"],
"spend_limit": {
"currency": "USD",
"amount": 1
}
},
"delegated_by": {
"type": "human",
"id": "launch-owner"
},
"authorization_ref": {
"system": "example-app",
"type": "task_message",
"id": "launch-review-message-001"
},
"constraints": ["Write only inside packages/agent-work-receipt."],
"valid_from": "2026-07-19T15:00:00.000Z",
"valid_until": "2026-07-19T16:00:00.000Z"
},
"actions": [
{
"id": "inspect-receipt",
"type": "source.inspect",
"summary": "Reviewed the receipt fields required by the integration.",
"status": "completed",
"system": "filesystem",
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:02:00.000Z"
},
{
"id": "run-conformance",
"type": "test.run",
"summary": "Ran the Agent Work Receipt conformance suite.",
"status": "completed",
"system": "vitest",
"tool_ref": {
"system": "vitest",
"type": "command",
"id": "receipt-conformance"
},
"output_refs": [
{
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
}
],
"started_at": "2026-07-19T15:08:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z"
}
],
"artifacts": [
{
"id": "artifact-schema",
"kind": "json_schema",
"name": "Agent Work Receipt v0.1 schema",
"role": "output",
"ref": {
"system": "git",
"type": "file",
"id": "packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json",
"uri": "file:packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json"
},
"media_type": "application/schema+json",
"digest": {
"algorithm": "sha256",
"value": "1111111111111111111111111111111111111111111111111111111111111111",
"encoding": "hex"
},
"created_at": "2026-07-19T15:07:00.000Z"
}
],
"evidence": [
{
"id": "evidence-tests",
"kind": "test_result",
"summary": "Focused conformance tests passed.",
"ref": {
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
},
"observed_at": "2026-07-19T15:08:05.000Z",
"excerpt": "Tests: passed",
"supports": ["verification", "outcome"]
}
],
"outcome": {
"status": "succeeded",
"summary": "The portable schema, types, validator, and fixtures were produced.",
"observed_effects": ["An external runtime can emit a receipt without an OrgX account."],
"metrics": [
{
"name": "focused_tests_passed",
"value": 1,
"unit": "boolean",
"target": 1,
"observed_at": "2026-07-19T15:08:05.000Z",
"evidence_ids": ["evidence-tests"]
}
]
},
"verification": {
"status": "passed",
"method": "Deterministic JSON Schema and semantic conformance suite.",
"verifier": {
"type": "service",
"id": "vitest-local"
},
"checks": [
{
"id": "check-conformance",
"name": "Agent Work Receipt conformance",
"status": "passed",
"method": "vitest run",
"evidence_ids": ["evidence-tests"]
}
],
"evidence_ids": ["evidence-tests"],
"verified_at": "2026-07-19T15:08:05.000Z"
},
"cost": {
"currency": "USD",
"total": 0.08,
"components": [
{
"category": "model",
"amount": 0.08
}
],
"usage": [
{
"name": "agent_runtime",
"quantity": 8,
"unit": "minutes",
"cost": 0.08
}
],
"human_minutes": 0,
"estimated": True
},
"lineage": {
"run_ref": {
"system": "example-app",
"type": "run",
"id": "run-2026-07-19-001"
},
"parent_receipt_refs": [],
"references": [
{
"relationship": "produced_in",
"ref": {
"system": "git",
"type": "branch",
"id": "example-app/launch-review-001"
}
}
],
"trace_id": "launch-review-trace-001"
},
"human_interventions": [],
"timestamps": {
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z",
"issued_at": "2026-07-19T15:08:06.000Z",
"duration_ms": 485000
}
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"receipt_id": "13aef4be-6435-448e-8ac3-2c9e2724fafd",
"external_receipt_id": "awr:example:launch-review-001",
"schema_version": "agent-work-receipt/v0.1",
"idempotent": true
}{
"ok": true,
"receipt_id": "13aef4be-6435-448e-8ac3-2c9e2724fafd",
"external_receipt_id": "awr:example:launch-review-001",
"schema_version": "agent-work-receipt/v0.1",
"idempotent": true
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}Receipt import
Import a receipt
Validate and store a portable Agent Work Receipt in the selected workspace.
POST
/
agent-work-receipts
Import a receipt
curl --request POST \
--url https://useorgx.com/api/v1/agent-work-receipts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"receipt": {
"schema_version": "agent-work-receipt/v0.1",
"receipt_id": "awr:example:launch-review-001",
"intent": {
"summary": "Add a portable receipt validator and prove it with focused tests.",
"objective": "Produce an account-free contract that another runtime can validate without OrgX identifiers.",
"acceptance_criteria": [
"The JSON Schema accepts opaque external identifiers.",
"The focused conformance tests pass."
],
"constraints": [
"Do not change application routes."
],
"request_ref": {
"system": "example-app",
"type": "task",
"id": "launch-review-001"
}
},
"actor": {
"type": "agent",
"id": "launch-review-agent",
"display_name": "Launch Review Agent",
"runtime": {
"name": "example-runtime",
"version": "1.0.0"
},
"model": {
"provider": "example",
"name": "workflow-model"
}
},
"authority": {
"mode": "delegated",
"status": "restricted",
"scope": {
"actions": [
"read_source",
"edit_package",
"run_tests"
],
"resources": [
{
"system": "git",
"type": "repository",
"id": "launch-planning"
}
],
"systems": [
"filesystem",
"git"
],
"spend_limit": {
"currency": "USD",
"amount": 1
}
},
"delegated_by": {
"type": "human",
"id": "launch-owner"
},
"authorization_ref": {
"system": "example-app",
"type": "task_message",
"id": "launch-review-message-001"
},
"constraints": [
"Write only inside packages/agent-work-receipt."
],
"valid_from": "2026-07-19T15:00:00.000Z",
"valid_until": "2026-07-19T16:00:00.000Z"
},
"actions": [
{
"id": "inspect-receipt",
"type": "source.inspect",
"summary": "Reviewed the receipt fields required by the integration.",
"status": "completed",
"system": "filesystem",
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:02:00.000Z"
},
{
"id": "run-conformance",
"type": "test.run",
"summary": "Ran the Agent Work Receipt conformance suite.",
"status": "completed",
"system": "vitest",
"tool_ref": {
"system": "vitest",
"type": "command",
"id": "receipt-conformance"
},
"output_refs": [
{
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
}
],
"started_at": "2026-07-19T15:08:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z"
}
],
"artifacts": [
{
"id": "artifact-schema",
"kind": "json_schema",
"name": "Agent Work Receipt v0.1 schema",
"role": "output",
"ref": {
"system": "git",
"type": "file",
"id": "packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json",
"uri": "file:packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json"
},
"media_type": "application/schema+json",
"digest": {
"algorithm": "sha256",
"value": "1111111111111111111111111111111111111111111111111111111111111111",
"encoding": "hex"
},
"created_at": "2026-07-19T15:07:00.000Z"
}
],
"evidence": [
{
"id": "evidence-tests",
"kind": "test_result",
"summary": "Focused conformance tests passed.",
"ref": {
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
},
"observed_at": "2026-07-19T15:08:05.000Z",
"excerpt": "Tests: passed",
"supports": [
"verification",
"outcome"
]
}
],
"outcome": {
"status": "succeeded",
"summary": "The portable schema, types, validator, and fixtures were produced.",
"observed_effects": [
"An external runtime can emit a receipt without an OrgX account."
],
"metrics": [
{
"name": "focused_tests_passed",
"value": 1,
"unit": "boolean",
"target": 1,
"observed_at": "2026-07-19T15:08:05.000Z",
"evidence_ids": [
"evidence-tests"
]
}
]
},
"verification": {
"status": "passed",
"method": "Deterministic JSON Schema and semantic conformance suite.",
"verifier": {
"type": "service",
"id": "vitest-local"
},
"checks": [
{
"id": "check-conformance",
"name": "Agent Work Receipt conformance",
"status": "passed",
"method": "vitest run",
"evidence_ids": [
"evidence-tests"
]
}
],
"evidence_ids": [
"evidence-tests"
],
"verified_at": "2026-07-19T15:08:05.000Z"
},
"cost": {
"currency": "USD",
"total": 0.08,
"components": [
{
"category": "model",
"amount": 0.08
}
],
"usage": [
{
"name": "agent_runtime",
"quantity": 8,
"unit": "minutes",
"cost": 0.08
}
],
"human_minutes": 0,
"estimated": true
},
"lineage": {
"run_ref": {
"system": "example-app",
"type": "run",
"id": "run-2026-07-19-001"
},
"parent_receipt_refs": [],
"references": [
{
"relationship": "produced_in",
"ref": {
"system": "git",
"type": "branch",
"id": "example-app/launch-review-001"
}
}
],
"trace_id": "launch-review-trace-001"
},
"human_interventions": [],
"timestamps": {
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z",
"issued_at": "2026-07-19T15:08:06.000Z",
"duration_ms": 485000
}
}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
receipt: {
schema_version: 'agent-work-receipt/v0.1',
receipt_id: 'awr:example:launch-review-001',
intent: {
summary: 'Add a portable receipt validator and prove it with focused tests.',
objective: 'Produce an account-free contract that another runtime can validate without OrgX identifiers.',
acceptance_criteria: [
'The JSON Schema accepts opaque external identifiers.',
'The focused conformance tests pass.'
],
constraints: ['Do not change application routes.'],
request_ref: {system: 'example-app', type: 'task', id: 'launch-review-001'}
},
actor: {
type: 'agent',
id: 'launch-review-agent',
display_name: 'Launch Review Agent',
runtime: {name: 'example-runtime', version: '1.0.0'},
model: {provider: 'example', name: 'workflow-model'}
},
authority: {
mode: 'delegated',
status: 'restricted',
scope: {
actions: ['read_source', 'edit_package', 'run_tests'],
resources: [{system: 'git', type: 'repository', id: 'launch-planning'}],
systems: ['filesystem', 'git'],
spend_limit: {currency: 'USD', amount: 1}
},
delegated_by: {type: 'human', id: 'launch-owner'},
authorization_ref: {system: 'example-app', type: 'task_message', id: 'launch-review-message-001'},
constraints: ['Write only inside packages/agent-work-receipt.'],
valid_from: '2026-07-19T15:00:00.000Z',
valid_until: '2026-07-19T16:00:00.000Z'
},
actions: [
{
id: 'inspect-receipt',
type: 'source.inspect',
summary: 'Reviewed the receipt fields required by the integration.',
status: 'completed',
system: 'filesystem',
started_at: '2026-07-19T15:00:00.000Z',
completed_at: '2026-07-19T15:02:00.000Z'
},
{
id: 'run-conformance',
type: 'test.run',
summary: 'Ran the Agent Work Receipt conformance suite.',
status: 'completed',
system: 'vitest',
tool_ref: {system: 'vitest', type: 'command', id: 'receipt-conformance'},
output_refs: [
{
system: 'local-filesystem',
type: 'test_output',
id: 'receipt-conformance-output'
}
],
started_at: '2026-07-19T15:08:00.000Z',
completed_at: '2026-07-19T15:08:05.000Z'
}
],
artifacts: [
{
id: 'artifact-schema',
kind: 'json_schema',
name: 'Agent Work Receipt v0.1 schema',
role: 'output',
ref: {
system: 'git',
type: 'file',
id: 'packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json',
uri: 'file:packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json'
},
media_type: 'application/schema+json',
digest: {
algorithm: 'sha256',
value: '1111111111111111111111111111111111111111111111111111111111111111',
encoding: 'hex'
},
created_at: '2026-07-19T15:07:00.000Z'
}
],
evidence: [
{
id: 'evidence-tests',
kind: 'test_result',
summary: 'Focused conformance tests passed.',
ref: {
system: 'local-filesystem',
type: 'test_output',
id: 'receipt-conformance-output'
},
observed_at: '2026-07-19T15:08:05.000Z',
excerpt: 'Tests: passed',
supports: ['verification', 'outcome']
}
],
outcome: {
status: 'succeeded',
summary: 'The portable schema, types, validator, and fixtures were produced.',
observed_effects: ['An external runtime can emit a receipt without an OrgX account.'],
metrics: [
{
name: 'focused_tests_passed',
value: 1,
unit: 'boolean',
target: 1,
observed_at: '2026-07-19T15:08:05.000Z',
evidence_ids: ['evidence-tests']
}
]
},
verification: {
status: 'passed',
method: 'Deterministic JSON Schema and semantic conformance suite.',
verifier: {type: 'service', id: 'vitest-local'},
checks: [
{
id: 'check-conformance',
name: 'Agent Work Receipt conformance',
status: 'passed',
method: 'vitest run',
evidence_ids: ['evidence-tests']
}
],
evidence_ids: ['evidence-tests'],
verified_at: '2026-07-19T15:08:05.000Z'
},
cost: {
currency: 'USD',
total: 0.08,
components: [{category: 'model', amount: 0.08}],
usage: [{name: 'agent_runtime', quantity: 8, unit: 'minutes', cost: 0.08}],
human_minutes: 0,
estimated: true
},
lineage: {
run_ref: {system: 'example-app', type: 'run', id: 'run-2026-07-19-001'},
parent_receipt_refs: [],
references: [
{
relationship: 'produced_in',
ref: {system: 'git', type: 'branch', id: 'example-app/launch-review-001'}
}
],
trace_id: 'launch-review-trace-001'
},
human_interventions: [],
timestamps: {
started_at: '2026-07-19T15:00:00.000Z',
completed_at: '2026-07-19T15:08:05.000Z',
issued_at: '2026-07-19T15:08:06.000Z',
duration_ms: 485000
}
}
})
};
fetch('https://useorgx.com/api/v1/agent-work-receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://useorgx.com/api/v1/agent-work-receipts"
payload = { "receipt": {
"schema_version": "agent-work-receipt/v0.1",
"receipt_id": "awr:example:launch-review-001",
"intent": {
"summary": "Add a portable receipt validator and prove it with focused tests.",
"objective": "Produce an account-free contract that another runtime can validate without OrgX identifiers.",
"acceptance_criteria": ["The JSON Schema accepts opaque external identifiers.", "The focused conformance tests pass."],
"constraints": ["Do not change application routes."],
"request_ref": {
"system": "example-app",
"type": "task",
"id": "launch-review-001"
}
},
"actor": {
"type": "agent",
"id": "launch-review-agent",
"display_name": "Launch Review Agent",
"runtime": {
"name": "example-runtime",
"version": "1.0.0"
},
"model": {
"provider": "example",
"name": "workflow-model"
}
},
"authority": {
"mode": "delegated",
"status": "restricted",
"scope": {
"actions": ["read_source", "edit_package", "run_tests"],
"resources": [
{
"system": "git",
"type": "repository",
"id": "launch-planning"
}
],
"systems": ["filesystem", "git"],
"spend_limit": {
"currency": "USD",
"amount": 1
}
},
"delegated_by": {
"type": "human",
"id": "launch-owner"
},
"authorization_ref": {
"system": "example-app",
"type": "task_message",
"id": "launch-review-message-001"
},
"constraints": ["Write only inside packages/agent-work-receipt."],
"valid_from": "2026-07-19T15:00:00.000Z",
"valid_until": "2026-07-19T16:00:00.000Z"
},
"actions": [
{
"id": "inspect-receipt",
"type": "source.inspect",
"summary": "Reviewed the receipt fields required by the integration.",
"status": "completed",
"system": "filesystem",
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:02:00.000Z"
},
{
"id": "run-conformance",
"type": "test.run",
"summary": "Ran the Agent Work Receipt conformance suite.",
"status": "completed",
"system": "vitest",
"tool_ref": {
"system": "vitest",
"type": "command",
"id": "receipt-conformance"
},
"output_refs": [
{
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
}
],
"started_at": "2026-07-19T15:08:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z"
}
],
"artifacts": [
{
"id": "artifact-schema",
"kind": "json_schema",
"name": "Agent Work Receipt v0.1 schema",
"role": "output",
"ref": {
"system": "git",
"type": "file",
"id": "packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json",
"uri": "file:packages/agent-work-receipt/schema/agent-work-receipt.v0.1.schema.json"
},
"media_type": "application/schema+json",
"digest": {
"algorithm": "sha256",
"value": "1111111111111111111111111111111111111111111111111111111111111111",
"encoding": "hex"
},
"created_at": "2026-07-19T15:07:00.000Z"
}
],
"evidence": [
{
"id": "evidence-tests",
"kind": "test_result",
"summary": "Focused conformance tests passed.",
"ref": {
"system": "local-filesystem",
"type": "test_output",
"id": "receipt-conformance-output"
},
"observed_at": "2026-07-19T15:08:05.000Z",
"excerpt": "Tests: passed",
"supports": ["verification", "outcome"]
}
],
"outcome": {
"status": "succeeded",
"summary": "The portable schema, types, validator, and fixtures were produced.",
"observed_effects": ["An external runtime can emit a receipt without an OrgX account."],
"metrics": [
{
"name": "focused_tests_passed",
"value": 1,
"unit": "boolean",
"target": 1,
"observed_at": "2026-07-19T15:08:05.000Z",
"evidence_ids": ["evidence-tests"]
}
]
},
"verification": {
"status": "passed",
"method": "Deterministic JSON Schema and semantic conformance suite.",
"verifier": {
"type": "service",
"id": "vitest-local"
},
"checks": [
{
"id": "check-conformance",
"name": "Agent Work Receipt conformance",
"status": "passed",
"method": "vitest run",
"evidence_ids": ["evidence-tests"]
}
],
"evidence_ids": ["evidence-tests"],
"verified_at": "2026-07-19T15:08:05.000Z"
},
"cost": {
"currency": "USD",
"total": 0.08,
"components": [
{
"category": "model",
"amount": 0.08
}
],
"usage": [
{
"name": "agent_runtime",
"quantity": 8,
"unit": "minutes",
"cost": 0.08
}
],
"human_minutes": 0,
"estimated": True
},
"lineage": {
"run_ref": {
"system": "example-app",
"type": "run",
"id": "run-2026-07-19-001"
},
"parent_receipt_refs": [],
"references": [
{
"relationship": "produced_in",
"ref": {
"system": "git",
"type": "branch",
"id": "example-app/launch-review-001"
}
}
],
"trace_id": "launch-review-trace-001"
},
"human_interventions": [],
"timestamps": {
"started_at": "2026-07-19T15:00:00.000Z",
"completed_at": "2026-07-19T15:08:05.000Z",
"issued_at": "2026-07-19T15:08:06.000Z",
"duration_ms": 485000
}
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"receipt_id": "13aef4be-6435-448e-8ac3-2c9e2724fafd",
"external_receipt_id": "awr:example:launch-review-001",
"schema_version": "agent-work-receipt/v0.1",
"idempotent": true
}{
"ok": true,
"receipt_id": "13aef4be-6435-448e-8ac3-2c9e2724fafd",
"external_receipt_id": "awr:example:launch-review-001",
"schema_version": "agent-work-receipt/v0.1",
"idempotent": true
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}{
"ok": false,
"error": "<string>"
}Authorizations
bearerAuthcookieAuth
OrgX API key, sent as Authorization: Bearer oxk_...
Headers
Workspace-scoped retry key for safe mutation replay.
Required string length:
1 - 200Pattern:
^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$Body
application/json
A portable, account-free record of agent intent, authority, actions, evidence, outcome, verification, cost, lineage, and human intervention. Identifiers are opaque external strings and never require an OrgX account or UUID.
Show child attributes
Show child attributes
Existing OrgX workspace the authenticated caller can access
Compatibility field. New integrations send the Idempotency-Key header.
Required string length:
1 - 160Pattern:
^[A-Za-z0-9][A-Za-z0-9._:/-]{0,159}$Response
Idempotent retry returned the existing hosted receipt
OrgX-hosted receipt identifier
Producer-owned portable receipt identifier
Allowed value:
"agent-work-receipt/v0.1"Show child attributes
Show child attributes
