AI Agent APIs

AI Agent APIs enhance user interaction by providing intelligent automation and decision-making support. These APIs allow you to integrate AI-driven features into workflows such as automated approval, task assignments, and user interactions through chat-based interfaces.

Overview

Below are APIs for retrieving, creating, updating, deleting, and managing AI Agents, as well as handling workflows associated with them.

1. Get AI Agent

Retrieve a list of all AI Agents in the system.

  • Endpoint for Product: GET https://app-gateway.imbrace.co/v2/backend/templates

  • Endpoint for Demo: GET https://app-gateway.demo.imbrace.co/v2/backend/templates

  • Endpoint for Dev: GET https://app-gateway.dev.imbrace.co/v2/backend/templates

  • Headers:

    • Content-Type: application/json

    • x-access-token: Your Access TokenYour Access Token

  • Body:

  • Result:

    • Status code: 200 OK

    {
        "data": {
            "_id": "uc_71cfa689-ea47-46ce-9845-f6e1488a5a15",
            "doc_name": "UseCase",
            "title": "test1",
            "organization_id": "org_imbrace",
            "short_description": "",
            "type": "custom",
            "channel_id": "ch_6f4df538-ce1b-455f-b563-819880e17b9b",
            "features": [],
            "tags": [],
            "demo_url": "https://chat-widget.imbrace.co?channel_id=ch_6f4df538-ce1b-455f-b563-819880e17b9b",
            "suggestion_prompts": [],
            "supported_channels": [
                {
                    "title": "channel_",
                    "icon": "",
                    "_id": "68aed93be67d29aeadb2a87b"
                }
            ],
            "assistant_id": "853d4df5-f6aa-4367-9c4e-5bc366e9e566",
            "user_id": "u_ed1ffffc-73ca-4dc3-85fc-2c7da6c87b7a",
            "is_deleted": false,
            "updated_at": "2025-08-27T10:08:59.288Z",
            "how_it_works": [],
            "integrations": [],
            "createdAt": "2025-08-27T09:00:16.243Z",
            "updatedAt": "2025-08-27T10:08:59.289Z",
            "public_id": "f089b14c-ddf5-4e25-b79c-58e2b446d324",
            "created_at": "2025-08-27T09:00:16.243Z"
            }
        }
  • Example:

    curl --location 'https://app-gateway.imbrace.co/v2/backend/templates' \
    --header 'x-access-token: acc_3064efc7-4ccc-4b48-8ffa-50313e5b19df'

2. Get AI Agent by ID

Retrieve details of a specific AI Agent by its ID.

  • Endpoint for Product: GET https://app-gateway.imbrace.co/v2/backend/templates/{template_id}

  • Endpoint for Demo: GET https://app-gateway.demo.imbrace.co/v2/backend/templates/{template_id}

  • Endpoint for Dev: GET https://app-gateway.dev.imbrace.co/v2/backend/templates/{template_id}

  • Headers:

    • Content-Type: application/json

    • x-access-token: Your Access TokenYour Access Token

  • Result:

    • Status code: 200 OK

  • Example:

3. Create AI Agent

Create a new AI Agent with configuration details.

  • Endpoint for Product: POST https://app-gateway.imbrace.co/v2/backend/templates/custom

  • Endpoint for Demo: POST https://app-gateway.demo.imbrace.co/v2/backend/templates/custom

  • Endpoint for Dev: POST https://app-gateway.dev.imbrace.co/v2/backend/templates/custom

  • Headers:

    • Content-Type: application/json

    • x-access-token: Your Access TokenYour Access Token

  • Body:

  • Result:

    • Status code: 200 OK

    • Status code: 400 Bad Request

  • Example:

4. Update AI Agent

Update an existing AI Agent’s details.

  • Endpoint for Product: PATCH https://app-gateway.imbrace.co/v2/backend/templates/{template_id}/custom

  • Endpoint for Demo: PATCH https://app-gateway.demo.imbrace.co/v2/backend/templates/{template_id}/custom

  • Endpoint for Dev: PATCH https://app-gateway.dev.imbrace.co/v2/backend/templates/{template_id}/custom

  • Headers:

    • Content-Type: application/json

    • x-access-token: Your Access TokenYour Access Token

  • Body:

  • Result:

    • Status code: 200 OK

    • Status code: 404 Not Found

  • Example:

5. Delete AI Agent

Delete an AI Agent from the system.

  • Endpoint for Product: DELETE https://app-gateway.imbrace.co/v2/backend/templates/{template_id}

  • Endpoint for Demo: DELETE https://app-gateway.demo.imbrace.co/v2/backend/templates/{template_id}

  • Endpoint for Dev: DELETE https://app-gateway.dev.imbrace.co/v2/backend/templates/{template_id}

  • Headers:

    • Content-Type: application/json

    • x-access-token: Your Access TokenYour Access Token

  • Body:

  • Result:

    • Status code: 200 OK

  • Example:

6. Answer Question

Ask a question to an AI Agent and get an intelligent response using RAG (Retrieval-Augmented Generation).

  • Endpoint for Demo: POST https://aiv2.demo.imbrace.lan/api/v1/rag/answer_question

  • Endpoint for Dev: POST https://aiv2.dev.imbrace.lan/api/v1/rag/answer_question

  • Headers:

    • Content-Type: application/json

    • X-Api-Key: Bearer Your Access TokenYour Access Token

    • x-organization-id: Your organization ID

  • Body:

  • Result:

    • Status code: 200 OK

  • Example:

7. Get File by ID

Retrieve detailed information about a specific file by its ID.

  • Endpoint for Demo: GET https://aiv2.demo.imbrace.lan/api/v1/rag/files/{file_id}

  • Endpoint for Dev: GET https://aiv2.dev.imbrace.lan/api/v1/rag/files/{file_id}

  • Headers:

    • Content-Type: multipart/form-data

    • X-Api-Key: Bearer Your Access TokenYour Access Token

    • x-organization-id: Your organization ID

  • Path Parameters:

    • file_id: The ID of the file to retrieve

  • Result:

    • Status code: 200 OK

  • Example:

8. Upload File

Upload a file to an AI Agent's knowledge base for RAG (Retrieval-Augmented Generation).

  • Endpoint for Demo: POST https://aiv2.demo.imbrace.lan/api/v1/rag/files

  • Endpoint for Dev: POST https://aiv2.dev.imbrace.lan/api/v1/rag/files

  • Headers:

    • Content-Type: multipart/form-data

    • x-organization-id: Your organization ID

  • Body (Form Data):

    • file: The file to upload

    • text_input: Optional text input for additional context

  • Result:

    • Status code: 200 OK

  • Example:

9. Delete File

Delete a file from an AI Agent's knowledge base.

  • Endpoint for Demo: DELETE https://aiv2.demo.imbrace.lan/api/v1/rag/files/{file_id}

  • Endpoint for Dev: DELETE https://aiv2.dev.imbrace.lan/api/v1/rag/files/{file_id}

  • Headers:

    • Content-Type: multipart/form-data

    • x-organization-id: Your organization ID

  • Path Parameters:

    • file_id: The ID of the file to delete

  • Result:

    • Status code: 200 OK

  • Example:

10. Create Embedding

Create embeddings for board items data to enable AI-powered search and retrieval.

  • Endpoint for Demo: POST https://aiv2.demo.imbrace.lan/api/v1/embedding

  • Endpoint for Dev: POST https://aiv2.dev.imbrace.lan/api/v1/embedding

  • Headers:

    • Content-Type: application/json

    • X-Api-Key: Bearer Your Access TokenYour Access Token

    • x-organization-id: Your organization ID

  • Body:

  • Result:

    • Status code: 200 OK

  • Example:

11. Delete Embedding by Board ID

Delete embeddings associated with a specific board ID.

  • Endpoint for Demo: DELETE https://aiv2.demo.imbrace.lan/api/v1/embedding/board/{board_id}

  • Endpoint for Dev: DELETE https://aiv2.dev.imbrace.lan/api/v1/embedding/board/{board_id}

  • Headers:

    • Content-Type: application/json

    • X-Api-Key: Bearer Your Access TokenYour Access Token

    • x-organization-id: Your organization ID

  • Path Parameters:

    • board_id: The ID of the board to delete embeddings for

  • Body:

  • Result:

    • Status code: 200 OK

  • Example:

12. Delete Embedding by Board Item ID

Delete embeddings associated with a specific board item ID.

  • Endpoint for Demo: DELETE https://aiv2.demo.imbrace.lan/api/v1/embedding/{boarditem_id}

  • Endpoint for Dev: DELETE https://aiv2.dev.imbrace.lan/api/v1/embedding/{boarditem_id}

  • Headers:

    • Content-Type: application/json

    • X-Api-Key: Bearer Your Access TokenYour Access Token

    • x-organization-id: Your organization ID

  • Path Parameters:

    • boarditem_id: The ID of the board item to delete embeddings for

  • Body:

  • Result:

    • Status code: 200 OK

  • Example:

13. Get ECharts by Thread ID

Delete embeddings associated with a specific board item ID.

  • Endpoint for Demo: GET http://aiv2.demo.imbrace.lan/api/v1/rag/echarts/{thread_id}

  • Endpoint for Dev: GET https://aiv2.dev.imbrace.lan/api/v1/embedding/{thread_id}

  • Headers:

    • Content-Type: application/json

    • X-Api-Key: Bearer Your Access TokenYour Access Token

    • x-organization-id: Your organization ID

  • Path Parameters:

    • thread_id: The ID of the thread_id

  • Body:

  • Result:

    • Status code: 200 OK

  • Example:

Last updated