List variations
client.AgentVariations.List(ctx, agentID, query) (*CursorPagination[AgentVariation], error)
GET/v1/agents/{agentId}/variations
List variations
package main
import (
"context"
"fmt"
"github.com/cadenya/cadenya-go"
"github.com/cadenya/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.AgentVariations.List(
context.TODO(),
"agentId",
cadenya.AgentVariationListParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"compactionConfig": {
"summarization": {
"instructions": "instructions"
},
"toolResultClearing": {
"preserveRecentResults": 0
},
"triggerThreshold": 0
},
"constraints": {
"maxSubObjectives": 0,
"maxToolCalls": 0
},
"description": "description",
"enableEpisodicMemory": true,
"episodicMemoryTtl": 0,
"modelConfig": {
"modelId": "modelId",
"temperature": 0
},
"prompt": "prompt",
"toolSelection": {
"assignedTools": {
"allowDiscovery": true
},
"autoDiscovery": {
"hints": [
"string"
],
"maxTools": 0
}
},
"weight": 0
},
"info": {
"assignments": [
{
"id": "id",
"agent": {
"id": "id",
"name": "name"
},
"tool": {
"id": "id",
"name": "name"
},
"toolSet": {
"id": "id",
"name": "name"
}
}
],
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"feedbackCount": 0,
"model": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"score": 0,
"subAgentCount": 0,
"toolCount": 0,
"toolSetCount": 0
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"compactionConfig": {
"summarization": {
"instructions": "instructions"
},
"toolResultClearing": {
"preserveRecentResults": 0
},
"triggerThreshold": 0
},
"constraints": {
"maxSubObjectives": 0,
"maxToolCalls": 0
},
"description": "description",
"enableEpisodicMemory": true,
"episodicMemoryTtl": 0,
"modelConfig": {
"modelId": "modelId",
"temperature": 0
},
"prompt": "prompt",
"toolSelection": {
"assignedTools": {
"allowDiscovery": true
},
"autoDiscovery": {
"hints": [
"string"
],
"maxTools": 0
}
},
"weight": 0
},
"info": {
"assignments": [
{
"id": "id",
"agent": {
"id": "id",
"name": "name"
},
"tool": {
"id": "id",
"name": "name"
},
"toolSet": {
"id": "id",
"name": "name"
}
}
],
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"feedbackCount": 0,
"model": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"score": 0,
"subAgentCount": 0,
"toolCount": 0,
"toolSetCount": 0
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}