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 - id, name, description
Token
For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
successful operation
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.
Token
Id of the Agent in the system
3756809c-4032-4e48-b3f0-2a6d30a03a54The last text from the user. Must be url encoded.
What is the status of the order?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.
3756809c-4032-4e48-b3f0-2a6d30a03a54Any additional properties to be passed to influence execution
For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
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'.
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'.
Returns a map containing unique identifier and LLM models that have been configured
Token
For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
successful operation
successful operation
Get the A2A Agent Card for a specific agent. The Agent Card details are available in the A2A specification.
Token
OK
OK
Get the A2A Agent Card for a specific agent. The Agent Card details are available in the A2A specification
Token
For Dataworkz API Token use the format 'SSWS ' and for OAuth2 generated JWT token use 'Bearer '
OK
OK
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 specification for details.
Supported Extensions:
Refer to this 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".
Token
Id of the Agent in the system
3756809c-4032-4e48-b3f0-2a6d30a03a54Id 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.
3756809c-4032-4e48-b3f0-2a6d30a03a54Any additional properties to be passed to influence execution
OK
OK
Last updated

