AI Agents
Define an AI agent, identify its core components, distinguish levels of autonomy, and describe the security controls required when an AI system can act.
##
- What makes a system an agent?
A chatbot primarily responds to a user. An agentic system can pursue a defined goal by observing context, selecting actions, using tools and evaluating results. The word “agent” is used broadly, so ask what the system can actually do. A model that only drafts a suggested action is different from a system that can execute it.
A common loop is:
Observe → plan/select action → call tool or act → inspect result → continue or stop
This is an application pattern, not proof that the model has human-like understanding or independent intentions.
##
- Core components
- Model: interprets context and proposes outputs or actions.
- Instructions and policies: define task boundaries and priorities.
- Tools: let the system interact with external services.
- State and memory: preserve relevant task context.
- Orchestrator: manages the loop, permissions, retries and stopping conditions.
- Environment: the systems and data the agent can access.
- Human oversight: approves or reviews actions when needed.
Memory can mean short-lived conversation state, persistent user or task memory, or external retrieval. It is not the same as changing the model's learned parameters.
##
- Autonomy is a design choice
A system can be advisory, require approval for every action, execute a limited set of pre-approved actions, or operate with broader delegated authority. Greater autonomy increases the consequences of mistakes and attacks. Define permitted actions, boundaries, escalation rules and stop conditions explicitly.
##
- Single-agent and multi-agent patterns
A single agent handles the workflow. A multi-agent design separates roles, such as planning, research and review. Multiple agents can improve modularity, but they also introduce coordination complexity, more tool calls, expanded attack surface and harder auditability. Do not assume multiple agents make a system more reliable.
##
- Example: security operations
An incident-response assistant receives an alert, retrieves relevant runbooks, summarises evidence and proposes containment. A safe initial design allows read-only investigation and produces a recommendation. If containment is later enabled, the action should require a narrowly scoped permission, explicit approval for high-impact cases, a record of the target and reason, and a rollback path.
##
- Threats and controls
Risks include prompt injection, tool misuse, excessive agency, confused-deputy behaviour, credential exposure, data exfiltration, privilege escalation, unsafe loops, destructive actions and weak audit trails.
Controls should be enforced by the application, not entrusted to the model alone:
- least-privilege, short-lived and scoped credentials
- explicit tool allowlists and argument validation
- sandboxing and network egress restrictions
- policy checks outside the model
- transaction and target binding
- step, time, token and cost limits
- approval gates for consequential actions
- immutable or tamper-evident audit records
- monitoring, emergency stop and rollback
- adversarial testing and change control
For reasoning transparency, record inputs, selected tools, arguments, results, approvals and outcomes. Do not rely on or demand hidden chain-of-thought as an audit mechanism.
##
- Practical exercise
Design an agent for triaging suspicious emails. List its read-only permissions, actions it must never take, approval-required actions, maximum steps, logging fields and emergency stop mechanism.
##
- Knowledge check
- What distinguishes an agentic workflow from a basic chatbot?
- Is memory the same as model training?
- Why is least privilege important?
- Why should policy enforcement not depend only on the model?
- What should an audit trail record?
Answer key:
- The ability to select and execute actions toward a goal through tools and an orchestration loop.
- No.
- It limits damage from mistakes or compromise.
- Model outputs are probabilistic and can be manipulated.
- Inputs, tool calls, arguments, results, approvals, versions and outcomes, with sensitive data handled safely.
##
- Checklist
- [ ] Define agent scope and autonomy level.
- [ ] Inventory tools, data and identities.
- [ ] Apply least privilege and scoped credentials.
- [ ] Enforce policies outside the model.
- [ ] Set step, time, cost and network limits.
- [ ] Require approvals for high-impact actions.
- [ ] Record tool traces and approval evidence.
- [ ] Test injection, misuse, loops and rollback.
Help improve this learning path.
Suggest a concept we should teach, or tell us what is unclear. No account is required. Email is optional and only for a reply. Do not include confidential or sensitive information.