DeltaV Functions API
Most of the endpoints depends on various instances and are considered parameters for the actual endpoint, but these are not meant to be passed directly by the user.
Instead, these instance-dependent elements are integrated and managed directly by the backend system. We refer to them as *name_parameter
, where the asterisk (*) is used to denote a specific instance-dependent parameter that the route relies on.
Mind that: to access these APIs, user must be authenticated and have the correct permissions.
Overview
The DeltaV Functions API allows you to interact with the DeltaV backend, allowing you to interact with your functions and more.
POST /v1beta1/functions/
GET /v1beta1/functions/
GET /v1beta1/functions/:function_id/
PUT /v1beta1/functions/:function_id/
POST /v1beta1/functions/duplicate/:function_id/
DELETE /v1beta1/functions/:function_id/
PUT /v1beta1/functions/start-testing/:function_id/
PUT /v1beta1/functions/submit-for-review/:function_id/
PUT /v1beta1/functions/unpublish/:function_id/
PUT /v1beta1/functions/add-to-function-group/:function_id/:function_group_id/
DELETE /v1beta1/functions/remove-from-function-group/:function_id/:function_group_id/
GET /v1beta1/functions/:function_id/groups/
DELETE /v1beta1/functions/delete-functions-of-agent/:agent_address/
Create a function
Endpoint: POST /v1beta1/functions/
Request
- Name
agent
- Type
- string
- Description
- Address of agent.
- Name
name
- Type
- string
- Description
- Name of function.
- Name
description
- Type
- string
- Description
- Description of function.
- Name
protocolDigest
- Type
- string
- Description
- Digest of protocol associated with the agent.
- Name
modelDigest
- Type
- string
- Description
- Digest of model associated with the protocol.
- Name
modelName
- Type
- string
- Description
- Request model name and protocol name separated by a slash character.
- Name
arguments
- Type
- JSON
- Description
- Properties of all request model arguments as a list. Every element contains the name of the respective argument, the fact that the argument is required or not (true/false), the type of the argument, and the description.
- Name
type
- Type
- string
- Description
- Type of the function. Can be PRIMARY or SECONDARY.
curl \
-X POST \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/ \
-d '{"agent":"agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy","name":"Stock price function","description":"Retrieves the stock price of a share.","protocolDigest":"proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a","modelDigest":"model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2","modelName":"StockPrice/StocksProtocol","arguments":[{"name":"symbol","required":true,"type":"string","description":"The symbol of the share, for example: AAPL, GOOG, MSFT, etc."}],"type":"PRIMARY"}'
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "CREATED" }
Get all functions of a user
Endpoint: GET /v1beta1/functions/
Request
curl \
-X GET \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/
Responses
[ { "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "CREATED", "numInteractions": 100 }, { "uuid": "ebfa27ec-c978-4109-bb77-9d1809e3b0f6", "agent": "agent1q0vmxjv06dwdlppuvspmfyff4ys2t4mdndpa09gulpsuq90n22xqy8k89l8", "name": "Flights function", "description": "Searches for flight offers.", "protocolDigest": "proto:266661f975b0857631cc31b40f60c263aeabb0c7156ed6b2b940a23bfc6560a0", "type": "PRIMARY", "createdAt": "2023-10-22T21:08:47", "updatedAt": "2023-10-22T21:08:47", "status": "CREATED", "numInteractions": 150 } ]
Fetch a function
Endpoint: GET /v1beta1/functions/{function_id}/
Request
curl \
-X GET \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/{function_id}/
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "CREATED" }
Update a function
Endpoint: PUT /v1beta1/functions/{function_id}/
Request
- Name
agent
- Type
- Optional[string]
- Description
- Optional - Address of agent.
- Name
name
- Type
- Optional[string]
- Description
- Optional - Name of function.
- Name
description
- Type
- Optional[string]
- Description
- Optional - Description of function.
- Name
protocolDigest
- Type
- Optional[string]
- Description
- Optional - Digest of protocol associated with the agent.
- Name
modelDigest
- Type
- Optional[string]
- Description
- Optional - Digest of model associated with the protocol.
- Name
modelName
- Type
- Optional[string]
- Description
- Optional - Request model name and protocol name separated by a slash character.
- Name
arguments
- Type
- Optional[[]JSON]
- Description
- Optional - Properties of all request model arguments as a list. Every element contains the name of the respective argument, the fact that the argument is required or not (true/false), the type of the argument, and the description.
- Name
type
- Type
- Optional[string]
- Description
- Optional - Type of the function. Can be PRIMARY or SECONDARY.
curl \
-X PUT \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/{function_id}/ \
-d '{"agent":"agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy","name":"Stock price function modified name","description":"Retrieves the stock price of a share.","protocolDigest":"proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a","modelDigest":"model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2","modelName":"StockPrice/StocksProtocol","arguments":[{"name":"symbol","required":true,"type":"string","description":"The symbol of the share, for example: AAPL, GOOG, MSFT, etc."}],"type":"PRIMARY"}'
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function modified name", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "CREATED" }
Duplicate a function
Endpoint: POST /v1beta1/functions/duplicate/{function_id}/
Request
curl \
-X POST \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/duplicate/{function_id}/
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "CREATED" }
Delete a function
Endpoint: DELETE /v1beta1/functions/{function_id}/
Request
curl \
-X DELETE \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/{function_id}/
Responses
{}
Start testing of a function
Endpoint: PUT /v1beta1/functions/start-testing/{function_id}/
Request
curl \
-X PUT \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/start-testing/{function_id}/
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "TESTING" }
Submit a function for review
Endpoint: PUT /v1beta1/functions/submit-for-review/{function_id}/
Request
curl \
-X PUT \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/submit-for-review/{function_id}/
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "IN-REVIEW" }
Unpublish a function
Endpoint: PUT /v1beta1/functions/unpublish/{function_id}/
Request
curl \
-X PUT \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/unpublish/{function_id}/
Responses
{ "uuid": "37da66a9-9649-4b7a-9112-f461a2bd923d", "agent": "agent1qdnt5j8wr7cyzupu759w79scp3uaz50m33lfqazsf2tpfz84qfazjgnvfvy", "name": "Stock price function", "description": "Retrieves the stock price of a share.", "protocolDigest": "proto:05c3504f6d6486792e8410c9d1c6d626991fc8e0007bae960acb2ab1dd83072a", "modelDigest": "model:4ec922f7f18419cf7c6742f96eb4543a7ed5c131af077ca2b267607f65e62eb2", "modelName": "StockPrice/StocksProtocol", "arguments": [ { "name": "symbol", "required": true, "type": "string", "description": "The symbol of the share, for example: AAPL, GOOG, MSFT, etc." } ], "type": "PRIMARY", "createdAt": "2023-10-22T21:28:46", "updatedAt": "2023-10-22T21:28:46", "status": "TESTING" }
Add function to function group
Endpoint: PUT /v1beta1/functions/add-to-function-group/{function_id}/{function_group_id}/
Request
curl \
-X PUT \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/add-to-function-group/{function_id}/{function_group_id}/
Responses
{ "function": "be14fb4f-b7a5-4233-937d-cce29fb8a3ea", "functionGroup": "c02ed9ce-62df-46d1-bfaa-8c8b309a4a40" }
Remove function from function group
Endpoint: DELETE /v1beta1/functions/remove-from-function-group/{function_id}/{function_group_id}/
Request
curl \
-X DELETE \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/remove-from-function-group/{function_id}/{function_group_id}/
Responses
{}
Fetch all function groups that the function belongs to
Endpoint: GET /v1beta1/functions/{function_id}/groups/
Request
curl \
-X GET \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/{function_id}/groups/
Responses
[ { "uuid": "d5a8f3a4-f219-42ec-a09d-7225fb5b790a", "name": "My Functions", "isPrivate": true } ]
Endpoint: DELETE /v1beta1/functions/delete-functions-of-agent/{agent_address}/
Request
curl \
-X DELETE \
-H Authorization: bearer <your token here> \
https://agentverse.ai/v1beta1/functions/delete-functions-of-agent/{agent_address}/
Responses
{}