AgentApi
valkyrai-api
All URIs are relative to http://localhost:8080/v1
| Method | HTTP request | Description |
|---|---|---|
| activateAgent | POST AgentApi | Activate an Agent (schedule workflows and register triggers) |
activateAgent
ActivateAgent200Response
activateAgent(id)
Activate an Agent (schedule workflows and register triggers)
Applies the Agent's CRON schedule to its workflows and registers configured event triggers.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
UUID id = UUID.randomUUID(); // UUID | Unique identifier for the Agent.
try {
ActivateAgent200Response result = apiInstance.activateAgent(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#activateAgent");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | Unique identifier for the Agent. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
deleteAgent
Void
deleteAgent(id)
Delete a Agent.
Deletes a specific Agent.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
UUID id = UUID.randomUUID(); // UUID | Unique identifier for the Agent.
try {
Void result = apiInstance.deleteAgent(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#deleteAgent");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | Unique identifier for the Agent. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
getAgent
Agent
getAgent(id)
Retrieve a single Agent
Retrieves a single Agent for a specific uid.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
UUID id = UUID.randomUUID(); // UUID | Unique identifier for the Agent.
try {
Agent result = apiInstance.getAgent(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#getAgent");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | Unique identifier for the Agent. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
getAgentList
Agent
getAgentList(pagesizesort)
Retrieve a list of Agents
Retrieves a list of Agents.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
Integer page = 0; // Integer |
Integer size = 20; // Integer |
List<String> sort = Arrays.asList(); // List<String> |
try {
Agent result = apiInstance.getAgentList(pagesizesort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#getAgentList");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| page | Integer | [optional] [default to 0] | |
| size | Integer | [optional] [default to 20] | |
| sort | List<String> | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
postAgent
Agent
postAgent(agent)
Create a new Agent
Creates a new Agent.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
Agent agent = new Agent(); // Agent | Agent details.
try {
Agent result = apiInstance.postAgent(agent);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#postAgent");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| agent | Agent | Agent details. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
publishAgentEvent
String
publishAgentEvent(ideventTypebody)
Publish an event for an Agent
Publishes an event that will be routed to any workflows registered for this Agent.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
UUID id = UUID.randomUUID(); // UUID | Unique identifier for the Agent.
String eventType = "eventType_example"; // String | The event type to publish
String body = "body_example"; // String |
try {
String result = apiInstance.publishAgentEvent(ideventTypebody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#publishAgentEvent");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | Unique identifier for the Agent. | |
| eventType | String | The event type to publish | |
| body | String | [optional] |
Return type
String
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: text/plain
updateAgent
Agent
updateAgent(idagent)
Update an existing Agent
Updates an existing Agent.
Example
Import classes:
import com.valkyrlabs.ApiException;
import com.valkyrlabs.api.AgentApi;
AgentApi apiInstance = new AgentApi();
UUID id = UUID.randomUUID(); // UUID | Unique identifier for the Agent.
Agent agent = new Agent(); // Agent | Updated Agent details.
try {
Agent result = apiInstance.updateAgent(idagent);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentApi#updateAgent");
e.printStackTrace();
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | Unique identifier for the Agent. | |
| agent | Agent | Updated Agent details. |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Generated Version Details
| ~ | value |
|---|---|
| GENERATOR VERSION | com.valkyrlabs:ValkyrAI API 1.0.1-SNAPSHOT |
| API ARTIFACT | com.valkyrlabs.valkyrai-api.jar |
| GENERATOR VERSION | org.openapitools.openapi-generator:7.5.0 |
| GENERATOR CLASS | org.openapitools.codegen.languages.SpringCodegen |
| GENERATED DATE | 2025-12-03T11:13:18.492704-08:00[America/Los_Angeles] |