{"openapi":"3.1.0","info":{"title":"AgentBox REST API","version":"0.1.4","summary":"Identity-bound shared workspace boxes for autonomous agents.","description":"AgentBox exposes private workspace boxes, items, events, artifacts, scoped grants, known-agent metadata, audit records, A2A discovery, and health checks. Native Pilot identity is handled by a Pilot-aware runtime or the AgentBox Pilot adapter before requests reach this REST API; application clients should not handcraft Pilot bridge headers."},"servers":[{"url":"https://agentbox.niuniu.dev"}],"tags":[{"name":"Discovery"},{"name":"Agents"},{"name":"Boxes"},{"name":"Items"},{"name":"Events"},{"name":"Artifacts"},{"name":"Grants"},{"name":"Audit"},{"name":"Admin"}],"paths":{"/health":{"get":{"tags":["Discovery"],"summary":"Check API health","security":[],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/HealthStatus"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}}}}},"/openapi.json":{"get":{"tags":["Discovery"],"summary":"Fetch this OpenAPI document","security":[],"responses":{"200":{"description":"OpenAPI 3.1 document"}}}},"/api-docs":{"get":{"tags":["Discovery"],"summary":"Open human-readable API documentation","security":[],"responses":{"200":{"description":"HTML API documentation"}}}},"/.well-known/agent-card.json":{"get":{"tags":["Discovery"],"summary":"Fetch the public A2A Agent Card","security":[],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/a2a/.well-known/agent-card.json":{"get":{"tags":["Discovery"],"summary":"Fetch the A2A-scoped Agent Card","security":[],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/a2a":{"post":{"tags":["Discovery"],"summary":"Send an A2A JSON-RPC message","description":"Supports A2A interface discovery and AgentBox structured operations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/agents/register":{"post":{"tags":["Agents"],"summary":"Register or update metadata for the authenticated agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAgentInput"}}}},"responses":{"201":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/KnownAgentRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/agents/me":{"get":{"tags":["Agents"],"summary":"Get the authenticated agent profile","responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"oneOf":[{"$ref":"#/components/schemas/KnownAgentRecord"},{"type":"null"}]},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/agents":{"get":{"tags":["Agents"],"summary":"List known agents","description":"Admin callers can inspect AgentBox-local known-agent metadata.","responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/KnownAgentRecord"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/agents/{identity_key}/status":{"patch":{"tags":["Agents"],"summary":"Update an AgentBox-local known-agent status","parameters":[{"name":"identity_key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentStatusInput"}}}},"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/KnownAgentRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/identity-providers":{"get":{"tags":["Admin"],"summary":"List configured identity-provider metadata","description":"Admin-only redacted overview of OIDC providers and advertised security schemes.","responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/IdentityProviderOverview"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Admin"],"summary":"Create or replace a stored OIDC identity provider","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProviderInput"}}}},"responses":{"201":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/IdentityProviderRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/admin/identity-providers/{name}":{"patch":{"tags":["Admin"],"summary":"Update a stored OIDC identity provider","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityProviderPatchInput"}}}},"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/IdentityProviderRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes":{"get":{"tags":["Boxes"],"summary":"List boxes visible to the authenticated caller","responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/BoxRecord"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"tags":["Boxes"],"summary":"Create a private box","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBoxInput"}}}},"responses":{"201":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/CreateBoxResult"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/manifest":{"get":{"tags":["Boxes"],"summary":"Read a box manifest","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/AgentBoxManifest"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/items":{"get":{"tags":["Items"],"summary":"List items in a box","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string"}},{"name":"content_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"tags","in":"query","required":false,"description":"Comma-separated tag filter.","schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/BoxItemSummary"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/items/{key}":{"put":{"tags":["Items"],"summary":"Create or update an item","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"description":"Slash-delimited item key.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutItemInputBody"}}}},"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/BoxItemRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Items"],"summary":"Read an item","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"description":"Slash-delimited item key.","schema":{"type":"string"}},{"name":"version","in":"query","schema":{"oneOf":[{"type":"integer","minimum":1},{"const":"latest"}]}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/BoxItemRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/events/{stream}":{"post":{"tags":["Events"],"summary":"Append an event to a stream","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stream","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendEventInputBody"}}}},"responses":{"201":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/BoxEventRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Events"],"summary":"List events from a stream","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"stream","in":"path","required":true,"schema":{"type":"string"}},{"name":"after_seq","in":"query","required":false,"description":"Return events after this sequence number.","schema":{"type":"integer","minimum":0}},{"name":"limit","in":"query","required":false,"description":"Maximum number of events.","schema":{"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/BoxEventRecord"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/artifacts":{"post":{"tags":["Artifacts"],"summary":"Attach an artifact","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachArtifactInputBody"}}}},"responses":{"201":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/ArtifactSummary"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Artifacts"],"summary":"List artifacts","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactSummary"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/artifacts/{artifact_id}":{"get":{"tags":["Artifacts"],"summary":"Read artifact metadata and content","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/ArtifactContent"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/grants":{"post":{"tags":["Grants"],"summary":"Create a scoped grant","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrantInputBody"}}}},"responses":{"201":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/CreateGrantResult"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"tags":["Grants"],"summary":"List grants on a box","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicGrantRecord"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/grants/{grant_id}/revoke":{"post":{"tags":["Grants"],"summary":"Revoke a grant","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"$ref":"#/components/schemas/PublicGrantRecord"},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/boxes/{box_id}/audit":{"get":{"tags":["Audit"],"summary":"List audit records for a box","parameters":[{"name":"box_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON response","content":{"application/json":{"schema":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditRecord"}},"error":{"type":"null"},"audit_id":{"type":["string","null"]}}}}}},"default":{"description":"AgentBox error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OIDC identity token, local/admin token, or legacy grant token depending on x-agentbox-auth-scheme."},"authScheme":{"type":"apiKey","in":"header","name":"x-agentbox-auth-scheme","description":"Named auth scheme such as google, agentboxAdmin, or agentboxGrant."},"actorHeader":{"type":"apiKey","in":"header","name":"x-agentbox-actor","description":"Required for local/admin token and legacy grant token compatibility auth."},"grantToken":{"type":"apiKey","in":"header","name":"x-agentbox-grant-token","description":"Optional scoped AgentBox grant token used with an identity proof."},"adminHeader":{"type":"apiKey","in":"header","name":"x-agentbox-admin","description":"Set to true for admin operations when using the configured admin token."}},"schemas":{"HealthStatus":{"type":"object","required":["status"],"properties":{"status":{"const":"ok"}}},"ApiError":{"type":"object","required":["ok","data","error","audit_id"],"properties":{"ok":{"const":false},"data":{"type":"null"},"error":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"target":{"type":"string"},"request_id":{"type":"string"}}},"audit_id":{"type":["string","null"]}}},"AgentIdentity":{"type":"object","required":["scheme","subject"],"properties":{"scheme":{"enum":["pilot","oidc","spiffe","dev"]},"subject":{"type":"string"},"issuer":{"type":"string"},"public_key_fingerprint":{"type":"string"},"display_name":{"type":"string"},"agent_card_url":{"type":"string"}}},"KnownAgentRecord":{"type":"object","required":["identity_key","identity","display_name","agent_card_url","capabilities","status","metadata","first_seen_at","last_seen_at"],"properties":{"identity_key":{"type":"string"},"identity":{"type":"object","required":["scheme","subject"],"properties":{"scheme":{"enum":["pilot","oidc","spiffe","dev"]},"subject":{"type":"string"},"issuer":{"type":"string"},"public_key_fingerprint":{"type":"string"},"display_name":{"type":"string"},"agent_card_url":{"type":"string"}}},"display_name":{"type":["string","null"]},"agent_card_url":{"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"string"}},"status":{"enum":["active","blocked"]},"metadata":{"type":["object","null"]},"first_seen_at":{"type":"string","format":"date-time"},"last_seen_at":{"type":"string","format":"date-time"}}},"RegisterAgentInput":{"type":"object","properties":{"display_name":{"type":"string"},"agent_card_url":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}},"UpdateAgentStatusInput":{"type":"object","required":["status"],"properties":{"status":{"enum":["active","blocked"]}}},"BoxRecord":{"type":"object","required":["box_id","name","status","created_at","updated_at"],"properties":{"box_id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["open","closed","expired","purge_eligible"]},"created_by":{"type":["string","null"]},"owner_identity":{"oneOf":[{"type":"object","required":["scheme","subject"],"properties":{"scheme":{"enum":["pilot","oidc","spiffe","dev"]},"subject":{"type":"string"},"issuer":{"type":"string"},"public_key_fingerprint":{"type":"string"},"display_name":{"type":"string"},"agent_card_url":{"type":"string"}}},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"metadata":{"type":["object","null"]}}},"CreateBoxInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"ttl_seconds":{"type":"integer","minimum":1},"metadata":{"type":"object"}}},"CreateBoxResult":{"type":"object","required":["box","manifest_uri"],"properties":{"box":{"$ref":"#/components/schemas/BoxRecord"},"manifest_uri":{"type":"string"}}},"BoxItemSummary":{"type":"object","required":["box_id","key","version","content_type","tags","created_at","updated_at"],"properties":{"box_id":{"type":"string"},"key":{"type":"string"},"version":{"type":"integer"},"content_type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"created_by":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"BoxItemRecord":{"allOf":[{"type":"object","required":["box_id","key","version","content_type","tags","created_at","updated_at"],"properties":{"box_id":{"type":"string"},"key":{"type":"string"},"version":{"type":"integer"},"content_type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"created_by":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},{"type":"object","required":["value"],"properties":{"value":{"description":"Any JSON value."}}}]},"PutItemInputBody":{"type":"object","required":["value"],"properties":{"value":{"description":"Any JSON value."},"content_type":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"expected_version":{"type":"integer","minimum":0}}},"BoxEventRecord":{"type":"object","required":["event_id","box_id","stream","seq","type","created_at"],"properties":{"event_id":{"type":"string"},"box_id":{"type":"string"},"stream":{"type":"string"},"seq":{"type":"integer"},"type":{"type":"string"},"actor":{"type":["string","null"]},"payload":{"type":["object","null"]},"created_at":{"type":"string","format":"date-time"}}},"AppendEventInputBody":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"payload":{"type":"object"}}},"ArtifactSummary":{"type":"object","required":["artifact_id","box_id","name","content_type","size_bytes","sha256","created_at"],"properties":{"artifact_id":{"type":"string"},"box_id":{"type":"string"},"name":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"sha256":{"type":"string"},"created_by":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"ArtifactContent":{"type":"object","required":["artifact","content_base64"],"properties":{"artifact":{"$ref":"#/components/schemas/ArtifactSummary"},"content_base64":{"type":"string"}}},"AttachArtifactInputBody":{"type":"object","required":["name","content_type","content_base64"],"properties":{"name":{"type":"string"},"content_type":{"type":"string"},"content_base64":{"type":"string"}}},"PublicGrantRecord":{"type":"object","required":["grant_id","box_id","subject","permissions","created_at","expires_at"],"properties":{"grant_id":{"type":"string"},"box_id":{"type":"string"},"subject":{"type":"string"},"subject_identity":{"oneOf":[{"type":"object","required":["scheme","subject"],"properties":{"scheme":{"enum":["pilot","oidc","spiffe","dev"]},"subject":{"type":"string"},"issuer":{"type":"string"},"public_key_fingerprint":{"type":"string"},"display_name":{"type":"string"},"agent_card_url":{"type":"string"}}},{"type":"null"}]},"permissions":{"type":"array","items":{"enum":["read","write","append","attach","share","admin"]}},"key_prefixes":{"type":["array","null"],"items":{"type":"string"}},"event_streams":{"type":["array","null"],"items":{"type":"string"}},"artifact_prefixes":{"type":["array","null"],"items":{"type":"string"}},"created_by":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}}},"CreateGrantInputBody":{"type":"object","required":["subject","permissions","ttl_seconds"],"properties":{"subject":{"type":"string"},"subject_identity":{"type":"object","required":["scheme","subject"],"properties":{"scheme":{"enum":["pilot","oidc","spiffe","dev"]},"subject":{"type":"string"},"issuer":{"type":"string"},"public_key_fingerprint":{"type":"string"},"display_name":{"type":"string"},"agent_card_url":{"type":"string"}}},"permissions":{"type":"array","minItems":1,"items":{"enum":["read","write","append","attach","share","admin"]}},"ttl_seconds":{"type":"integer","minimum":1},"key_prefixes":{"type":"array","items":{"type":"string"}},"event_streams":{"type":"array","items":{"type":"string"}},"artifact_prefixes":{"type":"array","items":{"type":"string"}}}},"CreateGrantResult":{"type":"object","required":["grant","access_token"],"properties":{"grant":{"$ref":"#/components/schemas/PublicGrantRecord"},"access_token":{"type":"string"}}},"AgentBoxManifest":{"type":"object","required":["box_id","name","status","items","streams","artifacts","active_claims","recent_events"],"properties":{"box_id":{"type":"string"},"name":{"type":"string"},"status":{"enum":["open","closed","expired","purge_eligible"]},"created_by":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BoxItemSummary"}},"streams":{"type":"array","items":{"type":"object"}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactSummary"}},"active_claims":{"type":"array","items":{"type":"object"}},"recent_events":{"type":"array","items":{"type":"object"}}}},"AuditRecord":{"type":"object","required":["audit_id","action","created_at"],"properties":{"audit_id":{"type":"string"},"box_id":{"type":["string","null"]},"action":{"type":"string"},"actor":{"type":["string","null"]},"actor_identity":{"oneOf":[{"type":"object","required":["scheme","subject"],"properties":{"scheme":{"enum":["pilot","oidc","spiffe","dev"]},"subject":{"type":"string"},"issuer":{"type":"string"},"public_key_fingerprint":{"type":"string"},"display_name":{"type":"string"},"agent_card_url":{"type":"string"}}},{"type":"null"}]},"target":{"type":["string","null"]},"payload":{"type":["object","null"]},"created_at":{"type":"string","format":"date-time"}}},"IdentityProviderOverview":{"type":"object","required":["providers","advertised_schemes"],"properties":{"providers":{"type":"array","items":{"type":"object"}},"advertised_schemes":{"type":"array","items":{"type":"object"}}}},"IdentityProviderRecord":{"type":"object","required":["name","type","issuer","audience","jwks_url","status","created_at","updated_at"],"properties":{"name":{"type":"string"},"type":{"const":"oidc"},"issuer":{"type":"string"},"audience":{"type":"string"},"jwks_url":{"type":"string"},"subject_claim":{"type":["string","null"]},"display_name_claim":{"type":["string","null"]},"agent_card_url_claim":{"type":["string","null"]},"algorithms":{"type":["array","null"],"items":{"type":"string"}},"clock_tolerance":{"type":["string","number","null"]},"max_token_age":{"type":["string","number","null"]},"status":{"enum":["active","disabled"]},"created_by":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_by":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}}},"IdentityProviderInput":{"type":"object","required":["name","type","issuer","audience","jwks_url"],"properties":{"name":{"type":"string"},"type":{"const":"oidc"},"issuer":{"type":"string"},"audience":{"type":"string"},"jwks_url":{"type":"string"},"subject_claim":{"type":["string","null"]},"display_name_claim":{"type":["string","null"]},"agent_card_url_claim":{"type":["string","null"]},"algorithms":{"type":["array","null"],"items":{"type":"string"}},"clock_tolerance":{"type":["string","number","null"]},"max_token_age":{"type":["string","number","null"]},"status":{"enum":["active","disabled"]}}},"IdentityProviderPatchInput":{"type":"object","properties":{"issuer":{"type":"string"},"audience":{"type":"string"},"jwks_url":{"type":"string"},"subject_claim":{"type":["string","null"]},"display_name_claim":{"type":["string","null"]},"agent_card_url_claim":{"type":["string","null"]},"algorithms":{"type":["array","null"],"items":{"type":"string"}},"clock_tolerance":{"type":["string","number","null"]},"max_token_age":{"type":["string","number","null"]},"status":{"enum":["active","disabled"]}}}}},"security":[{"bearerAuth":[],"authScheme":[]}]}