Skip to main content
POST
/
customAgents
/
api
/
v1
Create a Custom Agent
curl --request POST \
  --url https://be.datagol.ai/customAgents/api/v1 \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --data '
{
  "uiMetadata": {
    "capabilities": {
      "models": {
        "enabled": true,
        "supportedModels": [
          "gpt-5.2",
          "vertex_ai/claude-opus-4-7",
          "claude-sonnet-4-6",
          "claude-haiku-4-5-20251001",
          "o4-mini"
        ],
        "defaultValue": "gpt-5.2"
      },
      "allowDownload": true,
      "conversationFiles": {
        "enabled": true
      }
    },
    "style": {
      "logo": {
        "bgColor": "",
        "textColor": ""
      }
    },
    "input": {
      "placeholder": "What is EBITDA? And How Its Calculated"
    },
    "bestFor": [],
    "conversationStarters": [],
    "logo": null
  },
  "configs": {
    "mcpConfigs": [
      {
        "id": 18,
        "name": "Workspace MCP",
        "description": "",
        "url": "https://testing-mcp.datagol.ai/workspace/link-v2?workspace_id=a336506d-540e-4a78-809b-daf501687bca&token=<token>",
        "transport": "streamable_http",
        "serverType": "CUSTOM",
        "companyId": 1
      },
      {
        "id": 35,
        "name": "New MCP Server",
        "description": "",
        "url": "Financial Sub Agent",
        "transport": "streamable_http",
        "serverType": "CUSTOM",
        "companyId": 1
      },
      {
        "serverType": "WORKBOOK",
        "name": "dg_Order.csv",
        "description": "",
        "url": "",
        "transport": "streamable_http",
        "data": {
          "id": "ca45078d-ed26-4752-a7a7-4aed24af033c",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53"
        }
      },
      {
        "serverType": "WORKBOOK",
        "name": "Install Metrics",
        "description": "",
        "url": "",
        "transport": "streamable_http",
        "data": {
          "id": "3095f6c0-b399-4e0f-b367-7db38b0a8453",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53"
        }
      }
    ],
    "connectors": [
      {
        "id": "ec345675-06bf-4133-b8c3-f8fc1934b839",
        "type": "WORKBOOK_RAG",
        "sourceType": "BACKEND",
        "data": {
          "title": "dg_order_item.csv",
          "description": "",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
          "workspaceName": "Link_v2"
        }
      },
      {
        "id": "753bd2d1-3426-41f2-b78d-a24a5a4cb0dd",
        "type": "WORKBOOK_RAG",
        "sourceType": "BACKEND",
        "data": {
          "title": "dg_customer.csv",
          "description": "",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
          "workspaceName": "Link_v2"
        }
      },
      {
        "id": "ca45078d-ed26-4752-a7a7-4aed24af033c",
        "type": "WORKBOOK_RAG",
        "sourceType": "BACKEND",
        "data": {
          "title": "dg_Order.csv",
          "description": "",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
          "workspaceName": "Link_v2"
        }
      },
      {
        "id": "aff24e82-564b-468a-9727-392a08f017bc",
        "type": "WORKBOOK_RAG",
        "sourceType": "BACKEND",
        "data": {
          "title": "dg_products.csv",
          "description": "",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
          "workspaceName": "Link_v2"
        }
      },
      {
        "id": "3095f6c0-b399-4e0f-b367-7db38b0a8453",
        "type": "WORKBOOK_RAG",
        "sourceType": "BACKEND",
        "data": {
          "title": "Install Metrics",
          "description": "",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
          "workspaceName": "Link_v2"
        }
      },
      {
        "id": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
        "type": "WORKSPACE_DOCUMENTS",
        "sourceType": "BACKEND",
        "data": {
          "name": "Link_v2"
        }
      },
      {
        "id": "bca6c483-9205-4724-81e3-f4340b79efbc",
        "type": "KNOWLEDGE_BASE",
        "sourceType": "BACKEND",
        "data": {
          "id": "bca6c483-9205-4724-81e3-f4340b79efbc",
          "companyId": 1,
          "userId": 371,
          "type": "GOOGLE_DRIVE",
          "name": "Mahi Changes Verifications",
          "status": "ACTIVE",
          "lastSyncAt": "2026-05-01T18:56:45.544+0000",
          "lastSyncStatus": "SUCCESS",
          "sourceId": null,
          "credentialId": 7219087,
          "activeConfig": null,
          "latestRun": {
            "id": "036f1723-1b57-4e06-9295-17bb24fdbd58",
            "connectorId": "bca6c483-9205-4724-81e3-f4340b79efbc",
            "runType": "INCREMENTAL",
            "status": "SUCCESS",
            "temporalWorkflowId": "kb-sync-036f1723-1b57-4e06-9295-17bb24fdbd58",
            "startedAt": "2026-05-01T18:56:44.855+0000",
            "finishedAt": "2026-05-01T18:56:45.543+0000",
            "errorMessage": null,
            "statsJson": {},
            "checkpointJson": null
          }
        }
      },
      {
        "id": "5ef264c5-4194-4c62-a2bc-fddc2a431530",
        "type": "KNOWLEDGE_BASE",
        "sourceType": "BACKEND",
        "data": {
          "id": "5ef264c5-4194-4c62-a2bc-fddc2a431530",
          "companyId": 1,
          "userId": 588,
          "type": "WEB",
          "name": "DataGolTest",
          "status": "ACTIVE",
          "lastSyncAt": "2026-05-07T10:00:00.116+0000",
          "lastSyncStatus": "SUCCESS",
          "sourceId": null,
          "credentialId": null,
          "activeConfig": null,
          "latestRun": {
            "id": "1529e2e9-89fd-4991-947f-8dcf8a55e8cb",
            "connectorId": "5ef264c5-4194-4c62-a2bc-fddc2a431530",
            "runType": "INCREMENTAL",
            "status": "SUCCESS",
            "temporalWorkflowId": "kb-sync-1529e2e9-89fd-4991-947f-8dcf8a55e8cb",
            "startedAt": "2026-05-07T09:58:14.174+0000",
            "finishedAt": "2026-05-07T10:00:00.116+0000",
            "errorMessage": null,
            "statsJson": {
              "total": 49,
              "failed": 0,
              "completed": 49
            },
            "checkpointJson": null
          }
        }
      },
      {
        "id": "315",
        "type": "CONNECTOR",
        "sourceType": "AI"
      }
    ],
    "webSearchEnabled": true,
    "skillIds": [
      10,
      11
    ]
  },
  "isPublished": false,
  "prompt": "Scan this document and extract all key metrics, numbers, and quantitative statements (such as revenue, costs, growth rates, counts, targets, and timelines). Organize them into a structured table with columns for metric name, value, unit, date or period, and a short description of what the metric represents. If there are assumptions or caveats around specific numbers, briefly note those as well.",
  "description": "This Agent Details you through the Complete financial related Data",
  "name": "Financial Agent"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "prompt": "<string>",
  "instructions": "<string>",
  "examples": "<string>",
  "isPublished": true,
  "skills": [
    {
      "id": 10,
      "name": "chart-visualization",
      "description": "Read this skill when asked for a dashboard or a chart.",
      "s3Url": "InnCreTech/skills/10/3af838c6-01de-498d-8937-4f774b0983cd/SKILL.md",
      "enabled": true
    }
  ],
  "uiMetadata": {
    "capabilities": {
      "allowDownload": true,
      "models": {
        "enabled": true,
        "supportedModels": [
          "gpt-5.2",
          "claude-sonnet-4-6",
          "o4-mini"
        ],
        "defaultValue": "gpt-5.2"
      },
      "conversationFiles": {
        "enabled": true
      }
    },
    "style": {
      "logo": {
        "bgColor": "#1a1a2e",
        "textColor": "#ffffff"
      }
    },
    "input": {
      "placeholder": "What is EBITDA? And How Its Calculated"
    },
    "bestFor": [
      "Financial Analysis",
      "P&L Reports"
    ],
    "conversationStarters": [
      "What is EBITDA?",
      "Show me Q1 revenue"
    ],
    "logo": "<unknown>"
  },
  "configs": {
    "connectors": [
      {
        "id": "ec345675-06bf-4133-b8c3-f8fc1934b839",
        "data": {
          "title": "dg_order_item.csv",
          "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53",
          "workspaceName": "Link_v2",
          "description": ""
        }
      }
    ],
    "webSearchEnabled": true,
    "mcpConfigs": [
      {
        "CUSTOM": {
          "id": 18,
          "name": "Workspace MCP",
          "description": "",
          "url": "https://testing-mcp.datagol.ai/workspace/link-v2?workspace_id=a336506d-540e-4a78-809b-daf501687bca&token=<token>",
          "transport": "streamable_http",
          "serverType": "CUSTOM",
          "companyId": 1
        },
        "WORKBOOK": {
          "serverType": "WORKBOOK",
          "name": "dg_Order.csv",
          "description": "",
          "url": "",
          "transport": "streamable_http",
          "data": {
            "id": "ca45078d-ed26-4752-a7a7-4aed24af033c",
            "workspaceId": "055b4db3-96e1-45e1-8ff5-3a911b779a53"
          }
        }
      }
    ],
    "skillIds": [
      10,
      11
    ]
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-auth-token
string
header
required

For server-to-server or automated access, use a DataGOL Service Account key. Pass it via the x-auth-token header instead of Authorization: x-auth-token: <service-account-key>

Body

application/json
uiMetadata
object
required
configs
object
required
isPublished
boolean
required

false = draft, creator only. true = published, shared users can access.

Example:

false

prompt
string
required

System prompt injected at the start of every conversation. The core instruction set — be specific about role, output format, and behavior.

Example:

"Scan this document and extract all key metrics, numbers, and quantitative statements. Organize them into a structured table."

description
string
required

Short description of what the agent does. Shown in the agent card.

Example:

"This Agent Details you through the Complete financial related Data"

name
string
required

Display name of the agent. Shown in the agent list and chat header.

Example:

"Financial Agent"

Response

Agent created successfully.

id
string<uuid>
name
string
description
string
prompt
string
instructions
string
examples
string
isPublished
boolean
skills
object[]
uiMetadata
object
configs
object
createdAt
string<date-time>
updatedAt
string<date-time>