ai.gent.dev API Docs

Create ai.gent

POST /api/aigents

Creates a new aigent.

Request Body

{
    "name": "string",
    "description": "string",
    "type": "string",
    "version": number,
    "subtasks": [{
        "id": "string",
        "name": "string",
        "description": "string",
        "requiredCapability": "CapabilityKey",
        "order": number,
        "inputMapping": Record,
        "outputMapping": Record,
        "config": Record
    }],
    "customPrompt": "string",
    "outputSchema": Record
}

Execute aigent

POST /api/aigents/:aigentId/execute

Executes aigent tasks with the specified input data.

Parameters

aigentId - The ID of the aigent to execute

Request Body

{
    "input": {
        // aigent-specific input data
    }
}

Response

{
    "taskId": "string",
    "status": "pending" | "in_progress" | "completed" | "failed",
    "results": {
        // Subtask results mapped according to outputMapping
    }
}

aigent Execution Flow

When an aigent is executed:

  1. A parent task is created with AIGENT_EXECUTION capability
  2. Each subtask is processed in order according to their defined order
  3. Input data is mapped using inputMapping configuration
  4. Capabilities are executed for each subtask
  5. Results are collected and mapped using outputMapping

Available Capabilities