H Company Skills API

The Skills API from H Company — 2 operation(s) for skills.

OpenAPI Specification

h-company-skills-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Computer-Use Agents Skills API
  version: 1.0.0
servers:
- url: https://agp.eu.hcompany.ai
  description: Europe
  x-fern-server-name: Eu
- url: https://agp.hcompany.ai
  description: United States
  x-fern-server-name: Us
tags:
- name: Skills
paths:
  /api/v2/skills:
    post:
      tags:
      - Skills
      summary: Create Skill
      description: Create a skill. The ``h/`` namespace is reserved for built-in skills.
      operationId: create_skill_api_v2_skills_post
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Skill'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Skill'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Skills
      summary: List Skills
      description: List reserved + caller's org skills. Unauthenticated callers see reserved ``h/`` skills only.
      operationId: list_skills_api_v2_skills_get
      security:
      - HTTPBearer: []
      parameters:
      - name: name
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Case-insensitive substring match on skill name.
          title: Name
        description: Case-insensitive substring match on skill name.
      - name: search
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Case-insensitive match on skill name or description.
          title: Search
        description: Case-insensitive match on skill name or description.
      - name: page
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number (1-based)
          default: 1
          title: Page
        description: Page number (1-based)
      - name: size
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: Number of items per page
          default: 10
          title: Size
        description: Number of items per page
      - name: sort
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              enum:
              - created_at
              - -created_at
              - name
              - -name
              type: string
          - type: 'null'
          description: Sort by field
          default:
          - -created_at
          title: Sort
        description: Sort by field
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_Skill_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v2/skills/{name}:
    get:
      tags:
      - Skills
      summary: Get Skill
      description: Fetch by name; 404 if not visible. ``:path`` so slash-containing names round-trip.
      operationId: get_skill_api_v2_skills__name__get
      security:
      - HTTPBearer: []
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Skill'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Skills
      summary: Update Skill
      description: Replace a skill's content. ``name`` must match the URL identifier; renames are not supported.
      operationId: update_skill_api_v2_skills__name__put
      security:
      - HTTPBearer: []
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Skill'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Skill'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Skills
      summary: Patch Skill
      description: Partially update a skill; only provided fields change.
      operationId: patch_skill_api_v2_skills__name__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchSkill'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Skill'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Skills
      summary: Delete Skill
      description: 'Delete by name. Reserved rows: H employee only.'
      operationId: delete_skill_api_v2_skills__name__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
          title: Name
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Page_Skill_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Skill'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
      type: object
      required:
      - items
      - total
      - page
      title: Page[Skill]
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Skill:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: 'Unique name for this skill in your catalog. Format: lowercase ASCII letters, digits and hyphens; must start and end with alphanumeric; max 63 chars per segment; optional single ''org/'' namespace prefix (e.g. ''h/web-environment'').'
        description:
          type: string
          minLength: 1
          title: Description
          description: When to use this skill. The agent reads this to decide whether to load it.
        body:
          type: string
          minLength: 1
          title: Body
          description: Markdown instructions the agent loads when it uses the skill.
        source:
          anyOf:
          - type: string
          - type: 'null'
          title: Source
          description: Optional URL the content was sourced from.
        url_pattern:
          anyOf:
          - type: string
            maxLength: 1024
            minLength: 1
          - type: 'null'
          title: Url Pattern
          description: Optional regex hinting at URLs where this skill applies.
      type: object
      required:
      - name
      - description
      - body
      title: Skill
      description: A named, reusable instruction an agent can draw on during a session.
    PatchSkill:
      properties:
        description:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: Description
        body:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: Body
        source:
          anyOf:
          - type: string
          - type: 'null'
          title: Source
        url_pattern:
          anyOf:
          - type: string
            maxLength: 1024
            minLength: 1
          - type: 'null'
          title: Url Pattern
      type: object
      title: PatchSkill
      description: Partial skill update.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer