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

# Configure an LLM agent

> Requires `agents:write`. Writes a new committed version of an LLM agent from a system prompt, description, and tool list.



## OpenAPI

````yaml /api-reference/openapi.yaml post /agents/{agent_id_or_name}/configure-llm
openapi: 3.0.3
info:
  title: Guild Public API
  version: 1.0.0
  description: >-
    The Guild public API, served at https://api.guild.ai/v1 and authenticated
    with account API keys (HTTP Basic, key id as the username and the secret as
    the password). See https://docs.guild.ai/api-reference/introduction for
    scopes and behavior. A session-events websocket also exists at
    wss://api.guild.ai/v1/sessions/{session_id}/events/ws with the same Basic
    auth on the handshake; OpenAPI cannot describe websockets, so it is not
    listed in paths.
servers:
  - url: https://api.guild.ai/v1
    description: Production
security: []
tags:
  - name: accounts
  - name: agents
  - name: sessions
  - name: skills
  - name: workspaces
paths:
  /agents/{agent_id_or_name}/configure-llm:
    post:
      tags:
        - agents
      summary: Configure an LLM agent
      description: >-
        Requires `agents:write`. Writes a new committed version of an LLM agent
        from a system prompt, description, and tool list.
      operationId: configure_agent_llm
      parameters:
        - name: agent_id_or_name
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                system_prompt:
                  title: System Prompt
                  type: string
                description:
                  title: Description
                  type: string
                tools:
                  items:
                    $ref: '#/components/schemas/ConfigureLlmIntegrationToolsInput'
                  title: Tools
                  type: array
                guild_tools:
                  default: []
                  items:
                    type: string
                  title: Guild Tools
                  type: array
                mode:
                  default: one-shot
                  enum:
                    - one-shot
                    - multi-turn
                  title: Mode
                  type: string
                summary:
                  default: null
                  title: Summary
                  nullable: true
                  type: string
                version_number:
                  default: 1.0.0
                  title: Version Number
                  type: string
              required:
                - system_prompt
                - description
                - tools
              title: ConfigureAgentLlmInput
              type: object
      responses:
        '201':
          description: The newly committed agent version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersion'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found, or not visible to this key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKey: []
components:
  schemas:
    ConfigureLlmIntegrationToolsInput:
      properties:
        integration:
          title: Integration
          type: string
        tools:
          items:
            type: string
          title: Tools
          type: array
      required:
        - integration
        - tools
      title: ConfigureLlmIntegrationToolsInput
      type: object
    AgentVersion:
      oneOf:
        - $ref: '#/components/schemas/AgentVersionCommitted'
        - $ref: '#/components/schemas/AgentVersionEphemeral'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    AgentVersionCommitted:
      type: object
      properties:
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        agent_id:
          type: string
          format: uuid
        author_id:
          type: string
          format: uuid
        validation_status:
          type: string
          enum:
            - SKIPPED
            - PENDING
            - RUNNING
            - PASSED
            - FAILED
        dependencies:
          type: object
          nullable: true
          description: npm package.json dependencies
        description:
          type: string
          nullable: true
          description: Description for the agent extracted from the agent code.
        env_references:
          type: array
          items: {}
          nullable: true
          description: >-
            Workspace variable keys referenced as {{env.KEY}} in the version's
            prompt, extracted at build time
        input_schema:
          type: object
          nullable: true
          description: JSON Schema from Zod input
        output_schema:
          type: object
          nullable: true
          description: JSON Schema from Zod output
        published_at:
          type: string
          format: date-time
          nullable: true
        publishing_started_at:
          type: string
          format: date-time
          nullable: true
        raw_tools:
          type: array
          items: {}
          nullable: true
          description: >-
            Structured per-tool metadata. Each entry is a tool object
            discriminated by toolType (integration, legacy, agent, builtin).
        runtime_environment_id:
          type: string
          format: uuid
          nullable: true
        sha:
          type: string
          maxLength: 40
          nullable: true
          description: >-
            Git commit SHA (40-character hexadecimal). For agents: set on
            version creation. For integrations: set after code is stored in
            GitHub.
        summary:
          type: string
          maxLength: 500
          nullable: true
          description: >-
            Commit message summary. For agents: set on version creation. For
            integrations: set after code is stored in GitHub.
        tools:
          type: array
          items: {}
          nullable: true
        version_number:
          type: string
          maxLength: 100
          nullable: true
          description: >-
            The semantic version number (i.e., MAJOR.MINOR.PATCH) of this
            version
        agent: {}
        author: {}
        status: {}
        version_type: {}
    AgentVersionEphemeral:
      type: object
      properties:
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        agent_id:
          type: string
          format: uuid
        author_id:
          type: string
          format: uuid
        files:
          type: object
          description: >-
            The files for this version and their content. Format: {[key:
            filename]: content}
        validation_status:
          type: string
          enum:
            - SKIPPED
            - PENDING
            - RUNNING
            - PASSED
            - FAILED
        dependencies:
          type: object
          nullable: true
          description: npm package.json dependencies
        description:
          type: string
          nullable: true
          description: Description for the agent extracted from the agent code.
        env_references:
          type: array
          items: {}
          nullable: true
          description: >-
            Workspace variable keys referenced as {{env.KEY}} in the version's
            prompt, extracted at build time
        input_schema:
          type: object
          nullable: true
          description: JSON Schema from Zod input
        output_schema:
          type: object
          nullable: true
          description: JSON Schema from Zod output
        raw_tools:
          type: array
          items: {}
          nullable: true
          description: >-
            Structured per-tool metadata. Each entry is a tool object
            discriminated by toolType (integration, legacy, agent, builtin).
        runtime_environment_id:
          type: string
          format: uuid
          nullable: true
        tools:
          type: array
          items: {}
          nullable: true
        version_number:
          type: string
          maxLength: 100
          nullable: true
          description: >-
            The semantic version number (i.e., MAJOR.MINOR.PATCH) of this
            version
        agent: {}
        author: {}
        published_at: {}
        publishing_started_at: {}
        sha: {}
        status: {}
        summary: {}
        version_type: {}
  securitySchemes:
    apiKey:
      type: http
      scheme: basic
      description: 'Account API key: key id as the username, secret as the password.'

````