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

# Get agent

> Returns the agent with its latest config. Edit it and send it back to [Update agent](/api-reference/agents/update-agent).



## OpenAPI

````yaml /api-reference/rest/openapi.yaml get /v1/agents/{agentId}
openapi: 3.1.0
info:
  title: Zero Runtime REST API
  version: '1.0'
  description: >-
    Create, configure, version and deploy agents, and wire SIP telephony to
    them.
servers:
  - url: https://api.zeroruntime.ai
security:
  - token: []
tags:
  - name: Agents
  - name: Versions
  - name: Deployment
  - name: Phone numbers
  - name: Routing rules
  - name: Calls
  - name: Batch calls
  - name: Knowledge bases
  - name: Knowledge base folders
paths:
  /v1/agents/{agentId}:
    parameters:
      - $ref: '#/components/parameters/agentId'
    get:
      tags:
        - Agents
      summary: Get agent
      description: >-
        Returns the agent with its latest config. Edit it and send it back to
        [Update agent](/api-reference/agents/update-agent).
      responses:
        '200':
          description: The agent and its latest config.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentWithConfig'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    agentId:
      name: agentId
      in: path
      required: true
      schema:
        type: string
      example: ag_7f2c91
  schemas:
    AgentWithConfig:
      allOf:
        - $ref: '#/components/schemas/Agent'
        - type: object
          properties:
            versionId:
              type: string
              example: cm_31d0ba
            config:
              allOf:
                - $ref: '#/components/schemas/AgentConfig'
              description: The config as stored, with names resolved.
    Agent:
      type: object
      properties:
        agentId:
          type: string
          example: ag_7f2c91
        name:
          type: string
          example: Support Agent
        status:
          type: string
          enum:
            - inactive
            - active
          description: >-
            `active` once deployed. A new agent stays `inactive` only if its
            first deploy couldn't run, for example when the account has no
            active API key. Call [Deploy
            agent](/api-reference/deployment/deploy-agent) yourself then.
          example: active
        deploymentId:
          type: string
          example: dp_44b1e0
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    AgentConfig:
      type: object
      required:
        - name
        - languages
      properties:
        name:
          type: string
          example: Support Agent
        defaultLanguage:
          type: string
          description: A language name, any casing.
          example: english
        languages:
          type: object
          description: >-
            Keyed by language name (`english`, `hindi`, …). Holds everything
            that varies by language.
          additionalProperties:
            $ref: '#/components/schemas/LanguageBlock'
          example:
            english:
              prompt: >-
                You are a support agent for an online store. Keep replies to one
                or two sentences.
              greeting:
                text: Hi! How can I help you today?
                interruptible: false
              stt:
                - model: deepgram/nova-3-general
                  language: en
              llm:
                - model: openai/gpt-4o
                  apiKey: ••••••••••••••••AbCd
              tts:
                - model: cartesia/sonic-3
                  voice: faf0731e-dfb9-4cfc-8119-259a79b27e12
        voiceProcessing:
          $ref: '#/components/schemas/VoiceProcessing'
        knowledgeBaseIds:
          type: array
          items:
            type: string
          description: >-
            Ids of the knowledge bases the agent answers from. An update
            replaces the list, so leaving it out removes them all.
        callSummary:
          type: object
          properties:
            enabled:
              type: boolean
            llm:
              $ref: '#/components/schemas/ModelEntry'
            instruction:
              type: string
            webhook:
              type: object
              properties:
                url:
                  type: string
                  format: uri
        tools:
          type: array
          items:
            type: string
          description: >-
            Ids of the tools the agent can call. An update replaces the list, so
            leaving it out removes them all.
        advanced:
          type: object
    Error:
      type: object
      properties:
        error:
          type: string
    LanguageBlock:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
        greeting:
          type: object
          properties:
            text:
              type: string
            interruptible:
              type: boolean
              description: Must match across languages.
        stt:
          $ref: '#/components/schemas/ModelSlot'
        llm:
          $ref: '#/components/schemas/ModelSlot'
        tts:
          $ref: '#/components/schemas/ModelSlot'
        realtime:
          allOf:
            - $ref: '#/components/schemas/ModelSlot'
          description: >-
            A realtime model fills STT, LLM and TTS itself. When set, `stt`,
            `llm` and `tts` in the same block are ignored.
        turnDetection:
          type: object
          properties:
            model:
              type: string
              description: >-
                A turn detection model from [Supported
                models](/api-reference/rest/models).
              example: videosdk/echo-large
            mode:
              type: string
              enum:
                - default
                - adaptive
            threshold:
              type: number
              minimum: 0
              maximum: 1
            minWaitSeconds:
              type: number
              minimum: 0
            maxWaitSeconds:
              type: number
              minimum: 0
              description: At least `minWaitSeconds`.
        wakeUp:
          type: object
          description: When `enabled` is true, `afterSeconds` and `message` are required.
          properties:
            enabled:
              type: boolean
            afterSeconds:
              type: number
              minimum: 0
            message:
              type: string
        endCall:
          type: object
          properties:
            enabled:
              type: boolean
              description: Must match across languages.
            when:
              type: string
              description: Must match across languages.
            message:
              type: string
    VoiceProcessing:
      type: object
      description: Shared by every language.
      properties:
        vad:
          type: object
          required:
            - sensitivity
          properties:
            sensitivity:
              type: string
              enum:
                - low
                - medium
                - high
            threshold:
              type: number
              minimum: 0
              maximum: 1
            minSpeechDuration:
              type: number
              minimum: 0
            minSilenceDuration:
              type: number
              minimum: 0
        interruption:
          type: object
          properties:
            mode:
              type: string
              enum:
                - hybrid
                - vad
                - stt
              description: '`vad` needs a `voiceProcessing.vad` block.'
            minDuration:
              type: number
              minimum: 0
            minWords:
              type: integer
              minimum: 0
        noiseCancellation:
          type: object
          description: '`{ "model": "provider/modelId" }` or `{ "provider": "…" }`.'
          properties:
            model:
              type: string
              description: >-
                A noise cancellation model from [Supported
                models](/api-reference/rest/models).
              example: aicoustics/quail-l-16khz
            provider:
              type: string
    ModelEntry:
      type: object
      description: One model in a slot.
      required:
        - model
      properties:
        model:
          type: string
          description: >-
            `provider/modelId`. Copy a slug from [Supported
            models](/api-reference/rest/models).
          example: cartesia/sonic-3
        voice:
          type: string
          description: >-
            The provider's voice id. Required for TTS models. Open a model's
            voices in [Supported models](/api-reference/rest/models) to copy
            one.
        language:
          type: string
          description: >-
            Optional language code for a regional variant, e.g. `en-IN`. Left
            out, the plain code is picked. See each model's codes in [Supported
            models](/api-reference/rest/models).
        apiKey:
          type: string
          description: >
            Your provider's own API key. Selects the bring-your-own-key variant
            of the model; leave it off for inference.


            Responses return it masked (`••••••••AbCd`). Send the full key on
            every create and update; a masked value is rejected.
          example: sk-proj-…
      additionalProperties: false
    ModelSlot:
      type: array
      description: The first entry is primary; the rest are fallbacks tried in order.
      items:
        $ref: '#/components/schemas/ModelEntry'
  responses:
    Unauthorized:
      description: Missing or invalid `Authorization` header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource on this account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: Your API token, sent raw (no `Bearer` prefix).
      x-default: <auth-token>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.