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

> ## Agent Instructions
> Company name is Akhara AI (never Rubric AI). Keep lowercase rubric/rubrics only when meaning grading criteria.
> Expert Review (docs path talent/) is enterprise BYO experts for audit and review: invite customer specialists; do not pitch Akhara recruiting or a public expert career portal. RLHF and domain writing are secondary work types.
> Prefer concrete API examples against public hosts: Environments eval API https://agi.akhara.ai, Control plane PDP https://api.akhara.dev, Evaluation https://app.akhara.ai / https://api.akhara.ai, Expert Review portal https://talent.akhara.ai.
> Do not invent a public hostname for private orchestrators or env API internals.
> Do not confuse control-plane latches with Environments confirmation latches.
> Environments SDK/API examples: curl against https://agi.akhara.ai. Evaluation SDK: from akhara import Akhara and AKHARA_API_KEY.
> Start with /llms.txt for the docs index and OpenAPI links; fetch individual pages as .md exports.

# Attach policies

> Sets the agent's attached policyIds. The effective set is these plus the always-on enterprise baseline.

Sets the agent's attached `policyIds`. The effective set the PDP evaluates is
these plus the always-on enterprise baseline (`latch-0 … latch-5`). See
[Policies](/control-plane/onboarding/policies).


## OpenAPI

````yaml control-plane/api-reference/openapi.json PUT /api/agents/{id}/policies
openapi: 3.1.0
info:
  title: Akhara Control Plane API
  version: 1.0.0
  description: >-
    The Policy Decision Point (PDP) API. Enforcement clients call
    `/api/policy/authorize`; the management endpoints onboard agents, attach
    policies, and read the evidence trail.
servers:
  - url: https://api.akhara.dev
    description: Production PDP API
  - url: https://console.akhara.dev
    description: Managed console
security:
  - apiKey: []
paths:
  /api/agents/{id}/policies:
    put:
      tags:
        - Agents
      summary: Attach policies to an agent
      description: >-
        Sets the agent's attached policyIds. The effective set is these plus the
        always-on enterprise baseline.
      operationId: setAgentPolicies
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: support-ai
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                policyIds:
                  type: array
                  items:
                    type: string
              required:
                - policyIds
            example:
              policyIds:
                - pci-0
                - reliability-3
      responses:
        '200':
          description: The updated agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
components:
  schemas:
    Agent:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        source:
          type: string
          enum:
            - builtin
            - url
            - github
            - fork
        status:
          type: string
        baseUrl:
          type: string
        apiKeyMasked:
          type: string
          example: ak_live_••••4f2a
        categories:
          type: array
          items:
            type: string
        tools:
          type: array
          items:
            type: string
        policyIds:
          type: array
          items:
            type: string
        runtime:
          $ref: '#/components/schemas/Runtime'
        createdAt:
          type: integer
        updatedAt:
          type: integer
    Runtime:
      type: object
      properties:
        status:
          type: string
        boundary:
          type: string
          example: android-emulator
        env:
          type: object
          additionalProperties:
            type: string
          example:
            GATEWAY: https://api.akhara.dev
        provisionedAt:
          type: integer
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Workspace API key (ak_live_…).

````