Product Specifications
Browse technical specifications and schemas
2 directories
File Tree
spec
conformance
cases
data.export.v1
passports
payments.refunds.v1
passports
integrations
oap
examples
vc
docs
json
{
"$id": "https://github.com/aporthq/aport-spec/oap/passport-schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Open Agent Passport",
"description": "Schema for Open Agent Passport (OAP) v1.0 passport objects",
"definitions": {
"authorizationScopePath": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"pattern": "^(?!(?:__proto__|prototype|constructor)(?:\\.|$))[a-zA-Z_][a-zA-Z0-9_]*(?:\\.(?!(?:__proto__|prototype|constructor)(?:\\.|$))[a-zA-Z_][a-zA-Z0-9_]*){0,5}$",
"description": "Own-property path relative to the server-constructed context root, with 1-6 dot-separated identifier components. Prototype-related components, array indexes and wildcards are not supported."
}
},
"type": "object",
"required": [
"passport_id",
"kind",
"spec_version",
"owner_id",
"owner_type",
"status",
"assurance_level",
"capabilities",
"limits",
"regions",
"created_at",
"updated_at",
"version"
],
"properties": {
"passport_id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the passport (UUID v4)",
"example": "550e8400-e29b-41d4-a716-446655440000"
},
"kind": {
"type": "string",
"enum": ["template", "instance"],
"description": "Type of passport - template (canonical identity) or instance (tenant-specific)",
"example": "template"
},
"spec_version": {
"type": "string",
"const": "oap/1.0",
"description": "OAP specification version",
"example": "oap/1.0"
},
"template_id": {
"type": "string",
"format": "uuid",
"description": "Template passport ID (required for instances)",
"example": "550e8400-e29b-41d4-a716-446655440001"
},
"owner_id": {
"type": "string",
"description": "Unique identifier for the owner (organization or user)",
"example": "org_12345678"
},
"owner_type": {
"type": "string",
"enum": ["org", "user"],
"description": "Type of owner (organization or user)",
"example": "org"
},
"assurance_level": {
"type": "string",
"enum": ["L0", "L1", "L2", "L3", "L4KYC", "L4FIN"],
"description": "Assurance level of the passport owner",
"example": "L2"
},
"status": {
"type": "string",
"enum": ["draft", "active", "suspended", "revoked"],
"description": "Current status of the passport",
"example": "active"
},
"capabilities": {
"type": "array",
"items": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9]+(\\.[a-z0-9]+)*$",
"description": "Capability identifier",
"example": "finance.payment.refund"
},
"params": {
"type": "object",
"description": "Optional parameters for the capability",
"additionalProperties": true,
"example": {
"max_amount": 5000,
"currency": "USD"
}
}
}
},
"description": "List of capabilities granted to the agent",
"example": [
{
"id": "finance.payment.refund",
"params": {
"max_amount": 5000,
"currency": "USD"
}
},
{
"id": "data.export"
}
]
},
"limits": {
"type": "object",
"description": "Operational limits for the agent",
"properties": {
"authorization_scope": {
"type": "object",
"description": "Optional scope constraints enforced by the hosted policy verification endpoint. Matching bindings require a passport-owner backend API key and backend-derived requester and resource scope. Absence preserves existing behavior. Local passport evaluation is unsigned simulation, not authorization evidence.",
"required": ["bindings"],
"additionalProperties": false,
"properties": {
"bindings": {
"type": "array",
"minItems": 1,
"maxItems": 16,
"description": "Every binding selecting the evaluated policy must pass. A valid configuration with no matching binding leaves that policy unchanged.",
"items": {
"type": "object",
"required": ["policies", "subject_path", "resource_path"],
"additionalProperties": false,
"description": "At runtime, paths must differ and resolve to nonempty scope IDs. The subject is a string; the resource is a string or 1-1000 strings, all equal to the subject. IDs are at most 256 characters, have no surrounding whitespace, and exclude ASCII control characters. This draft-07 schema validates configuration shape; runtime additionally rejects identical subject and resource paths.",
"properties": {
"policies": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"description": "Exact versioned policy IDs, or * for every policy. This field is required; partial wildcards are not supported.",
"items": {
"type": "string",
"maxLength": 150,
"pattern": "^(?:\\*|[a-z][a-z0-9_-]*(?:\\.[a-z][a-z0-9_-]*)*\\.v[1-9][0-9]*)$"
}
},
"subject_path": {
"$ref": "#/definitions/authorizationScopePath"
},
"resource_path": {
"$ref": "#/definitions/authorizationScopePath"
}
}
}
}
}
},
"finance.payment.refund": {
"type": "object",
"properties": {
"currency_limits": {
"type": "object",
"patternProperties": {
"^[A-Z]{3}$": {
"type": "object",
"properties": {
"max_per_tx": {
"type": "integer",
"minimum": 0,
"description": "Maximum amount per transaction in minor units"
},
"daily_cap": {
"type": "integer",
"minimum": 0,
"description": "Maximum daily total in minor units"
}
}
}
}
},
"reason_codes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed reason codes for refunds"
},
"idempotency_required": {
"type": "boolean",
"description": "Whether idempotency keys are required"
}
}
},
"data.export": {
"type": "object",
"properties": {
"max_rows": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of rows per export"
},
"allow_pii": {
"type": "boolean",
"description": "Whether PII can be included in exports"
},
"allowed_collections": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed data collections for export"
}
}
},
"messaging.send": {
"type": "object",
"properties": {
"msgs_per_min": {
"type": "integer",
"minimum": 1,
"description": "Maximum messages per minute"
},
"msgs_per_day": {
"type": "integer",
"minimum": 1,
"description": "Maximum messages per day"
},
"allowed_recipients": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"description": "Simple list of allowed recipient IDs"
},
{
"type": "array",
"items": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "Recipient identifier (username, email, account ID, etc.)"
},
"limits": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code"
},
"max_amount": {
"type": "integer",
"minimum": 0,
"description": "Maximum amount per transaction in minor units"
},
"daily_cap": {
"type": "integer",
"minimum": 0,
"description": "Daily spending cap in minor units"
}
}
}
}
},
"description": "List of recipients with per-recipient limits"
}
]
},
"approval_required": {
"type": "boolean",
"description": "Whether messages require manual approval before sending"
}
}
},
"payments.payout": {
"type": "object",
"properties": {
"supported_currencies": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"description": "Supported currencies for payouts"
},
"currency_limits": {
"type": "object",
"patternProperties": {
"^[A-Z]{3}$": {
"type": "object",
"properties": {
"max_per_tx": {
"type": "integer",
"minimum": 0,
"description": "Maximum amount per transaction in minor units"
},
"max_daily_amount": {
"type": "integer",
"minimum": 0,
"description": "Maximum daily total in minor units"
}
}
}
}
},
"allowed_destination_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed destination account types"
},
"allowed_recipients": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
},
"description": "Simple list of allowed recipient IDs"
},
{
"type": "array",
"items": {
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "string",
"description": "Recipient identifier"
},
"limits": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"max_amount": {
"type": "integer",
"minimum": 0
},
"daily_cap": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
]
},
"approval_required": {
"type": "boolean",
"description": "Whether payouts require manual approval"
},
"max_payouts_per_day": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of payouts per day"
},
"compliance_checks_required": {
"type": "boolean",
"description": "Whether compliance checks are required"
}
}
},
"repo.release.publish": {
"type": "object",
"properties": {
"allowed_branches": {
"type": "array",
"items": {
"type": "string"
},
"description": "Allowed branches for releases"
},
"max_releases_per_day": {
"type": "integer",
"minimum": 1,
"description": "Maximum releases per day"
},
"require_signed_artifacts": {
"type": "boolean",
"description": "Whether artifacts must be signed"
}
}
}
},
"additionalProperties": true
},
"regions": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}(-[A-Z]{2})?$"
},
"description": "Geographic regions where the agent is authorized to operate",
"example": ["US", "EU", "CA"]
},
"metadata": {
"type": "object",
"description": "Additional metadata for the passport",
"additionalProperties": true
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of creation",
"example": "2024-01-01T00:00:00Z"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "ISO 8601 timestamp of last update",
"example": "2024-01-15T10:30:00Z"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"description": "Version of the passport schema",
"example": "1.0.0"
},
"spec_version": {
"type": "string",
"const": "oap/1.0",
"description": "OAP specification version",
"example": "oap/1.0"
},
"parent_agent_id": {
"type": "string",
"format": "uuid",
"description": "Parent template passport ID (required for instances)",
"example": "550e8400-e29b-41d4-a716-446655440001"
}
},
"additionalProperties": false
}