Skip to content

Latest commit

 

History

History
389 lines (266 loc) · 14.3 KB

File metadata and controls

389 lines (266 loc) · 14.3 KB

QuantClient\AIAgentsApi

All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path.

Method HTTP request Description
chatWithAIAgent() POST /api/v3/organizations/{organisation}/ai/agents/{agentId}/chat Chat with AI Agent
createAIAgent() POST /api/v3/organizations/{organisation}/ai/agents Create AI Agent
deleteAIAgent() DELETE /api/v3/organizations/{organisation}/ai/agents/{agentId} Delete Agent
getAIAgent() GET /api/v3/organizations/{organisation}/ai/agents/{agentId} Get Agent Details
listAIAgents() GET /api/v3/organizations/{organisation}/ai/agents List AI Agents
updateAIAgent() PUT /api/v3/organizations/{organisation}/ai/agents/{agentId} Update Agent

chatWithAIAgent()

chatWithAIAgent($organisation, $agent_id, $chat_with_ai_agent_request): \QuantClient\Model\ChatWithAIAgent200Response

Chat with AI Agent

Initiates a chat session with a specific AI agent. The agent's configuration (system prompt, temperature, model, allowed tools) is automatically applied. * * Key Features: * - Session Management: Automatic session creation and state tracking * - Multi-turn Conversations: Full conversation history maintained server-side * - Agent's system prompt is prepended to conversation * - Only agent's allowed tools are available * - All tools are auto-executed on cloud (no client confirmation needed) * - Temperature and model from agent config * - Supports sync, streaming, and async modes * * Execution Modes: * - Sync Mode (default): Standard JSON response, waits for completion * - Streaming Mode: Set stream: true for SSE token-by-token responses * - Async Mode: Set async: true for long-running tasks with polling * * Async/Durable Mode (async: true): * - Returns immediately with requestId and pollUrl (HTTP 202) * - Uses AWS Lambda Durable Functions for long-running agent tasks * - All tools are auto-executed on cloud (no waiting_callback state) * - Poll /ai/chat/executions/{requestId} for status * - Ideal for agents with slow tools (image generation, web search, etc.) * * Session Support: * - Omit sessionId to create a new session automatically * - Include sessionId to continue an existing conversation * - Sessions expire after 60 minutes of inactivity * - Sessions work in all modes (sync, streaming, async) * - Use /sessions/{sessionId} to retrieve full conversation history

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | The agent ID
$chat_with_ai_agent_request = new \QuantClient\Model\ChatWithAIAgentRequest(); // \QuantClient\Model\ChatWithAIAgentRequest

try {
    $result = $apiInstance->chatWithAIAgent($organisation, $agent_id, $chat_with_ai_agent_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIAgentsApi->chatWithAIAgent: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
agent_id string The agent ID
chat_with_ai_agent_request \QuantClient\Model\ChatWithAIAgentRequest

Return type

\QuantClient\Model\ChatWithAIAgent200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createAIAgent()

createAIAgent($organisation, $create_ai_agent_request): \QuantClient\Model\CreateAIAgent201Response

Create AI Agent

Creates a new AI agent with specific configuration, system prompt, and tool permissions. * * Agent Configuration: * - System Prompt: Instructions that guide the agent's behavior * - Model: Which foundation model to use (e.g., 'amazon.nova-pro-v1:0') * - Temperature: Creativity level (0-1) * - Allowed Tools: Which tools the agent can auto-execute * - Allowed Collections: Vector DB collections for RAG * - Group: Optional categorization (e.g., 'development', 'compliance') * * Auto-Execution: * All tools are automatically executed when an agent requests them (no client confirmation needed).

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$create_ai_agent_request = new \QuantClient\Model\CreateAIAgentRequest(); // \QuantClient\Model\CreateAIAgentRequest

try {
    $result = $apiInstance->createAIAgent($organisation, $create_ai_agent_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIAgentsApi->createAIAgent: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
create_ai_agent_request \QuantClient\Model\CreateAIAgentRequest

Return type

\QuantClient\Model\CreateAIAgent201Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAIAgent()

deleteAIAgent($organisation, $agent_id): \QuantClient\Model\DeleteAIAgent200Response

Delete Agent

Permanently deletes an AI agent. This action cannot be undone.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | The agent ID

try {
    $result = $apiInstance->deleteAIAgent($organisation, $agent_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIAgentsApi->deleteAIAgent: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
agent_id string The agent ID

Return type

\QuantClient\Model\DeleteAIAgent200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAIAgent()

getAIAgent($organisation, $agent_id): \QuantClient\Model\GetAIAgent200Response

Get Agent Details

Retrieves detailed configuration for a specific AI agent.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | The agent ID

try {
    $result = $apiInstance->getAIAgent($organisation, $agent_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIAgentsApi->getAIAgent: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
agent_id string The agent ID

Return type

\QuantClient\Model\GetAIAgent200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAIAgents()

listAIAgents($organisation, $group): \QuantClient\Model\ListAIAgents200Response

List AI Agents

Lists all AI agents for an organization. Agents are pre-configured AI assistants with specific system prompts, model settings, and tool permissions. * * Features: * - Filter by group (e.g., 'development', 'compliance') * - Organization-scoped * - Returns agent configurations without execution history

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$group = 'group_example'; // string | Optional group filter (e.g., 'development', 'compliance')

try {
    $result = $apiInstance->listAIAgents($organisation, $group);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIAgentsApi->listAIAgents: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
group string Optional group filter (e.g., 'development', 'compliance') [optional]

Return type

\QuantClient\Model\ListAIAgents200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAIAgent()

updateAIAgent($organisation, $agent_id, $update_ai_agent_request): \QuantClient\Model\UpdateAIAgent200Response

Update Agent

Updates an existing AI agent configuration. All fields except agentId, organizationId, createdAt, and createdBy can be updated.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIAgentsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$agent_id = 'agent_id_example'; // string | The agent ID
$update_ai_agent_request = new \QuantClient\Model\UpdateAIAgentRequest(); // \QuantClient\Model\UpdateAIAgentRequest

try {
    $result = $apiInstance->updateAIAgent($organisation, $agent_id, $update_ai_agent_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIAgentsApi->updateAIAgent: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
agent_id string The agent ID
update_ai_agent_request \QuantClient\Model\UpdateAIAgentRequest

Return type

\QuantClient\Model\UpdateAIAgent200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]