Skip to content

Delegation

Delegation allows you to quickly determine the best way to handle a task or route a request using the Exnest Brain Core.

const delegateResponse = await exnest.delegate(
[
{ role: "user", content: "Email the team about the meeting delay" }
]
);
console.log(delegateResponse.choices[0].message.content);
Terminal window
curl -X POST https://api.exnest.app/v1/ebc/delegate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{
"role": "user",
"content": "I have 2 hours before my client meeting. Should I: A) Prepare slides, B) Review their previous feedback, C) Research competitor landscape, or D) Practice presentation?"
}
],
"max_tokens": 512,
"exnest_metadata": true
}'