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

# Get agent definition

> Get the agent definition (capabilities and metadata)



## OpenAPI

````yaml api-reference/openapi.json get /api/a2a/v1/definition
openapi: 3.1.0
info:
  title: soma
  version: v1
servers: []
security: []
tags:
  - name: task
    description: >-
      Task management endpoints for creating, listing, and managing tasks and
      their messages
  - name: secret
    description: Secret management endpoints for storing and retrieving encrypted secrets
  - name: encryption
    description: >-
      Encryption key management endpoints for envelope keys, data encryption
      keys, and aliases
  - name: bridge
    description: >-
      Bridge endpoints for managing providers, credentials, functions, and MCP
      protocol communication
  - name: _internal
    description: >-
      Internal endpoints for health checks, runtime configuration, and SDK code
      generation
  - name: a2a
    description: >-
      Agent-to-agent communication endpoints for agent cards, definitions, and
      JSON-RPC requests
  - name: v1
    description: API version v1 endpoints
paths:
  /api/a2a/v1/definition:
    get:
      tags:
        - a2a
        - v1
      summary: Get agent definition
      description: Get the agent definition (capabilities and metadata)
      operationId: get-agent-definition
      responses:
        '200':
          description: Agent definition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SomaAgentDefinition'
components:
  schemas:
    SomaAgentDefinition:
      type: object
      properties:
        bridge:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/BridgeConfig'
        encryption:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/EncryptionConfig'
        secrets:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/SecretConfig'
          propertyNames:
            type: string
    BridgeConfig:
      type: object
      properties:
        providers:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/ProviderConfig'
          propertyNames:
            type: string
    EncryptionConfig:
      type: object
      description: Top-level encryption configuration
      properties:
        envelope_keys:
          type:
            - object
            - 'null'
          description: >-
            Map of envelope key id (ARN or file_name) -> envelope key
            configuration with nested DEKs

            DEKs are stored by their alias name (e.g., "default") rather than
            UUID
          additionalProperties:
            $ref: '#/components/schemas/EnvelopeKeyConfig'
          propertyNames:
            type: string
    SecretConfig:
      type: object
      description: Configuration for a secret stored in soma.yaml
      required:
        - value
        - dek_alias
      properties:
        dek_alias:
          type: string
          description: The DEK alias used to encrypt this secret
        value:
          type: string
          description: The encrypted value of the secret
    ProviderConfig:
      type: object
      required:
        - provider_controller_type_id
        - credential_controller_type_id
        - display_name
        - resource_server_credential
      properties:
        credential_controller_type_id:
          type: string
        display_name:
          type: string
        functions:
          type:
            - array
            - 'null'
          items:
            type: string
        provider_controller_type_id:
          type: string
        resource_server_credential:
          $ref: '#/components/schemas/CredentialConfig'
        user_credential:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CredentialConfig'
    EnvelopeKeyConfig:
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/EnvelopeKeyConfigAwsKms'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - aws_kms
        - allOf:
            - $ref: '#/components/schemas/EnvelopeKeyConfigLocal'
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - local
    CredentialConfig:
      type: object
      required:
        - id
        - type_id
        - metadata
        - value
        - dek_alias
      properties:
        dek_alias:
          type: string
        id:
          type: string
        metadata: {}
        next_rotation_time:
          type:
            - string
            - 'null'
        type_id:
          type: string
        value: {}
    EnvelopeKeyConfigAwsKms:
      type: object
      description: Envelope encryption key configuration with nested DEKs
      required:
        - arn
        - region
      properties:
        arn:
          type: string
        deks:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/DekConfig'
          propertyNames:
            type: string
        region:
          type: string
    EnvelopeKeyConfigLocal:
      type: object
      required:
        - file_name
      properties:
        deks:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/DekConfig'
          propertyNames:
            type: string
        file_name:
          type: string
    DekConfig:
      type: object
      description: Data encryption key configuration
      required:
        - encrypted_key
      properties:
        encrypted_key:
          type: string

````