Course Content
Agentic AI Patterns
9 sections · 50 lessons
How does Agentic AI support task-level customization in complex workflows?
What you need to know
The levers you can vary
| Lever | Example variation |
|---|---|
| Task spec | Goal, constraints, output schema, tone |
| Tools and permissions | Client A's agent can approve payouts; client B's cannot |
| Model and reasoning effort | Small model for simple triage; strong model for adjudication |
| Retrieval scope | Each client's policy documents only |
| Budgets and approval thresholds | Approve above Rs 25,000 for one client, Rs 1 lakh for another |
| Evaluation | A golden set per configuration |
Configuration as validated data
Python
1from dataclasses import dataclass23ALL_TOOLS = {"get_claim", "get_policy", "request_document", "calculate_payable", "approve_payout"}45@dataclass(frozen=True)6class TaskConfig:7 client: str8 model: str = "medium"9 tools: frozenset = frozenset({"get_claim", "get_policy", "request_document"})10 approval_above_inr: int = 100_00011 max_steps: int = 1212 tone: str = "formal"13 has_golden_set: bool = False1415 def __post_init__(self):16 unknown = self.tools - ALL_TOOLS17 if unknown:18 raise ValueError(f"{self.client}: unknown tools {sorted(unknown)}")19 if not self.has_golden_set:20 raise ValueError(f"{self.client}: no golden set, cannot ship")21 if not 1 <= self.max_steps <= 30:22 raise ValueError(f"{self.client}: max_steps out of range")Safe defaults live in the class. A client config overrides only what it needs. Invalid configs, such as an unknown tool or no golden set, fail at load time, not in production. The orchestrator reads the config and renders the prompt, tool list and limits from it.
Avoiding sprawl
- One shared base prompt; configs fill a small set of approved slots.
- Schema-validated configs, reviewed like code.
- CI runs each active config's golden set on every shared change.
- Retire configs nobody uses.
A real-life example
A third-party administrator processes health-insurance claims for 30 corporate clients, each with different group-policy rules.
- Before: the team had copied the agent's prompt per client. After a year there were 30 prompts. A fix to how room-rent caps were read went into 11 of them; the other 19 kept the bug for months.
- After: one graph, one base prompt, and 30 config records. Client differences: which clauses apply, approval thresholds (Rs 25,000 to Rs 2 lakh), whether maternity cover exists, and the letter tone. Each client has 40 to 80 golden cases.
- A shared-prompt change now runs about 1,800 golden cases across all clients in CI. When a change improved 28 clients but broke 2 with unusual co-pay rules, CI caught it before release.
Follow-up questions to expect
- "When is a separate agent justified?" — When the task is truly different (different tools, different goal), not just different parameters.
- "How do you let clients customise tone without prompt injection?" — Offer choices from a fixed list, not free text inserted into the system prompt.
- "How do you test many configs cheaply?" — Share cases where the configs agree, and add targeted cases only for each config's differences.