Update Configuration
POST https://api.credal.ai/api/v0/copilots/updateConfiguration Content-Type: application/json
Update the configuration for a agent
Reference: https://docs.credal.ai/api-reference/api-reference/copilots/update-configuration
Authentication
Section titled “Authentication”Authorizationheader (bearer token, required) — Bearer authentication of the formBearer <token>, where token is your auth token.
Request
Section titled “Request”Body (application/json)
Section titled “Body (application/json)”This endpoint expects an object.
copilotId(UUID, required) — Credal-generated agent ID to add the collection to.configuration(Configuration, required)
Configuration
Section titled “Configuration”name(string, optional)description(string, optional)prompt(string, optional)
Examples
Section titled “Examples”Request
{
"copilotId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
"configuration": {
"name": "Customer Agent",
"description": "This agent is used to answer customer requests based on internal documentation.",
"prompt": "You are a polite, helpful assistant used to answer customer requests."
}
}SDK Code
import { CredalClient } from "@credal/sdk";
async function main() {
const client = new CredalClient({
apiKey: "YOUR_TOKEN_HERE",
});
await client.copilots.updateConfiguration({
copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
configuration: {
name: "Customer Agent",
description: "This agent is used to answer customer requests based on internal documentation.",
prompt: "You are a polite, helpful assistant used to answer customer requests.",
},
});
}
main();
from credal import CredalV0
import uuid
from credal.copilots import Configuration
client = CredalV0(
api_key="YOUR_TOKEN_HERE",
)
client.copilots.update_configuration(
copilot_id=uuid.UUID("82e4b12a-6990-45d4-8ebd-85c00e030c24"),
configuration=Configuration(
name="Customer Agent",
description="This agent is used to answer customer requests based on internal documentation.",
prompt="You are a polite, helpful assistant used to answer customer requests.",
),
)