Tutorials ASP.NET Core with Agentic AI Tutorial
AI Delegation — Complete Guide
AI Delegation — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of ASP.NET Core with Agentic AI Tutorial on Toolliyo Academy.
On this page
ASP.NET Core with Agentic AI Tutorial · Lesson 38 of 100
AI Delegation
AI basics → Agents
AI basics · 1 — Setup · ~6 min · Module 4: AI Agents and Multi-Agent Systems
What is this?
Delegation is when one agent assigns subtasks to another with context and authority limits. AgentNest supervisor agents delegate with DelegationToken scoped to specific plugins.
Why should you care?
CRM lead agent should delegate research without handing over email-send permissions.
See it live — copy this example
Paste into an ASP.NET Core 8+ / AgentNest project, then run with dotnet run (set your API keys in user-secrets).
// AgentNest.Agents/Delegation/DelegationToken.cs
public sealed record DelegationToken(
string IssuerAgent, string TargetAgent,
IReadOnlySet<string> AllowedTools, DateTimeOffset ExpiresUtc);
public sealed class DelegatingSupervisor(IAgentDispatcher dispatcher)
{
public Task<string> DelegateResearchAsync(Guid leadId, CancellationToken ct) =>
dispatcher.SendAsync(new DelegationToken(
"crm-lead", "research", new HashSet<string> { "crm.FetchNews" },
DateTimeOffset.UtcNow.AddMinutes(10)), leadId, ct);
}
What happened?
- DelegationToken limits TargetAgent to crm.FetchNews for ten minutes.
- Dispatcher validates token before invoking downstream agent.
Practice next
- build IAgentDispatcher with token validation.
- Reject expired or over-scoped delegation tokens.
- Audit log issuer, target, and tools for each delegation.
- Bind DelegationToken to tenantId claim.
- Require cryptographic signature on tokens across nodes.
Remember
Delegation tokens scope which tools sub-agents may use. Supervisors delegate with expiry and audit trails. Never delegate entire kernel permissions.
CRM lead orchestration
Lead agent delegates news scan but keeps email send authority.
Outcome: Scoped DelegationToken prevents research agent from emailing prospects.
Interview prep for this lesson
Practice these questions aloud after reading—each links to a full structured answer.
Sign in to ask a question or upvote helpful answers.
No questions yet — be the first to ask!