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

# Get Agent

> Get a single agent by its Tuner ID.

Returns the agent with its nested integration and provider details.
The authenticated user must have access to the workspace the agent belongs to.

- **workspace_id**: Get this from Workspace > General Settings.
- **agent_id**: Tuner's internal numeric ID for the agent (returned by
  `GET /workspaces/{workspace_id}/agents` or `POST /workspaces/{workspace_id}/agents`).



## OpenAPI

````yaml GET /api/v1/workspaces/{workspace_id}/agents/{agent_id}
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: public
    description: Public endpoints
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}:
    get:
      tags:
        - public
      summary: Get Workspace Agent
      description: >-
        Get a single agent by its Tuner ID.


        Returns the agent with its nested integration and provider details.

        The authenticated user must have access to the workspace the agent
        belongs to.


        - **workspace_id**: Get this from Workspace > General Settings.

        - **agent_id**: Tuner's internal numeric ID for the agent (returned by
          `GET /workspaces/{workspace_id}/agents` or `POST /workspaces/{workspace_id}/agents`).
      operationId: >-
        get_workspace_agent_api_v1_workspaces__workspace_id__agents__agent_id__get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            title: Agent Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    Agent:
      properties:
        id:
          type: integer
          title: Id
          description: Tuner's internal numeric ID for this agent.
        integration_id:
          type: integer
          title: Integration Id
          description: ID of the voice provider integration this agent uses.
        name:
          type: string
          title: Name
          description: Display name of the agent.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Brief description of what this agent does.
        lang:
          anyOf:
            - type: string
            - type: 'null'
          title: Lang
          description: >-
            BCP 47 language tag for the agent's primary language (e.g., 'en',
            'es').
        persona:
          anyOf:
            - $ref: '#/components/schemas/AgentPersona'
            - type: 'null'
          description: >-
            Nested language and accent for the agent. Null when the agent has no
            language configured.
        call_direction:
          type: string
          title: Call Direction
          description: >-
            'inbound' for customer-initiated calls, 'outbound' for
            agent-initiated calls.
        remote_identifier:
          type: string
          title: Remote Identifier
          description: Your voice provider's unique identifier for this agent.
        prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Prompt
          description: System prompt or instructions given to the agent.
        workflow:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Workflow
          description: Agent workflow configuration. Must be valid JSON.
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
          description: >-
            Destination URL for outbound webhook notifications. Null if not
            configured.
        integration_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Integration Name
          description: Name of the voice provider for this agent's integration.
        source_template_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Source Template Id
          description: ID of the template this agent was created from. Null if none.
        setup_method:
          type: string
          title: Setup Method
          description: >-
            How this agent's config was set up: 'pending', 'template', 'manual',
            'mcp', or 'skipped'.
          default: pending
        setup_code_confirmed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Setup Code Confirmed At
          description: >-
            Timestamp when the integration/code step of the setup wizard was
            confirmed. Null if not yet confirmed.
        setup_completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Setup Completed At
          description: >-
            Timestamp when the setup wizard was completed. Null if not yet
            completed.
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
          description: Timestamp when the agent was deleted. Null if the agent is active.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: ISO 8601 timestamp when the agent was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: ISO 8601 timestamp when the agent was last updated.
        created_by:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created By
          description: ID of the user who created this agent.
        updated_by:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated By
          description: ID of the user who last updated this agent.
        integration:
          anyOf:
            - $ref: '#/components/schemas/IntegrationWithProvider'
            - type: 'null'
      type: object
      required:
        - id
        - integration_id
        - name
        - call_direction
        - remote_identifier
        - created_at
        - updated_at
      title: Agent
      description: Agent schema for API responses with nested relationships.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentPersona:
      properties:
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: The agent's primary language (BCP 47 tag).
        accent:
          anyOf:
            - type: string
            - type: 'null'
          title: Accent
          description: >-
            Default accent code for the agent's language. Null if not
            configured.
      type: object
      title: AgentPersona
      description: Nested persona object carrying language and accent for an agent.
    IntegrationWithProvider:
      properties:
        id:
          type: integer
          title: Id
        uuid:
          type: string
          format: uuid
          title: Uuid
        workspace_id:
          type: integer
          title: Workspace Id
        provider_id:
          type: integer
          title: Provider Id
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created By
        updated_by:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated By
        api_key:
          type: string
          maxLength: 500
          minLength: 1
          title: Api Key
        provider:
          anyOf:
            - $ref: '#/components/schemas/ProviderResponse'
            - type: 'null'
      type: object
      required:
        - id
        - uuid
        - workspace_id
        - provider_id
        - created_at
        - updated_at
        - api_key
      title: IntegrationWithProvider
      description: Integration schema with nested provider object.
    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
    ProviderResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
      type: object
      required:
        - id
        - name
      title: ProviderResponse
      description: Response schema for provider.
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````