API Endpoints

This document provides a comprehensive list of AgenticAPI endpoints, detailing their paths, supported methods (custom verbs and REST aliases), and purposes. Each endpoint is documented with OpenAPI schema excerpts, enabling developers to understand the API’s structure and integrate it into their applications. The endpoints support action-oriented verbs (e.g., SUMMARIZE, FETCH) and REST-compatible methods (e.g., POST) for compatibility.

Endpoint Overview #

AgenticAPI includes endpoints for individual actions and orchestration, with custom verbs as primary methods and REST aliases for traditional clients. Below are the core endpoints, with planned expansions in v0.4.0 (e.g., DISCOVER /actions).

/document #

  • Purpose: Summarize documents or content using the SUMMARIZE verb.
  • Methods: SUMMARIZE, POST (alias)
  • OpenAPI Schema:
YAML
paths:
  /document:
    summarize:
      x-action: summarize
      x-category: compute
      summary: Summarize a document
      operationId: summarizeDocument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                document_id:
                  type: string
                  description: Unique document identifier
                format:
                  type: string
                  enum: [text, bullets]
                  default: text
                max_words:
                  type: integer
                  default: 50
                style:
                  type: string
                  enum: [neutral, formal, casual]
                  default: neutral
                output_format:
                  type: string
                  enum: [json, text]
                  default: json
              required: [document_id]
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      summary:
                        type: string
                      title:
                        type: string
                  used_fallback:
                    type: boolean
    post:
      summary: Summarize a document (POST alias)
      operationId: summarizeDocumentPost
      x-alias-for: SUMMARIZE /document
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SummarizeQuery'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummarizeResponse'

/fetch #

  • Purpose: Retrieve specific data using the FETCH verb.
  • Methods: FETCH, POST (alias)
  • OpenAPI Schema:
YAML
paths:
  /fetch:
    fetch:
      x-action: fetch
      x-category: acquire
      summary: Retrieve a document or resource
      operationId: fetchDocument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                document_id:
                  type: string
                output_format:
                  type: string
                  enum: [json, text]
                  default: json
              required: [document_id]
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      content:
                        type: string
                      title:
                        type: string
                  used_fallback:
                    type: boolean
    post:
      summary: Retrieve a document (POST alias)
      operationId: fetchDocumentPost
      x-alias-for: FETCH /fetch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchQuery'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchResponse'

/notify #

  • Purpose: Send notifications using the NOTIFY verb.
  • Methods: NOTIFY, POST (alias)
  • OpenAPI Schema:
YAML
paths:
  /notify:
    notify:
      x-action: notify
      x-category: communicate
      summary: Send a notification to a recipient
      operationId: notifyUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                recipient:
                  type: string
                message:
                  type: string
                channel:
                  type: string
                  enum: [email, sms]
                  default: email
                priority:
                  type: string
                  enum: [normal, high]
                  default: normal
                output_format:
                  type: string
                  enum: [json, text]
                  default: json
              required: [recipient, message]
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      status:
                        type: string
                      recipient:
                        type: string
                      message:
                        type: string
                  used_fallback:
                    type: boolean
    post:
      summary: Send a notification (POST alias)
      operationId: notifyUserPost
      x-alias-for: NOTIFY /notify
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotifyQuery'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotifyResponse'

/chain #

  • Purpose: Orchestrate multiple verbs in a workflow using the POST method.
  • Methods: POST
  • OpenAPI Schema:
YAML
paths:
  /chain:
    post:
      x-action: chain
      x-category: orchestrate
      summary: Execute a sequence of action verbs
      operationId: chainVerbs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chain:
                  type: array
                  items:
                    type: object
                    properties:
                      verb:
                        type: string
                        enum: [SUMMARIZE, FETCH, NOTIFY]
                      path:
                        type: string
                      params:
                        type: object
                    required: [verb, path, params]
              required: [chain]
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        step:
                          type: object
                        result:
                          type: object
                        error:
                          type: string

Notes #

  • Custom Verbs: SUMMARIZE, FETCH, NOTIFY are implemented as custom HTTP methods, with POST aliases for REST compatibility.
  • Orchestration: /chain uses POST to execute verb sequences, planned for expansion in v0.4.0.
  • OpenAPI Extensions: x-action and x-category annotate verbs for discoverability.

Next Steps #

What are your feelings
Updated on May 29, 2025