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);# Quick reasoning for task delegation and action dispatchdelegate_response = await client.delegate( messages=[ExnestMessage(role="user", content="Email the team about the meeting delay")])
if not delegate_response.error: print(f"\nDelegation Response: {delegate_response.choices[0].message.content}")Raw HTTP API
Section titled “Raw HTTP API”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 }'