> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emergence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Agent

> Update an agent's card and metadata (optimistic concurrency via ETag).



## OpenAPI

````yaml /openapi/em-runtime-assets-v2.yaml put /assets/agents/{resource_uri}
openapi: 3.1.0
info:
  title: em_runtime_assets
  version: 5.27.0
servers: []
security: []
paths:
  /assets/agents/{resource_uri}:
    put:
      tags:
        - agents
      summary: Update Agent
      description: Update an agent's card and metadata (optimistic concurrency via ETag).
      operationId: update_agent
      parameters:
        - name: resource_uri
          in: path
          required: true
          schema:
            type: string
            title: Resource Uri
        - name: If-Match
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: If-Match
        - name: X-Project-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Project-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentDetail'
          headers:
            ETag:
              schema:
                type: string
              description: Version identifier for optimistic concurrency
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '412':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Precondition Failed
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '428':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Precondition Required
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateAgentRequest:
      properties:
        agent_card:
          $ref: '#/components/schemas/AgentCardPayload'
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        visibility:
          anyOf:
            - $ref: '#/components/schemas/Visibility'
            - type: 'null'
      type: object
      required:
        - agent_card
      title: UpdateAgentRequest
      description: Request body for PUT /assets/agents/{resource_uri}
    AgentDetail:
      properties:
        resource_uri:
          type: string
          title: Resource Uri
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        status:
          type: string
          title: Status
        lifecycle_stage:
          type: string
          title: Lifecycle Stage
        health_status:
          type: string
          title: Health Status
        verification_status:
          type: string
          title: Verification Status
        a2a_protocol_version:
          anyOf:
            - type: string
            - type: 'null'
          title: A2A Protocol Version
        visibility:
          type: string
          title: Visibility
        current_version:
          type: integer
          title: Current Version
        agent_card:
          additionalProperties: true
          type: object
          title: Agent Card
        tags:
          items:
            type: string
          type: array
          title: Tags
          default: []
        source:
          type: string
          title: Source
        organization_id:
          type: string
          title: Organization Id
        project_id:
          type: string
          title: Project Id
        owner_id:
          type: string
          title: Owner Id
          description: >-
            Deprecated: use created_by instead. Will be removed in a future
            release.
          deprecated: true
        registered_by:
          type: string
          title: Registered By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by:
          type: string
          title: Created By
        updated_by:
          type: string
          title: Updated By
        deprecation_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Deprecation Message
        deprecation_deadline:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deprecation Deadline
        successor_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Successor Id
        etag:
          type: string
          title: Etag
      type: object
      required:
        - resource_uri
        - name
        - status
        - lifecycle_stage
        - health_status
        - verification_status
        - visibility
        - current_version
        - agent_card
        - source
        - organization_id
        - project_id
        - owner_id
        - registered_by
        - created_at
        - updated_at
        - created_by
        - updated_by
        - etag
      title: AgentDetail
      description: Full single-resource response.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentCardPayload:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        description:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Description
        version:
          type: string
          title: Version
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        protocolVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Protocolversion
        supportedInterfaces:
          anyOf:
            - items:
                $ref: '#/components/schemas/A2AInterface'
              type: array
            - type: 'null'
          title: Supportedinterfaces
        provider:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Provider
        capabilities:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Capabilities
        skills:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Skills
        defaultInputModes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Defaultinputmodes
        defaultOutputModes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Defaultoutputmodes
        securitySchemes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Securityschemes
        security:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Security
        extensions:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Extensions
        signatures:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Signatures
      additionalProperties: true
      type: object
      required:
        - name
        - version
      title: AgentCardPayload
      description: >-
        A2A Agent Card JSON — supports both v0.3 and v1.0 formats.


        v0.3 cards have a required top-level `url` and optional
        `supportedInterfaces`.

        v1.0 cards have required `supportedInterfaces` and no top-level `url`.

        The validator ensures at least one transport declaration is present.
    Visibility:
      type: string
      enum:
        - PUBLIC
        - TENANT_ONLY
        - PRIVATE
      title: Visibility
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    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
    A2AInterface:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        protocolVersion:
          anyOf:
            - type: string
            - type: 'null'
          title: Protocolversion
        protocolBinding:
          anyOf:
            - type: string
            - type: 'null'
          title: Protocolbinding
        transportType:
          anyOf:
            - type: string
            - type: 'null'
          title: Transporttype
      additionalProperties: true
      type: object
      title: A2AInterface
      description: >-
        A single A2A v1.0 interface entry inside supportedInterfaces.


        Known fields are typed; unknown fields are allowed for
        forward-compatibility

        with evolving A2A spec versions.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````