openapi: 3.2.0 info: title: MolTrust Agents API version: '2.5' tags: - name: Agents paths: /agents/{did}/operator: post: summary: Claim Agent Operator description: 'Set or replace the operator of an agent. Only the agent''s own owner can call this — the owner_did on the API key must equal the agent DID itself (current self-sovereign model). Most common pattern: the agent claims itself as operator so it can put a cap on its own spend.' operationId: claim_agent_operator_agents__did__operator_post parameters: - name: did in: path required: true schema: type: string title: Did - name: X-API-Key in: header required: true schema: type: string title: X-Api-Key requestBody: required: true content: application/json: schema: $ref: '#[REDACTED]' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Agents /agents/inactive: get: summary: Get Inactive Agents description: Returns agents inactive for more than `days` days. Admin-only. RSAC Gap 3. operationId: get_inactive_agents_agents_inactive_get parameters: - name: days in: query required: false schema: type: integer maximum: 365 minimum: 1 default: 30 title: Days responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Agents /agents/recent: get: summary: Recent Agents operationId: recent_agents_agents_recent_get responses: '200': description: Successful Response content: application/json: schema: {} tags: - Agents /agents/{did}/erc8004: get: summary: Erc8004 Registration File description: Serve ERC-8004 compatible registration file (Agent Card) for a MolTrust agent. operationId: erc8004_registration_file_agents__did__erc8004_get parameters: - name: did in: path required: true schema: type: string maxLength: 128 title: Did responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Agents components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError