Types of Agents
~3 min read
Concept & How It Works
Why Does It Exist?
Too little autonomy (approve every click) makes agents useless. Too much autonomy (unsupervised financial transactions) is dangerous. Production agents need calibrated autonomy levels that match task risk, user trust, and regulatory requirements.
Real-World Analogy
Autonomy levels are like a driver's license progression — learner's permit (supervised), independent driver (most tasks), commercial license (high-stakes operations with extra checks).
Visual Workflows
What is Types of Agents?
Example
Scenario
Email agent: reading inbox = autonomous. Drafting reply = confirm (show draft, user approves). Sending to external contacts = supervised (manager reviews). Deleting emails = blocked (not in allowlist).
Solution
In Agent Foundations, apply Types of Agents to this scenario: Email agent: reading inbox = autonomous. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.
Practice Task
Do this before moving to the next module — reading alone is not enough.
Open the Code Walkthrough below and run it locally. Change one parameter related to Types of Agents (e.g. model, temperature, top_k, or tool name), observe the difference in output, and write 2–3 sentences explaining what changed.
Code Walkthrough
Highlighted lines show where Types of Agents happens in the code.
1AUTONOMY_POLICIES = {2 "read_email": "autonomous",3 "draft_email": "confirm",4 "send_email": "supervised",5 "delete_email": "blocked",6 "query_database": "autonomous",7 "update_database": "confirm",8 "transfer_funds": "blocked",9}10
11def execute_with_autonomy(tool_name: str, args: dict, user_id: str) -> dict: # define a reusable function12 policy = AUTONOMY_POLICIES.get(tool_name, "confirm")13
14 if policy == "blocked":15 return {"status": "blocked", "reason": f"{tool_name} is not permitted"} # return the result16
17 if policy == "confirm":18 approval = request_human_approval(user_id, tool_name, args)19 if not approval:20 return {"status": "rejected"} # return the result21
22 result = execute_tool(tool_name, args)23 audit_log(user_id, tool_name, args, result)24 return {"status": "success", "result": result} # return the resultCommands to Remember
Commands to Remember
pip install openai # minimal agent = LLM API + Python looppython agent.py # run your agent scriptpip install python-dotenv # load API keys from .env
Common Mistakes
- Full autonomy on all tools — dangerous in production
- Requiring approval for every action — agent is useless
- No audit trail — can't investigate incidents
- Static autonomy levels — not adapting to agent track record
- Ignoring regulatory requirements for human oversight
Cheat Sheet
Quick recap — the most important points from this module.
Cheat Sheet
quick ref- •Risk-based per tool
- •Read=auto, write=confirm, delete=block
- •Audit everything
- •Start supervised
- •Promote with track record
- •Human-in-loop for irreversible