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

# Get a background agent spec



## OpenAPI

````yaml /docs/reference/openapi.json get /background/agents/{agent_id}
openapi: 3.1.0
info:
  description: >-
    The HTTP API of an agent served with `omniserve run --agent agent.py`: runs,
    approvals, budgets, background tasks, sessions and the evidence of every
    run.
  title: OmniServe
  version: latest
servers:
  - description: omniserve run, locally
    url: http://localhost:8000
security: []
paths:
  /background/agents/{agent_id}:
    get:
      tags:
        - Background
      summary: Get a background agent spec
      operationId: get_background_agent_background_agents__agent_id__get
      parameters:
        - in: path
          name: agent_id
          required: true
          schema:
            title: Agent Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackgroundAgentSpec'
          description: Successful Response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
          description: Service Unavailable
components:
  schemas:
    BackgroundAgentSpec:
      additionalProperties: false
      properties:
        agent_config:
          additionalProperties: true
          title: Agent Config
          type: object
        agent_id:
          title: Agent Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        local_tools_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Local Tools Ref
        mcp_tools:
          items:
            additionalProperties: true
            type: object
          title: Mcp Tools
          type: array
        metadata:
          additionalProperties: true
          title: Metadata
          type: object
        model_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Model Config
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        system_instruction:
          anyOf:
            - type: string
            - type: 'null'
          title: System Instruction
        updated_at:
          format: date-time
          title: Updated At
          type: string
        workspace_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Workspace Config
      required:
        - agent_id
      title: BackgroundAgentSpec
      type: object
    HttpErrorResponse:
      description: Response shape produced by FastAPI HTTPException.
      properties:
        detail:
          description: Error detail
          title: Detail
      required:
        - detail
      title: HttpErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````