PromptisePromptise
Docs
GitHub
Promptise - AI Framework LogoPromptise

The foundation layer for agentic intelligence. Build, secure and operate autonomous AI systems with Promptise Foundry.

pip install promptise

[01] Foundry

  • MCPcast
  • The Promptise Agent
  • Reasoning Engine
  • MCP
  • Agent Runtime
  • Prompt Engineering
  • Execution Engine
  • Agent Identity

[02] Resources

  • Documentation
  • GitHub
  • Guides
  • Learning Paths
  • Questions

[03] Company

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

© 2026 Promptise by Manser Ventures. All rights reserved.

Open source · Python

← 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.

[n.01/02]> 13 guides
  1. 01What 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 minOct 18, 2026
  2. 02What 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 minOct 18, 2026
  3. 03AI 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 minOct 18, 2026
  4. 04AI Agent Guardrails in Python: Block Injection, Redact PIIAdd guardrails to an AI agent in Python: block prompt injection, redact PII and leaked API keys, add custom rules, and test it all. Real runs, real misses.Intermediate · 19 minOct 11, 2026
  5. 05Event-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 minOct 11, 2026
  6. 06Secure Prompt Design: Separate Instructions From DataSecure prompt design: keep untrusted text as data with message roles, delimiters, spotlighting, explicit rules and output schemas. A real before and after.Intermediate · 9 minOct 18, 2026
  7. 07LLM 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 minOct 18, 2026
  8. 08LLM 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 minOct 18, 2026
  9. 09LLM Security Risks: The OWASP Top 10 for LLM Apps ExplainedMap the LLM attack surface: each OWASP Top 10 for LLM apps risk with an example and first defense, how attacks chain, and which controls to build first.Intermediate · 11 minOct 18, 2026
  10. 10Why 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 minOct 18, 2026
  11. 11LLM 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 minOct 18, 2026
  12. 12RAG 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 minOct 18, 2026
  13. 13LLM 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 minOct 18, 2026
[n.02/02]> go further

Related topics

  • Guardrails9
  • Structured Outputs8
  • Agent Runtime7
  • Audit Logging and Monitoring4
  • Authentication and Access Control7
  • LLM Mental Models19
  • Model Context Protocol (MCP)37
  • Output Validation4

Topic hubs

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

By category and level

  • AI Engineering guides71
  • Prompt Engineering guides54
  • LLM Security guides10
  • Beginner guides36
  • Intermediate guides80
  • Advanced guides24

Search every guide.

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

All guidesLearning paths