openapi: 3.1.0 info: title: agent-call immutable AI configuration API version: 1.0.0 description: >- Internal configuration publication/read surface. The call.execute business command remains RabbitMQ-only; secrets, URLs, and provider credentials are resolved by the execution environment and never enter MQ messages. servers: - url: / paths: /internal/v1/ai/agent-versions: post: operationId: publishAgentVersion security: - aiConfigPublish: [] parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/RequestId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgentVersionPublishRequest' responses: '200': description: Identical immutable content already exists content: application/json: schema: $ref: '#/components/schemas/AgentVersionReceipt' '201': description: Immutable version published content: application/json: schema: $ref: '#/components/schemas/AgentVersionReceipt' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '409': description: Existing version has different content /internal/v1/ai/agent-versions/{agent_version_id}: get: operationId: getAgentVersion security: - aiConfigRead: [] parameters: - $ref: '#/components/parameters/TenantId' - $ref: '#/components/parameters/RequestId' - name: agent_version_id in: path required: true schema: type: string pattern: '^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$' responses: '200': description: Trusted immutable snapshot content: application/json: schema: $ref: '#/components/schemas/AgentVersion' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': description: Agent version not found components: parameters: TenantId: name: X-Tenant-Id in: header required: true schema: {type: string, minLength: 1} RequestId: name: X-Request-Id in: header required: true schema: {type: string, minLength: 1, maxLength: 128} securitySchemes: aiConfigPublish: type: http scheme: bearer bearerFormat: JWT description: >- Requires scope ai.config.publish and the AI-config issuer/audience. aiConfigRead: type: http scheme: bearer bearerFormat: JWT description: >- Requires scope ai.config.read and the AI-config issuer/audience. schemas: AgentVersionPublishRequest: type: object additionalProperties: false required: [agent_version_id, config] properties: agent_version_id: type: string pattern: '^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$' config: $ref: 'ai-config.schema.json' AgentVersionReceipt: type: object required: [tenant_id, agent_version_id, status, immutable, content_sha256] properties: tenant_id: {type: string} agent_version_id: {type: string} status: {enum: [published, reused]} immutable: {const: true} content_sha256: {type: string, pattern: '^[a-f0-9]{64}$'} AgentVersion: allOf: - $ref: '#/components/schemas/AgentVersionReceipt' - type: object required: [config] properties: config: $ref: 'ai-config.schema.json' created_at: {type: string, format: date-time} published_at: {type: string, format: date-time} created_by: {type: string} Error: type: object required: [error] properties: error: {type: string} message: {type: string} responses: BadRequest: description: Invalid configuration content: application/json: schema: {$ref: '#/components/schemas/Error'} Unauthorized: description: Missing or invalid AI-config token Forbidden: description: Token lacks the AI-config permission