Safety & ops
What is Agent Security?
Agent security is protecting tools, credentials, and users from misuse by models or prompts.
Threats include prompt injection, over-broad tools, and secret leakage in traces.
Why it matters
Agent security protects tools, credentials, and users from misuse. The threat surface includes: prompt injection (untrusted input overriding instructions), over-broad tool permissions, secret leakage in traces, and unauthorized actions.
Agents are more dangerous than chatbots because they can act — a security breach means real-world side effects, not just wrong text.
Security principles
Least privilege: give agents only the tools and permissions they need. Separation: keep instructions separate from data. Redaction: remove secrets from traces. Sandboxing: run untrusted code in isolated environments. Audit: log every tool call and observation.
These principles are not optional for production agents.
Key takeaways
- 1Agent security is critical because agents can act in the real world.
- 2Apply least privilege, separation, redaction, sandboxing, and audit.
- 3Prompt injection is the most common attack vector against agents.
Common mistakes
- ✕Giving agents broad tool permissions "for convenience."
- ✕Logging traces without redacting secrets.
- ✕Not treating retrieved documents as untrusted input.
Related terms
Concept neighborhood
Terms linked from Agent Security in the glossary graph.
- Agent Security
- Guardrail
- Sandbox
- Prompt Injection