Skip to main content

Overview

DataGOL Custom Agents are fully configurable AI assistants that combine your company’s data sources (workspaces, knowledge bases, connectors), external tools (MCP servers), sub-agents, and voice capabilities into a single deployable interface. The lifecycle of a Custom Agent is organized into the following groups:

Create Agent

1

Create Agent

POST /customAgents/api/v1 — define the agent’s identity, data connectors, MCP tools, and UI behavior. Returns the agentId used in every subsequent call.

Create a thread

1

Create a thread

POST /ai/api/v2/conversations — create the conversation record, embedding the agent ID, selected model, and scope (PRIVATE / SHARED). Returns the conversationId required for streaming.

Converse

1

Stream Messages

POST /ai/api/v2/messages/streaming — send the user message and receive the agent’s SSE-streamed response. Pass selectedLlmModel to switch models per message.

Sharing and Permissions

1

Fetch Agent Permissions

GET /noCo/api/v2/elementPermissions/CUSTOM_AGENT/{agentId} — verify who currently has access to the agent.
2

List Team Members

GET /idp/api/v1/team — fetch the full team roster to populate the share dialog with user IDs and display names.
3

Share Team Members

POST /noCo/api/v2/elementPermissions/bulk — grant CREATOR, EDITOR, or VIEWER access to selected team members by userId.

Misc

1

Generate Conversation Name

POST /ai/api/v1/builder/chat/complete?resourceType=CUSTOM_AGENT&resourceId={agentId} — called client-side when the user types their first message. Uses gpt-4o-mini + a tool call to produce a concise 5-word conversation title before the conversation record is created.

Authentication

Every request to the DataGOL backend requires a signed JWT passed as a Bearer token.
Tokens are issued by the DataGOL Identity Provider (/idp) after login. They embed the user’s companyId, userId, roles, and permissions. Tokens are short-lived — refresh them before they expire.

Required headers for every request

Optional / contextual headers

Never include raw browser-only headers (sec-ch-ua, sec-fetch-*) in server-to-server calls. They are browser hints and will be ignored or may cause unexpected behavior.

Base URLs


Reference APIs

Supporting Lookups

Before creating an agent you will typically fetch the IDs you need:

GET List All Custom Agents

GET /customAgents/api/v1 Returns all Custom Agents accessible to the authenticated user within their company tenant. Response — array of agent summaries including id, name, description, isPublished, and configs.

GET Get Custom Agent by ID

GET /customAgents/api/v1/{agentId}
agentId
string (UUID)
required
The UUID of the Custom Agent returned from the create or list endpoint.

GET List All Workspaces

GET /noCo/api/v2/workspaces Returns all workspaces in the company tenant. Use id values as workspaceId in connector objects.

GET Search Workspaces and Workbooks

GET /noCo/api/v2/workspaces/search Used by the Knowledge Base section in the agent builder UI. Returns a flat list of all workbooks (type TABLE) across every workspace the authenticated user can access. Group the results by workspaceId / workspaceName to render the workspace → workbook tree shown in the UI.
This is the endpoint you should call when populating the workbook picker. Unlike GET /noCo/api/v2/workspaces (which returns workspace metadata only), this endpoint returns the individual workbooks inside each workspace in a single call.
Query parameters:
Response — flat array of workbook objects. Each item carries the parent workspaceId and workspaceName so you can group them client-side. Response item fields: Example response (trimmed):
To build the workspace → workbook tree, reduce the flat array by workspaceId:
The workbook id can then be used directly as the connector id in WORKBOOK_RAG objects.

GET List All Connectors

GET /connector/api/v1/instance Returns all AI connectors (type CONNECTOR / sourceType: AI) available to the tenant. Use connector id values in the configs.connectors array.

GET List Team Members

GET /idp/api/v1/team Returns all users in the company. Use userId values when sharing an agent.

GET List All Conversations

GET /ai/api/v2/conversations Returns the list of all conversations for the authenticated user.

POST Create Custom Agent

POST /customAgents/api/v1 Creates a fully configured Custom AI Agent. This is the most complex endpoint — every field is documented below.

uiMetadata — UI Presentation Layer

Controls how the agent looks and behaves in the DataGOL chat interface.
uiMetadata
object
required

configs — Agent Runtime Configuration

The configs object is the brain of the agent — it defines every data source, tool, and capability the agent can access at runtime.
configs
object
required

Top-Level Fields

isPublished
boolean
required
Controls whether the agent is visible and usable by team members beyond the creator.
  • false — Draft mode. Only the creator can access it.
  • true — Published. Users with shared permissions can open and chat with the agent.
prompt
string
required
The system prompt injected at the start of every conversation with this agent. This is the core instruction set — be specific about role, output format, and behavior.Example:
description
string
required
A short human-readable description of what the agent does. Shown in the agent card in the UI.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"

Complete Request Example

Response


POST Share Agent (Bulk Permissions)

POST /noCo/api/v2/elementPermissions/bulk Grants one or more users access to a Custom Agent.
permissions
array
required
Array of permission grants to apply in a single atomic operation.

GET Custom Agent Permissions

GET /noCo/api/v2/elementPermissions/CUSTOM_AGENT/{agentId} Returns all users who have access to the specified agent and their permission levels.
agentId
string (UUID)
required
UUID of the Custom Agent.

POST Generate Conversation Name

POST /ai/api/v1/builder/chat/complete (AI Core service) Generates a concise conversation name based on the user’s first message. Called automatically after the first message is sent. Query params:
Request Body

POST Initiate Conversation

POST /ai/api/v2/conversations Opens a new conversation session backed by a Custom Agent. Returns a conversationId required for the streaming endpoint.
name
string
required
Display name for this conversation. Auto-generated by the naming API (step 3) or user-supplied.
active
boolean
required
Always true when creating a new conversation.
scope
string
required
Visibility of the conversation.
userId
integer
required
ID of the authenticated user creating the conversation. Must match the token’s userId claim.
agentType
string
required
Must be "CustomAgent" for custom agent conversations.
uiMetadata.parameters.customAgentId
string (UUID)
required
UUID of the Custom Agent that backs this conversation. Passed twice (at parameters and parameters.parameters) for backward compatibility.
uiMetadata.configuration.llmModel
string
required
Active LLM model for this conversation. Must be a value from uiMetadata.capabilities.models.supportedModels.
Response — returns a conversationId (UUID) used in the streaming endpoint.

POST Streaming Message

POST /ai/api/v2/messages/streaming (AI Core service) Sends a user message to the agent and streams the response as Server-Sent Events (SSE).
This endpoint hits ai.datagol.ai, not be.datagol.ai. Ensure your HTTP client supports streaming responses (SSE).
agentType
string
required
Must be "CustomAgent".
type
string
required
Must be "CustomAgent". (Duplicates agentType for routing purposes.)
conversationId
string (UUID)
required
The conversation ID returned by POST /ai/api/v2/conversations.
message
string
required
The user’s message text to send to the agent.
parameters.customAgentId
string (UUID)
required
UUID of the Custom Agent. Must match the agent that backs this conversation.
selectedLlmModel
string
required
The model to use for this specific message. Can be changed per message to switch models mid-conversation.
uiMetadata
object
Pass as { "parameters": {} } unless overriding model-level parameters.
Response — SSE stream of delta tokens and tool call events. Parse events with data: prefix.

GET Workspace by ID

GET /noCo/api/v2/workspaces/{workspaceId} Fetches workspace details scoped to the current Custom Agent. Called when a user opens the agent from the side panel to load context-specific workspace data. Query params:

Error Handling

All endpoints return standard HTTP status codes.

Connector Type Quick Reference


Model ID Reference