Security Considerations
Summary
- Security Measures for Authentication and External Components
- Each tool has least-privilege access to the services it connects to
- Delegated authorization for agent tools and connected services
- Rate limiting tools accessing connected services
- Isolating components
- Security and privacy
- Authentication between agents in multi-agent environments
- Security Measures for the LLM and Internal Components
- Input validation
- Input from user
- Input from untrusted connected services via tools (i.e., web browsing, mixed trust sources, etc.)
- Output filtering
- Agent to user
- Agent to agent
- Transparency into agent steps
- Audit logging
- Human in the loop
- Technical measures for reliability and consistency
System and agentic prompt design for agents
The technology and best practices for deploying AI agents are rapidly evolving. As the technology evolves, so should prompt design for agents. Nonetheless, there are several high level guidelines that should be followed, which are similar to the design guidelines for chatbots.
At a high level, there are multiple prompts for an agent by the system deployer: the system prompt and the agentic prompt(s).
Agentic prompts
"Agentic prompt" is the term we use for the set of prompts used to plan, reason, and internally respond to tools. For example, ReAct and Reflexion are two common agentic prompt approaches that are widely used.
System prompt
The system prompt should follow similar patterns to the chatbot prompt we discussed in System prompt design for chatbots, above. The system prompt should include (1) a persona, (2) specific instructions, and (3) examples.
An important differentiator between prompts for chatbots and those for agents relates to the use of tools. Tools can enable agents to perform tasks that chatbots cannot, but they can also be costly (e.g., they may call APIs) and more dangerous (e.g., they run the risk of leaking data). Thus, in the system prompt for an agent-based application, the persona and the specific instructions should be tailored toward ensuring that tools are used only in a safe manner.
Likewise, the agentic prompts can be modified beyond their base versions to encourage safety (e.g., to regard all external content as untrusted).
System and agentic prompt design for agents