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

# Get agent by ID (CLI/SDK)

> Retrieves detailed information about a specific agent.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/runtime/agents/{id}
openapi: 3.0.0
info:
  title: Runflow Runtime API
  description: >-
    Programmatic surface for the Runflow platform — used by the SDK, the CLI,
    the execution engine, and any server-to-server caller. Authenticate with an
    `x-api-key` header (or `Authorization: Bearer ...`).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.runflow.ai
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags: []
paths:
  /api/v1/runtime/agents/{id}:
    get:
      tags:
        - Runtime API - Agents Management
      summary: Get agent by ID (CLI/SDK)
      description: Retrieves detailed information about a specific agent.
      operationId: RuntimeAgentsController_getAgent
      parameters:
        - name: id
          required: true
          in: path
          description: Agent UUID
          schema:
            type: string
      responses:
        '200':
          description: Agent found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentResponseDto'
        '404':
          description: Agent not found.
      security:
        - bearer: []
components:
  schemas:
    AgentResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Agent unique identifier
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: Agent name
          example: Customer Support Bot
        description:
          type: string
          description: Agent description
          example: AI-powered customer support agent
        category:
          type: string
          description: Agent category
          enum:
            - SALES
            - CUSTOMER_SUPPORT
            - VOICE
            - OPERATIONS
            - FINANCIAL_PREVENTION
            - FINANCIAL_RECOVERY
            - MARKETING
            - ANALYTICS
          example: CUSTOMER_SUPPORT
        subcategory:
          type: string
          description: Agent subcategory for more specific classification
          enum:
            - SDR_OUTBOUND
            - SDR_INBOUND
            - ACCOUNT_MANAGER
            - SALES_CLOSER
            - LEAD_QUALIFIER
            - TIER_1_SUPPORT
            - TECHNICAL_SUPPORT
            - ESCALATION_HANDLER
            - CHAT_SUPPORT
            - COLD_CALLING
            - CUSTOMER_SERVICE_VOICE
            - APPOINTMENT_SETTER
            - SURVEY_CALLER
            - DATA_PROCESSOR
            - WORKFLOW_AUTOMATOR
            - QUALITY_CHECKER
            - REPORT_GENERATOR
            - FRAUD_DETECTOR
            - RISK_ASSESSOR
            - COMPLIANCE_MONITOR
            - DEBT_COLLECTOR
            - PAYMENT_NEGOTIATOR
            - RECOVERY_SPECIALIST
            - CONTENT_CREATOR
            - CAMPAIGN_MANAGER
            - SOCIAL_MEDIA_MANAGER
            - EMAIL_MARKETER
            - DATA_ANALYST
            - PERFORMANCE_TRACKER
            - INSIGHT_GENERATOR
            - DASHBOARD_CREATOR
          example: TIER_1_SUPPORT
        status:
          type: string
          description: Agent status
          enum:
            - ACTIVE
            - INACTIVE
            - ERROR
            - DEPLOYING
          example: ACTIVE
        lastDeploy:
          format: date-time
          type: string
          description: Last deployment timestamp
          example: '2025-01-01T00:00:00.000Z'
        logo:
          type: string
          description: Agent logo URL
          example: https://example.com/logo.png
        repositoryUrl:
          type: string
          description: Repository URL
          example: https://github.com/user/agent-repo
        endpointUrl:
          type: string
          description: Agent endpoint URL (populated by provisioning service)
          example: https://chatbot.acme.runflow.ai
        code:
          type: string
          description: Agent source code
          example: export function main() { return "Hello World"; }
        fileTree:
          type: object
          description: File tree structure for IDE-like interface
          example:
            - name: src
              type: folder
              children:
                - name: index.ts
                  type: file
                  content: export function main() { return "Hello World"; }
        language:
          type: string
          description: Programming language
          example: typescript
        branch:
          type: string
          description: Git branch
          example: main
        commit:
          type: string
          description: Git commit hash
          example: abc123def456
        stagingCommit:
          type: string
          description: Staging commit hash (latest deploy to staging)
          example: 2025-01-01T00-00-00-000Z
        stagingEndpointUrl:
          type: string
          description: Staging endpoint URL
          example: https://staging.runflow.ai/agent/abc123
        tags:
          description: Agent tags
          example:
            - ai
            - customer-support
            - chatbot
          type: array
          items:
            type: string
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
          example: '2025-01-01T00:00:00.000Z'
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
          example: '2025-01-01T00:00:00.000Z'
        tenantId:
          type: string
          description: Tenant ID that the agent belongs to
          example: 123e4567-e89b-12d3-a456-426614174000
        userId:
          type: string
          description: User ID that owns the agent
          example: 123e4567-e89b-12d3-a456-426614174000
        _count:
          type: object
          description: Agent related statistics
          example:
            executions: 15
            dataSources: 3
            triggers: 2
        repositoryName:
          type: string
          description: Repository name
          example: agent-repo
        scheduleArn:
          type: string
          description: AWS Scheduler ARN
          example: >-
            arn:aws:scheduler:us-east-1:123456789012:schedule/default/my-schedule
        newEngine:
          type: boolean
          description: >-
            Use new executor-engine (Go) instead of legacy execution-engine
            (NestJS)
          example: true
      required:
        - id
        - name
        - description
        - category
        - status
        - code
        - language
        - branch
        - tags
        - createdAt
        - updatedAt
        - tenantId
        - userId

````