Agents API

Dataworkz Agents API

Dataworkz Agents are powerful systems that bring together data from multiple systems via tools and leveraging a declarative mechanism to build Agents, can be used as a powerful Agentic RAG system. The API allows you to integrate Agents into any system.

Note: All API calls require an API Token. Please follow these steps to generate an API Key. The API Key has to be provided in the Authorizationheader in the format SSWS <your api key>

Concepts

Dataworkz Agents provide a stateless API that consumes the conversation history so far and responds to the user's question/text appropriately. Agents need to be built and saved in Dataworkz using the AgentBuilder. You can get the agentId from the Agent card in the product UI.

API

Get a list of all agents in this account

get

Get a list of all agents in this account - id, name, description

Authorizations
AuthorizationstringRequired

Token

Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

application/json
Responsestring
get
/agents/v1/
200

successful operation

Deprecated

[DEPRECATED] Get the agent's response to user text

post

For the given agent specified by the agentId, get the agent's response for the user's text and the conversation history.

Note: This invocation is stateless and does not integrate with Dataworkz's Conversation Store. This API is expected to be deprecated within a few releases. Look at the A2A APIs instead.

Request Body:

The request body has to be a json object with keys - conversationHistory, contextValues (optional). conversationHistory: list object to pass conversation history between user and AI. Each object in the list follows the format - { "by": "AI", "text": "Hi" } or { "by": "USER", "text": "Hi" } contextValues: Any context values if present can be passed - { "contextValueName": contextValue }

Note: This endpoint is deprecated - Take a look at 'The A2A streaming response endpoint of the Agent' for the supported way to invoke an Agent.

Authorizations
AuthorizationstringRequired

Token

Path parameters
agentIdstringRequired

Id of the Agent in the system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Query parameters
userTextstringRequired

The last text from the user. Must be url encoded.

Example: What is the status of the order?
llmProviderIdstringRequired

Id of the LLM to use for the agent. This must be one of the LLMs configured in this account. Currently, gpt-4 and llama3-70B models are supported. Id can be copied from the LLM Configuration page.

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
propertiesstringOptional

Any additional properties to be passed to influence execution

Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Body
objectOptional
Responses
chevron-right
200

successful operation. The agent's response is available in 'answer'. If structuredResponse is configured then it is available in the key 'structuredResponse'. Probe is returned in the 'probe'.

application/json
Responseobject
post
/agents/v1/{agentId}/response
200

successful operation. The agent's response is available in 'answer'. If structuredResponse is configured then it is available in the key 'structuredResponse'. Probe is returned in the 'probe'.

Get LLM providers configured in Dataworkz

get

Returns a map containing unique identifier and LLM models that have been configured

Authorizations
AuthorizationstringRequired

Token

Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

successful operation

application/json
Responseobject
get
/agents/v1/llm-providers
200

successful operation

Get the A2A Agent Card for a specific agent

get

Get the A2A Agent Card for a specific agent. The Agent Card details are available in the A2A specificationarrow-up-right.

Authorizations
AuthorizationstringRequired

Token

Path parameters
agentIdstringRequired
Responses
chevron-right
200

OK

application/json
get
/agents/v1/a2a/{agentId}/.well-known/agent.json
200

OK

Get the A2A Agent Card for a specific agent

get

Get the A2A Agent Card for a specific agent. The Agent Card details are available in the A2A specificationarrow-up-right

Authorizations
AuthorizationstringRequired

Token

Path parameters
agentIdstringRequired
Header parameters
AuthorizationanyOptional

For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '

Responses
chevron-right
200

OK

application/json
get
/agents/v1/a2a/{agentId}/.well-known/agent-card.json
200

OK

The A2A streaming response endpoint of the Agent

post

Sends a message to an agent to initiate/continue a task AND subscribes the client to real-time updates for that task via Server-Sent Events (SSE). Refer to the A2A specificationarrow-up-right for details.

Supported Extensions:

  • Refer to thisarrow-up-right for details on how extensions are activated.

  • To activate an extension you MUST send its URI in an HTTP Header named X-A2A-Extensions.

Send Context Variables

Dataworkz A2A Agents API supports an A2A extension to send context values for an agent invocation. This might change in the future as the spec evolves. To use this extension you must -

  • activate this extension by sending a header in your request - X-A2A-Extensions: https://dataworkz.com/agents/ext/provided-values/v1.

  • The context values should be present in the input Message in a DataPart as a Json Object with keys as the variable names and the values as their value (see example below).

  • Metadata for the Part must include the URI https://dataworkz.com/agents/ext/provided-values/v1 : true

Here's an example of a Part definition for sending context values

{
  "kind": "data",
  "metadata": { "https://dataworkz.com/agents/ext/provided-values/v1": true },
  "data": {
    "context-var": "value",
    "context-var-2": { ... value ... }
  }
}

Response

Agent Response : The Agent's Response is available in an Server-Sent Event of kind : status-update where status: is of state: completed. Basically, only events that are final events can have the agent response - successful or failure. Here's an example -

Task Updates : The Agent system emits Server-Sent Events as it progresses through the Agent Execution. These are available as DataParts and they are marked with this metadata "type": "DW_STATUS_UPDATE".

Authorizations
AuthorizationstringRequired

Token

Path parameters
agentIdstringRequired

Id of the Agent in the system

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
Query parameters
llmIdstringOptional

Id of the LLM to use for the agent. This must be one of the LLMs configured in this account. Id can be copied from the LLM Configuration page or retrieved by a call to the llm-providers endpoint. If not provided, the llmId configured in the agent is used, if that's not present then the llm marked default in LLM Configurations is used. If not LLM Id is found, the request will fail.

Example: 3756809c-4032-4e48-b3f0-2a6d30a03a54
propertiesstringOptional

Any additional properties to be passed to influence execution

Body
jsonrpcstringOptional
idobjectOptional
methodstringOptional
paramsobjectOptional
Responses
chevron-right
200

OK

post
/agents/v1/a2a/{agentId}/stream
200

OK

Last updated