How do you limit what an agent can do?
Responsible AI and governance · Pro 1
Short answer
Give it the least privilege it needs: scoped credentials per tool, read-only access by default, allow-lists for commands, domains and file paths, and separate credentials per user rather than one admin key. Run code and browsing in a sandbox such as a container with no secrets and limited network. Gate irreversible actions with human approval and log everything.
Deeper answer
The OWASP Top 10 for LLM applications calls the risk 'excessive agency': too much functionality, permission or autonomy. Prompt injection turns that into a real attack, because any document or web page the agent reads could try to steer it.
So assume the model can be tricked, and make the damage small: no tool should be able to do more than the user could do themselves, and destructive operations should be impossible without a person.
What a strong answer covers
- Least privilege and scoped credentials
- Read-only by default; allow-lists
- Sandbox for code or browsing
- Human approval for irreversible actions
- Assumes injection; logs everything
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- Why should an agent use the user's permissions rather than a service account?
- What would you put in a sandbox for a coding agent?
Common mistakes
- One powerful API key for everything
- Relying on the system prompt for safety
Learn it
- If an AI agent makes a costly mistake, who is accountable, and how do you design for that?
- What should an audit trail for an AI system record, and who uses it?
- What is bias in AI? Give an example and how to reduce it.
- Would you use AI to summarise a confidential meeting? How would you decide?
- Your team wants to use AI-generated images in a social media campaign. What do you check first?
- Walk me through how you would assess the risks of a new AI feature before launch.
- Your AI assistant gave harmful advice to a customer. What do you do?
- Your company wants to buy an AI tool from a vendor. What do you check before approving it?
- Your automation handles customer personal data. What precautions do you take?
- An AI tool your team uses to shortlist job applicants seems to favour one group. What do you do?
- What should a company's AI usage policy cover?
- What does India's DPDP Act mean for a company using AI?
- How does the EU AI Act sort AI systems by risk, and why could it matter to an Indian company?
- A caller who sounds exactly like your boss asks you to make an urgent payment today. What do you do?
- A client's security team sends a long questionnaire about your AI system. How do you handle it?
- What responsible AI checks would you run before launching an AI feature?
- How would you spot a deepfake or AI-generated misinformation?
- What information should you never paste into a public AI chatbot at work?