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> Library> Topic

Prompt injection: how attacks work and how to defend

Prompt injection is an attack in which text the model reads contains instructions the developer did not intend, and the model follows them. Direct injection comes from the user. Indirect injection hides in content the system fetches, such as a web page, an email, a retrieved document or a tool result. Because models do not reliably separate instructions from data, no prompt wording fully prevents it.

Defences are layered: keep untrusted text marked as data, validate inputs and outputs, limit which tools an agent may call and with what permissions, and require approval for risky actions. These guides explain how injection works with examples, then cover secure prompt design, input validation, guardrails, RAG security, red teaming and defending AI agents.

20
guides
3
Beginner
13
Intermediate
4
Advanced
5 h
of reading
01

Featured · start here

Secure Prompt Engineering: Separate Instructions From Data

Secure prompt engineering: keep untrusted text as data with message roles, delimiters, spotlighting, rules and output schemas. A real before and after.

Intermediate · 9 minRead the guide →

19 guides

  1. 01Browser AI Agents at Work: What to Let Them DoBrowser AI agents at work: what to let them do, what to keep for yourself, prompt injection in plain words, and the safety controls each vendor describes.Beginner · 12 minAI at workBeginner · 12 minAI at work→
  2. 02What Is an LLM Guardrail? Types, Examples and LimitsWhat 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 minGuardrails and securityBeginner · 7 minGuardrails and security→
  3. 03What Is Prompt Injection? How It Works, With ExamplesPrompt injection explained: how direct and indirect attacks hijack a language model, a real example of it working, and the defenses that reduce the risk.Beginner · 9 minLLM SecurityBeginner · 9 minLLM Security→
  4. 04Hidden 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 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  5. 05NeMo 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 minGuardrails and securityIntermediate · 18 minGuardrails and security→
  6. 06Best 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 minGuardrails and securityIntermediate · 20 minGuardrails and security→
  7. 07AI Agent Webhook Trigger: Run an Agent on HTTP EventsTrigger an AI agent from a webhook: HMAC signatures for GitHub and Stripe, replay protection, response codes, filters and payload injection scans.Intermediate · 20 minRuntime, triggers and deploymentIntermediate · 20 minRuntime, triggers and deployment→
  8. 08Message a Running AI Agent: Inbox, Directives and AskSend instructions to a running AI agent without a restart: directives, context, corrections and questions, with TTLs, rate limits and safe scanning.Intermediate · 16 minRuntime, triggers and deploymentIntermediate · 16 minRuntime, triggers and deployment→
  9. 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 minTools and the Model Context Protocol (MCP)Intermediate · 18 minTools and the Model Context Protocol (MCP)→
  10. 10AI 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 minGuardrails and securityIntermediate · 19 minGuardrails and security→
  11. 11Event-Driven AI Agents: Webhook, Cron and File TriggersRun an AI agent on a GitHub webhook, a cron schedule or a new file, with signed webhooks and real prompt-injection tests. Python code that runs.Intermediate · 22 minRuntime, triggers and deploymentIntermediate · 22 minRuntime, triggers and deployment→
  12. 12LLM 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 minGuardrails and securityIntermediate · 9 minGuardrails and security→
  13. 13LLM Security Checklist for Production SystemsAn LLM security checklist for production: prompts and secrets, injection, RAG access, output handling, tools, dependencies, limits, monitoring, sign-off.Intermediate · 10 minLLM SecurityIntermediate · 10 minLLM Security→
  14. 14LLM Attack Surface: Vectors, Risks and the OWASP Top 10The LLM attack surface explained: user apps, integrations, APIs, data stores, insiders and supply chain, the common attack vectors, and the OWASP Top 10.Intermediate · 11 minLLM SecurityIntermediate · 11 minLLM Security→
  15. 15Why 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 minGuardrails and securityIntermediate · 5 minGuardrails and security→
  16. 16AI 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 minGuardrails and securityAdvanced · 18 minGuardrails and security→
  17. 17LLM 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 minGuardrails and securityAdvanced · 11 minGuardrails and security→
  18. 18RAG Security: Stop Poisoned Documents and Prompt InjectionSecure a RAG pipeline: stop poisoned documents and indirect prompt injection, filter retrieval by permission, mark context, check answers. Real examples.Advanced · 10 minLLM SecurityAdvanced · 10 minLLM Security→
  19. 19LLM Red Teaming: How to Test Your Own LLM ApplicationRed-team your own LLM app: define what must never happen, write probes per attack type, run a harness with canaries, fix findings and keep them in CI.Advanced · 11 minLLM SecurityAdvanced · 11 minLLM Security→

Related topics

  • Guardrails22
  • Agent Runtime40
  • Output Validation8
  • Structured Outputs11
  • Model Context Protocol (MCP)54
  • AI at Work20
  • Audit Logging and Monitoring10
  • Authentication and Access Control20

Topic hubs

  • Guardrails and security→
  • Runtime, triggers and deployment→
  • Frameworks and comparisons→
  • Tools and the Model Context Protocol (MCP)→

By category and level

  • AI Engineering guides147
  • Prompt Engineering guides54
  • AI at Work guides18
  • LLM Security guides10
  • Beginner guides75
  • Intermediate guides140
  • Advanced guides38

Search every guide.

The library lists all guides with filters for topic, level, category and reading time.

All guidesLearning paths