PromptisePromptise
PlatformSoonEnterprise
DocsGitHub
Talk to usGet started
Promptise - AI Framework LogoPromptise

The full-stack framework for agentic systems. Build with the framework. Run it on the platform. Launch it with our engineers.

pip install promptise

[01] Product

  • Framework
  • Platform (coming soon)
  • Enterprise
  • How it works
  • Contact

[02] Framework

  • The Agent
  • The Interface
  • The Harness

[03] Resources

  • Documentation
  • GitHub
  • Why Promptise
  • Use cases
  • Roadmap
  • Guides
  • Learning Paths
  • Questions

[04] Company

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Subprocessors

© 2026 Promptise by Manser Ventures. All rights reserved.

hello@promptise.com
← Guides> Topic

Guardrails and security

An agent that can call tools can also be talked into calling the wrong ones. Prompt injection hides instructions in a web page, email or tool result; a model can leak personal data in an answer; generated code can touch files it should not. Security for agents means limiting what each agent can reach and checking what goes in and out, so one bad input cannot do much damage.

These guides cover the layers in order. Guardrails check inputs and outputs for injection, personal data and policy breaks. A dedicated guide goes deeper on prompt-injection defence. Then come sandboxes for running model-written code, verifiable identity for each agent, isolation between customers in a multi-tenant product, and an audit log that records who did what. The MCP security guide applies the same ideas to tool servers.

28
guides
2
Beginner
18
Intermediate
8
Advanced
8 h
of reading
01

Start here

What Is an LLM Guardrail? Types, Examples and Limits

What an LLM guardrail is: a check on what goes into and out of a model. Input, output and tool guardrails, a real example, and what guardrails can't do.

Beginner · 7 minRead the guide →

Then read on, in this order

27 guides

  1. 02Best LLM Guardrails Tools (2026): 9 Platforms ComparedThe best LLM guardrails platforms in 2026 compared: NeMo, Guardrails AI, Azure, Bedrock, Lakera and more on injection, PII, latency, offline use and cost.Intermediate · 20 minIntermediate · 20 min→
  2. 03AI Agent Guardrails in Python: Block Injection, Redact PIIAdd guardrails to an AI agent in Python: block prompt injection, redact PII and leaked API keys, write custom rules, and test them against real attacks.Intermediate · 19 minIntermediate · 19 min→
  3. 04NeMo Guardrails vs Guardrails AI: Which to Choose (2026)NeMo Guardrails vs Guardrails AI compared: validators vs Colang rails, setup, model-call cost, license, the same PII check in both, and a decision table.Intermediate · 18 minIntermediate · 18 min→
  4. 05AI-Based PII Detection and Redaction Tools for LLM AppsAI-based PII detection and redaction for LLMs: regex, NER, Presidio, cloud DLP and LLM detectors compared, with code to mask prompts, tool output and logs.Intermediate · 20 minIntermediate · 20 min→
  5. 06Stop Secrets Leaking Into LLM Logs and TracesHow API keys and tokens end up in LLM logs and traces, and how to redact them from tool results, observability and log lines before anything is stored.Intermediate · 18 minIntermediate · 18 min→
  6. 07Leaked LLM API Key? Rotate and Audit in 30 MinutesLeaked an OpenAI, Anthropic or other LLM API key? A 30-minute checklist: revoke and rotate, check usage and spend, find the source, and stop the next leak.Beginner · 8 minBeginner · 8 min→
  7. 08How to Revoke an AI Agent's Credentials: Incident StepsHow to revoke an AI agent's credentials: stop the agent, revoke API keys, OAuth tokens, cloud roles and MCP keys, end sessions, verify and audit.Intermediate · 18 minIntermediate · 18 min→
  8. 09AI Agent Prompt Injection: How to Defend Against ItHow indirect prompt injection reaches AI agents through tool results, and how to defend: untrusted-data prompts, scanners, approval gates, least privilege.Intermediate · 18 minIntermediate · 18 min→
  9. 10Hidden Text Prompt Injection: Sanitize Pages for AI AgentsStop hidden text prompt injection: strip CSS-hidden text, comments and invisible characters from web pages, scan what is left, and limit agent tools.Intermediate · 18 minIntermediate · 18 min→
  10. 11AI Agent Code Execution Sandbox: Run LLM Code SafelyLet an AI agent write and run Python in a Docker sandbox: analyse a CSV, try real escape attempts, set limits, and learn where the sandbox stops.Intermediate · 18 minIntermediate · 18 min→
  11. 12AutoGen Docker Task Isolation: Secure the Code ExecutorSet up AutoGen Docker task isolation: configure DockerCommandLineCodeExecutor, run one container per task, cut the network, set limits and fix errors.Intermediate · 20 minIntermediate · 20 min→
  12. 13Run Coding Agents in Dev Containers SafelyHow to run coding agents like Claude Code and Codex in a dev container safely: an egress allowlist, no sudo, read-only Git hooks, and checks that prove it.Intermediate · 18 minIntermediate · 18 min→
  13. 14AI Agent Network Egress: Limit Where Agents Can ConnectLimit AI agent network egress: give agent code no network, route the rest through an allowlist proxy, and make tools refuse private IPs and redirects.Advanced · 18 minAdvanced · 18 min→
  14. 15AI Agent Identity: Authenticate Agents to MCP ServersGive your AI agent its own verifiable identity: short-lived JWTs from your IdP, checked by MCP servers with JWKS. Real runs, refresh and honest limits.Advanced · 22 minAdvanced · 22 min→
  15. 16SPIFFE for AI Agents: Workload Identity Without API KeysUse SPIFFE and SPIRE for AI agent identity: X.509 vs JWT-SVIDs, calling APIs and MCP servers, cloud workload identity compared, with runnable code.Advanced · 20 minAdvanced · 20 min→
  16. 17SPIFFE vs AWS IAM Roles vs Entra ID for AI AgentsSPIFFE vs AWS IAM roles vs Entra ID for AI agents: what an SVID is, how each gives an agent its own identity, and how to federate them, with runnable code.Advanced · 18 minAdvanced · 18 min→
  17. 18On-Behalf-Of Auth for AI Agents: Act as Each UserHow AI agents act on behalf of each user: OAuth token exchange (RFC 8693), audience-bound tokens, the act claim, and a runnable MCP example with output.Advanced · 22 minAdvanced · 22 min→
  18. 19Multi-Tenant AI Agents: Keep Each Customer's Data ApartBuild a multi-tenant AI agent in Python: per-user tokens, tenant-scoped MCP tools and isolated sessions, with runs proving one tenant can't read another.Advanced · 18 minAdvanced · 18 min→
  19. 20LangChain Multi-Tenant Isolation: Tenants, Quotas, MemoryLangChain multi-tenant isolation: what LangChain and LangGraph provide, what you build yourself, per-tenant rate limits and quotas, and the Promptise way.Advanced · 20 minAdvanced · 20 min→
  20. 21AI Agent Audit Logging: Tamper-Evident Logs in PythonLog every AI agent tool call to an HMAC-chained file, then catch edits, deletions and reordering with one command. Real tamper tests, real output.Intermediate · 15 minIntermediate · 15 min→
  21. 22MCP Security Best Practices: A Checklist for MCP ServersMCP security best practices as a checklist: token audience binding, per-tool scopes, input validation, human approval, rate limits and signed audit logs.Intermediate · 20 minIntermediate · 20 min→
  22. 23uv Dependency Cooldowns and Pins for Python AI AppsSet a uv dependency cooldown with exclude-newer, pin exact versions in a hashed lockfile and install only from it, so a poisoned release never reaches you.Intermediate · 8 minIntermediate · 8 min→
  23. 24AI Agent Production Checklist: What to Check Before LaunchAn AI agent production checklist: security, approvals, guardrails, limits, cost, observability, evals, deployment and incident response, with code.Intermediate · 17 minIntermediate · 17 min→
  24. 25Approval Fatigue: Auto-Approve Safe AI Agent ActionsStop rubber-stamping AI agent actions. Auto-approve routine tool calls with rules, send only risky ones to a human, and log why. Real Python runs.Intermediate · 21 minIntermediate · 21 min→
  25. 26LLM Input Validation: Why Regex Fails and What WorksValidate LLM input in layers: limits, Unicode normalization, field rules and a scope classifier. Real examples of regex failing and what catches attacks.Intermediate · 9 minIntermediate · 9 min→
  26. 27Why LLM Output Is Untrusted Input: Design for InjectionWhy to treat LLM output as untrusted: indirect prompt injection, OWASP LLM risks, a real injected support ticket, and design rules that contain the damage.Intermediate · 5 minIntermediate · 5 min→
  27. 28LLM Hardening: Constrain Model Output When Prompts FailHarden LLM behavior beyond the prompt: structured outputs, constrained decoding, output checks, safety classifiers and sampling limits, with real examples.Advanced · 11 minAdvanced · 11 min→

Other topics

  • Building AI agents in Python
  • Models and providers
  • Tools and the Model Context Protocol (MCP)
  • Memory, context and RAG
  • Agent reasoning patterns
  • Multi-agent systems
  • Human approvals (human-in-the-loop)
  • Observability and debugging
  • Cost control and rate limits
  • Testing and evals
  • Runtime, triggers and deployment
  • Frameworks and comparisons
  • AI at work
  • AI for leaders
  • Enterprise AI agents

In the documentation

  • Guardrailsdocs ↗
  • Sandboxdocs ↗
  • Agent identitydocs ↗
  • Multi-tenancydocs ↗

Build it with Promptise Foundry.

The code in these guides runs on Promptise Foundry, an open-source Python framework for AI agents and MCP servers.

QuickstartAll guides