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

# Update agent

> Updates agent configuration. Agent must be stopped. Users can assign own or platform policies to own agents.



## OpenAPI

````yaml /openapi.yaml put /agents/{id}
openapi: 3.0.3
info:
  title: Hill90 API
  description: Hill90 platform API — agent management and lifecycle operations.
  version: 0.1.0
servers:
  - url: /
    description: Relative (behind Traefik reverse proxy)
security: []
paths:
  /agents/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    put:
      summary: Update agent
      description: >-
        Updates agent configuration. Agent must be stopped. Users can assign own
        or platform policies to own agents.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                tools_config:
                  type: object
                cpus:
                  type: string
                mem_limit:
                  type: string
                pids_limit:
                  type: integer
                soul_md:
                  type: string
                rules_md:
                  type: string
                model_policy_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Internal-only override. Prefer model_names for user-facing
                    model assignment.
                model_names:
                  type: array
                  items:
                    type: string
                  description: >-
                    User-facing model names to assign directly to this agent
                    (one or many).
                skill_ids:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: >-
                    Skill IDs to assign. Empty array to detach all skills
                    (Custom mode). Config is merged from all skills at save
                    time.
                container_profile_id:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Container profile to assign. Omit for no change; explicit
                    null to clear.
                autonomy_level:
                  type: string
                  enum:
                    - ask_before_acting
                    - act_within_scope
                    - full_autonomy
                  description: Controls agent autonomy. Omit for no change.
      responses:
        '200':
          description: Agent updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          description: Not authenticated
        '403':
          description: Requires user role
        '404':
          description: Agent not found
        '409':
          description: Agent is running
      security:
        - bearerAuth: []
components:
  schemas:
    Agent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        agent_id:
          type: string
          description: Unique slug identifier (lowercase, alphanumeric, hyphens)
          pattern: ^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$
        name:
          type: string
        description:
          type: string
        tools_config:
          type: object
        cpus:
          type: string
          default: '1.0'
        mem_limit:
          type: string
          default: 1g
        pids_limit:
          type: integer
          default: 200
        soul_md:
          type: string
        rules_md:
          type: string
        autonomy_level:
          type: string
          enum:
            - ask_before_acting
            - act_within_scope
            - full_autonomy
          default: act_within_scope
          description: Controls how much freedom the agent has when executing commands.
        status:
          type: string
          enum:
            - stopped
            - running
            - error
        container_id:
          type: string
          nullable: true
        model_policy_id:
          type: string
          format: uuid
          nullable: true
          description: Internal policy reference used by backend model-router plumbing.
        model_policy_name:
          type: string
          nullable: true
          description: Human-readable name of the model policy (resolved via JOIN).
        models:
          type: array
          items:
            type: string
          description: User-facing model names assigned to this agent.
        skills:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              scope:
                type: string
                enum:
                  - container_local
                  - host_docker
                  - vps_system
              tools:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    name:
                      type: string
                    description:
                      type: string
                    install_method:
                      type: string
                      enum:
                        - builtin
                        - apt
                        - binary
          description: Skills assigned to this agent.
        container_profile_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            FK to container_profiles table. Determines Docker image for the
            agent container.
        container_profile:
          type: object
          nullable: true
          description: Resolved container profile object (from LEFT JOIN).
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            docker_image:
              type: string
        error_message:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: string
        principal_id:
          type: string
          format: uuid
          description: >-
            Stable principal identifier (equals agent UUID). AI-115 workload
            principal model.
        principal_type:
          type: string
          enum:
            - agent
          description: Formal principal type. Always 'agent' for workload principals.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````