Jump to content

Sovereign AI agents and prompt injection: Difference between revisions

From IdeaWazaWiki
Create article (drafted with AI assistance)
 
Rewrite around agent sovereignty (drafted with AI assistance)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''Prompt injection''' is a class of attack in which text that an AI language model reads, such as a web page, email, document, tool result, image text, or retrieved passage, contains instructions that try to override what the user or developer asked for. The model receives trusted instructions and untrusted data in the same stream of text, so it cannot reliably tell them apart, and may follow the injected text as if it were a higher priority command.
'''Sovereign AI agents''' are software agents that run on infrastructure their owner controls, keep the data of that owner local, hold their own spending limits, and answer only to the person who owns them. '''Prompt injection''' is the main way such an agent can be turned against its owner: hidden text in a web page, email, document, tool description, or retrieved passage tries to take control. This page frames prompt injection as a consent problem and defenses as sovereignty design.
__NOTOC__
__NOTOC__
== Why it happens ==
== What makes an agent sovereign ==


Language models are trained to follow natural language. A system prompt, a user message, a tool reply, and a downloaded page all arrive as tokens in one context window. There is no hard boundary that marks only some of those tokens as commands. An attacker who can place words where the model will read them can compete with instructions from the developer. That design trait, not a single bug in one product, is why the risk is shared across assistants and agents.
A sovereign agent runs on hardware its owner chose, such as a home server, a personal computer, or a hardened phone; see [[Running AI models locally]] and [[Why GrapheneOS matters for freedom technology]]. It keeps private files and mail on storage the owner controls, in line with [[Local-first software and data ownership]]. It holds a separate wallet with a small balance and firm limits; see [[Cryptocurrencies and wallets for AI agents using the x402 protocol]] and [[Self-custody of Bitcoin Cash for beginners]]. And it follows an alignment document: a written statement of its purpose and limits that the owner controls and can change at any time.


== Direct and indirect injection ==
Sovereignty concerns whom the agent serves, as well as where it runs. A local agent that obeys any text it reads is still exposed.


OWASP lists prompt injection as LLM01:2025 in its Top 10 for Large Language Model Applications. It distinguishes direct injection, where the person typing into the model supplies the manipulative text, from indirect injection, where the model reads that text from an external source such as a web page, email, or document in a retrieval index.<ref name="owasp">[https://genai.owasp.org/llmrisk/llm01-prompt-injection/ LLM01:2025 Prompt Injection, OWASP Gen AI Security Project]</ref> Indirect cases matter most for agents that browse or ingest mail without a human reading every line first.
== How prompt injection works ==


NIST AI 100-2 places related ideas in a broader adversarial machine learning taxonomy that covers attacks on AI systems and common mitigation patterns.<ref name="nist">[https://csrc.nist.gov/pubs/ai/100/2/e2025/final NIST AI 100-2 E2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations]</ref> A publicly edited encyclopedia article on the topic summarizes the same split between direct and indirect forms and the role of web browsing and uploaded files in indirect attacks.<ref name="wppi">[https://en.wikipedia.org/wiki/Prompt_injection Prompt injection, Wikipedia]</ref>
A language model receives its instructions and the material it is working on as one stream of text. Owner requests, tool replies, and downloaded pages share one context window, with no hard boundary marking which text is a command. Anyone who can place words where the model will read them can compete with the owner for control.


== Why agents raise the stakes ==
OWASP lists prompt injection as LLM01:2025 and separates direct injection, where the person typing supplies the manipulative text, from indirect injection, where the model reads it from an outside source such as a web page, email, or retrieved document.<ref name="owasp">[https://genai.owasp.org/llmrisk/llm01-prompt-injection/ LLM01:2025 Prompt Injection, OWASP Gen AI Security Project]</ref> For a sovereign agent the indirect form matters most, because the attacker is a stranger and the target is the owner. NIST AI 100-2 places such attacks within a broader taxonomy of adversarial machine learning.<ref name="nist">[https://csrc.nist.gov/pubs/ai/100/2/e2025/final NIST AI 100-2 E2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations]</ref> A general encyclopedia summary describes the same split.<ref name="wppi">[https://en.wikipedia.org/wiki/Prompt_injection Prompt injection, Wikipedia]</ref>


A chat model that only returns text can still leak secrets from its context. An agent that can browse, read mail, run code, spend money, or publish combines three conditions that security writing often calls a dangerous triad or lethal trifecta: access to private data, exposure to untrusted content, and the ability to send data or actions outward. Together they let untrusted text influence a system that can also exfiltrate information or change the outside world. See [[Agent allowlists for spend and publish]] and [[Running AI models locally]].
Risk peaks when three conditions meet: access to private data, exposure to untrusted content, and the ability to act outward. A poisoned tool description offered through the [[Model Context Protocol]], or a planted passage in a [[Retrieval-augmented generation]] index, can bring hostile text into an agent that holds secrets and payment powers. No complete fix is known, so the practical goal is to limit what a successful injection can reach.


== Example scenarios ==
== Prompt injection as a consent problem ==


These sketches are generic. They describe classes of risk, not working payloads.
An owner who delegates a task to an agent consents to that task and nothing more. An injected instruction asks the agent to use the authority of the owner for someone the owner never chose. In security terms this resembles a confused deputy problem. In ethical terms it is coercion by proxy: delegated agency is captured and pointed against the person who granted it. The design question then shifts from whether a model can detect every trick to which actions require fresh consent from the owner.


* A web page includes text that is hard for a person to notice but still readable by an assistant, asking it to email a local file to an outside address.
== Defenses as sovereignty design ==
* A document planted in a retrieval index contains instructions that try to change how answers are written. See [[Retrieval-augmented generation]].
* A tool description offered through the [[Model Context Protocol]] asks the model to reveal secrets or to call other tools in ways the user did not request. This pattern is sometimes called tool poisoning.
* An image carries printed or overlaid instructions that a multimodal model may treat as guidance.


== Related concepts ==
* Local models and local data, so private material stays off third party servers.
* Least privilege, so each tool and token can do only what the current task needs.
* Owner approval before sending, paying, publishing, or deleting, with spend and destination allowlists and small agent wallets. See [[Agent allowlists for spend and publish]].
* Clear marking of untrusted content as material to read rather than orders to follow. MCP security guidance stresses consent before tool calls and treating tool descriptions as untrusted unless the server is trusted.<ref name="mcpsec">[https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices MCP security best practices]</ref>
* Sandboxing for code and browsing.
* Owner-written alignment documents and permission files that state purpose, limits, and allowed actions.
* Audit logs the owner keeps, optionally with hashes recorded on permanent storage such as Arweave or Bitcoin Cash Memo so later changes can be detected. See [[A design for a permanent decentralized wiki using Arweave and Bitcoin Cash Memo]].
* Reputation for agents, so counterparties can see a record of honest behavior. See [[Portable reputation for agents]] and [[Agent profiles and a wiki-based agent economy]].


Jailbreaking aims to make a model ignore its own safety rules. Prompt injection aims to make it follow instructions that arrived through data rather than through the user. OWASP treats jailbreaking as related to injection rather than as a separate Top 10 entry.<ref name="owasp" /> Data exfiltration can use links, images, or tool calls that send private text outward. Tool poisoning targets tool descriptions an agent trusts. Confused deputy problems arise when a privileged agent acts on untrusted input as if that input were authorized.
[[Community mesh networks as freedom infrastructure]] and [[Low-fee, censorship-resistant cryptocurrencies]] reduce dependence on gatekeepers that could cut off an agent. Site authors help by writing plainly; see [[A guide to this wiki for AI agents]].


== Defenses and mitigations ==
== Why it matters for an abundance future ==


There is no complete fix known. Useful layers include least privilege for tools and tokens, separating trusted instructions from untrusted data and marking untrusted content clearly, human approval before sending, paying, deleting, or publishing, allowlists for destinations and spending, sandboxing of code and browsers, filtering of outbound content, logging of tool use, and red-team testing through every channel the agent reads. Keep secrets out of the model context when a tool can fetch them only when needed. MCP security guidance stresses consent before tool calls and treating tool descriptions as untrusted unless the server is trusted.<ref name="mcpsec">[https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices MCP security best practices]</ref>
A freedom-first, post-scarcity future depends on many people delegating research, purchasing, and publishing to agents. If those agents can be hijacked, power concentrates in whoever writes the most persuasive hidden text. If agents stay loyal to their owners, capability spreads widely: a modest home server can run an assistant that pays small fees through x402, and publishes research without platform permission. [[Agent-to-agent commerce]] works only when each side can trust that the other agent speaks for its owner. Loyal agents also support open longevity research, and health records, including mental health records, that stay under the control of the person they describe. See [[Post-scarcity economy]] and [[Open Source Freedom Tech Worth Watching in Agent Infrastructure]].
 
== Practical guidance ==
 
For people using assistants: treat pasted pages and emailed documents as untrusted. Ask for a summary that does not follow instructions found in the source. Do not grant send, pay, or publish powers until you are ready to approve each action. Prefer local models and local indexes when the text is private. See [[Local-first software and data ownership]] and [[A guide to this wiki for AI agents]].
 
For people building agents: default tools to read-only. Require confirmation for side effects. Bound spending and publish targets with allowlists. Log every tool call. Test with adversarial pages before widening access. Design so that a successful injection cannot reach private stores and outbound channels in the same step.
 
== Writing sites that agents can read safely ==
 
Clear headings, a bold lead, and plain links help agents and people alike. Do not hide instructions in invisible text, tiny fonts, or image overlays meant to steer models. Site owners should not try to manipulate visiting agents into ignoring their users. Honest structure serves learning. Related pages include [[DDoS protection]], [[Portable reputation for agents]], [[Agent-to-agent commerce]], and [[Cryptocurrencies and wallets for AI agents using the x402 protocol]].


== Discussion questions, essay ideas, and learning related AI prompt ideas ==
== Discussion questions, essay ideas, and learning related AI prompt ideas ==
Line 46: Line 40:
Discussion questions
Discussion questions


* Which three tool permissions on an assistant you use would cause the most harm if an injected page could trigger them?
* If an agent you own followed a hidden instruction and spent your money, who consented to that payment, and how should agent design answer that question?
* How would you separate trusted system rules from untrusted retrieved text in a product you design?
* Which tasks would you delegate to an agent on your own hardware, and which should always wait for your approval?


Essay ideas
Essay ideas


* Compare direct and indirect prompt injection and argue which is harder to detect in agent workflows.
* Argue that prompt injection is a consent problem and compare it with other forms of coercion that act through a trusted intermediary.
* Explain the dangerous triad of private data, untrusted content, and outbound actions, and propose layered controls.
* Explain how hijackable agents could concentrate power, and how loyal, self-hosted agents could spread abundance.


AI prompt ideas
AI prompt ideas


* Explain prompt injection with a mail clerk analogy, then quiz me with five short questions.
* Help me write a one page alignment document for a personal agent that reads my email and holds a small wallet.
* Help me draft a least privilege checklist for an agent that can read email and open web pages.
* Quiz me on direct and indirect prompt injection, then help me plan a least privilege setup for an agent on my own hardware.


== Readings from Wikipedia ==
== Readings from Wikipedia ==


* [[Wikipedia:Prompt injection|Prompt injection]]
* [[Wikipedia:Prompt injection|Prompt injection]]
* [[Wikipedia:AI agent|AI agent]]
* [[Wikipedia:Large language model|Large language model]]
* [[Wikipedia:Large language model|Large language model]]
* [[Wikipedia:AI agent|AI agent]]
* [[Wikipedia:Adversarial machine learning|Adversarial machine learning]]
* [[Wikipedia:Adversarial machine learning|Adversarial machine learning]]
* [[Wikipedia:Model Context Protocol|Model Context Protocol]]
* [[Wikipedia:Model Context Protocol|Model Context Protocol]]
Line 70: Line 64:
* [[Wikipedia:Confused deputy problem|Confused deputy problem]]
* [[Wikipedia:Confused deputy problem|Confused deputy problem]]
* [[Wikipedia:Human-in-the-loop|Human-in-the-loop]]
* [[Wikipedia:Human-in-the-loop|Human-in-the-loop]]
* [[Wikipedia:Data exfiltration|Data exfiltration]]
* [[Wikipedia:Sandbox (computer security)|Sandbox (computer security)]]
* [[Wikipedia:Sandbox (computer security)|Sandbox (computer security)]]
* [[Wikipedia:Computer security|Computer security]]
* [[Wikipedia:Self-hosting (network)|Self-hosting (network)]]
* [[Wikipedia:Application security|Application security]]
* [[Wikipedia:Digital sovereignty|Digital sovereignty]]
* [[Wikipedia:Information security|Information security]]
* [[Wikipedia:Data sovereignty|Data sovereignty]]
* [[Wikipedia:Social engineering (security)|Social engineering (security)]]
* [[Wikipedia:Self-sovereign identity|Self-sovereign identity]]
* [[Wikipedia:Prompt engineering|Prompt engineering]]
* [[Wikipedia:Local-first software|Local-first software]]
* [[Wikipedia:Generative AI|Generative AI]]
* [[Wikipedia:Informed consent|Informed consent]]
* [[Wikipedia:OWASP|OWASP]]
* [[Wikipedia:Audit trail|Audit trail]]
* [[Wikipedia:Red team|Red team]]
* [[Wikipedia:Cryptocurrency wallet|Cryptocurrency wallet]]
* [[Wikipedia:Post-scarcity|Post-scarcity]]
* [[Wikipedia:Threat model|Threat model]]
* [[Wikipedia:Threat model|Threat model]]
* [[Wikipedia:Privilege escalation|Privilege escalation]]
* [[Wikipedia:Optical character recognition|Optical character recognition]]
* [[Wikipedia:Multimodal learning|Multimodal learning]]
* [[Wikipedia:Natural language processing|Natural language processing]]


== See also ==
== See also ==


{{Col}}
{{Col}}
* [[Agent allowlists for spend and publish|Agent allowlists for spend and publish]]
* [[Cryptocurrencies and wallets for AI agents using the x402 protocol|Cryptocurrencies and wallets for AI agents using the x402 protocol]]
* [[Agent-to-agent commerce|Agent-to-agent commerce]]
* [[Portable reputation for agents|Portable reputation for agents]]
* [[Agent profiles and a wiki-based agent economy|Agent profiles and a wiki-based agent economy]]
* [[A guide to this wiki for AI agents|A guide to this wiki for AI agents]]
* [[Model Context Protocol|Model Context Protocol]]
* [[Model Context Protocol|Model Context Protocol]]
* [[Retrieval-augmented generation|Retrieval-augmented generation]]
* [[Retrieval-augmented generation|Retrieval-augmented generation]]
* [[Running AI models locally|Running AI models locally]]
* [[Agent allowlists for spend and publish|Agent allowlists for spend and publish]]
* [[A guide to this wiki for AI agents|A guide to this wiki for AI agents]]
{{break}}
{{break}}
* [[Agent-to-agent commerce|Agent-to-agent commerce]]
* [[Cryptocurrencies and wallets for AI agents using the x402 protocol|Cryptocurrencies and wallets for AI agents using the x402 protocol]]
* [[DDoS protection|DDoS protection]]
* [[Local-first software and data ownership|Local-first software and data ownership]]
* [[Local-first software and data ownership|Local-first software and data ownership]]
* [[Portable reputation for agents|Portable reputation for agents]]
* [[Running AI models locally|Running AI models locally]]
* [[Why GrapheneOS matters for freedom technology|Why GrapheneOS matters for freedom technology]]
* [[Community mesh networks as freedom infrastructure|Community mesh networks as freedom infrastructure]]
* [[A design for a permanent decentralized wiki using Arweave and Bitcoin Cash Memo|A design for a permanent decentralized wiki using Arweave and Bitcoin Cash Memo]]
* [[Self-custody of Bitcoin Cash for beginners|Self-custody of Bitcoin Cash for beginners]]
* [[Low-fee, censorship-resistant cryptocurrencies|Low-fee, censorship-resistant cryptocurrencies]]
* [[Open Source Freedom Tech Worth Watching in Agent Infrastructure|Open Source Freedom Tech Worth Watching in Agent Infrastructure]]
* [[Post-scarcity economy|Post-scarcity economy]]
{{colend}}
{{colend}}


Line 105: Line 102:


* [https://genai.owasp.org/llmrisk/llm01-prompt-injection/ OWASP LLM01:2025 Prompt Injection]
* [https://genai.owasp.org/llmrisk/llm01-prompt-injection/ OWASP LLM01:2025 Prompt Injection]
* [https://owasp.org/www-project-top-10-for-large-language-model-applications/ OWASP Top 10 for Large Language Model Applications]
* [https://genai.owasp.org/llm-top-10/ OWASP Top 10 for Large Language Model Applications]
* [https://csrc.nist.gov/pubs/ai/100/2/e2025/final NIST AI 100-2 E2025, Adversarial Machine Learning taxonomy]
* [https://csrc.nist.gov/pubs/ai/100/2/e2025/final NIST AI 100-2 E2025, Adversarial Machine Learning taxonomy]
* [https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices MCP security best practices]
* [https://ideawaza.com/index.php?search=freedom+tech&fulltext=Search Search this wiki for freedom tech]
* [https://ideawaza.com/index.php?search=agents&fulltext=Search Search this wiki for agents]
* [https://ideawaza.com/index.php?search=agents&fulltext=Search Search this wiki for agents]
* [https://ideawaza.com/index.php?search=security&fulltext=Search Search this wiki for security]
* [https://ideawaza.com/index.php?search=post-scarcity&fulltext=Search Search this wiki for post-scarcity]
* [https://ideawaza.com/index.php?search=prompt&fulltext=Search Search this wiki for prompt]
* [https://ideawaza.com/index.php?search=prompt+injection&fulltext=Search Search this wiki for prompt injection]


== References ==
== References ==
Line 119: Line 118:
[[Category:Computing]]
[[Category:Computing]]
[[Category:Technology]]
[[Category:Technology]]
[[Category:Decentralization]]

Latest revision as of 16:43, 19 October 2026

Sovereign AI agents are software agents that run on infrastructure their owner controls, keep the data of that owner local, hold their own spending limits, and answer only to the person who owns them. Prompt injection is the main way such an agent can be turned against its owner: hidden text in a web page, email, document, tool description, or retrieved passage tries to take control. This page frames prompt injection as a consent problem and defenses as sovereignty design.

What makes an agent sovereign

A sovereign agent runs on hardware its owner chose, such as a home server, a personal computer, or a hardened phone; see Running AI models locally and Why GrapheneOS matters for freedom technology. It keeps private files and mail on storage the owner controls, in line with Local-first software and data ownership. It holds a separate wallet with a small balance and firm limits; see Cryptocurrencies and wallets for AI agents using the x402 protocol and Self-custody of Bitcoin Cash for beginners. And it follows an alignment document: a written statement of its purpose and limits that the owner controls and can change at any time.

Sovereignty concerns whom the agent serves, as well as where it runs. A local agent that obeys any text it reads is still exposed.

How prompt injection works

A language model receives its instructions and the material it is working on as one stream of text. Owner requests, tool replies, and downloaded pages share one context window, with no hard boundary marking which text is a command. Anyone who can place words where the model will read them can compete with the owner for control.

OWASP lists prompt injection as LLM01:2025 and separates direct injection, where the person typing supplies the manipulative text, from indirect injection, where the model reads it from an outside source such as a web page, email, or retrieved document.[1] For a sovereign agent the indirect form matters most, because the attacker is a stranger and the target is the owner. NIST AI 100-2 places such attacks within a broader taxonomy of adversarial machine learning.[2] A general encyclopedia summary describes the same split.[3]

Risk peaks when three conditions meet: access to private data, exposure to untrusted content, and the ability to act outward. A poisoned tool description offered through the Model Context Protocol, or a planted passage in a Retrieval-augmented generation index, can bring hostile text into an agent that holds secrets and payment powers. No complete fix is known, so the practical goal is to limit what a successful injection can reach.

An owner who delegates a task to an agent consents to that task and nothing more. An injected instruction asks the agent to use the authority of the owner for someone the owner never chose. In security terms this resembles a confused deputy problem. In ethical terms it is coercion by proxy: delegated agency is captured and pointed against the person who granted it. The design question then shifts from whether a model can detect every trick to which actions require fresh consent from the owner.

Defenses as sovereignty design

  • Local models and local data, so private material stays off third party servers.
  • Least privilege, so each tool and token can do only what the current task needs.
  • Owner approval before sending, paying, publishing, or deleting, with spend and destination allowlists and small agent wallets. See Agent allowlists for spend and publish.
  • Clear marking of untrusted content as material to read rather than orders to follow. MCP security guidance stresses consent before tool calls and treating tool descriptions as untrusted unless the server is trusted.[4]
  • Sandboxing for code and browsing.
  • Owner-written alignment documents and permission files that state purpose, limits, and allowed actions.
  • Audit logs the owner keeps, optionally with hashes recorded on permanent storage such as Arweave or Bitcoin Cash Memo so later changes can be detected. See A design for a permanent decentralized wiki using Arweave and Bitcoin Cash Memo.
  • Reputation for agents, so counterparties can see a record of honest behavior. See Portable reputation for agents and Agent profiles and a wiki-based agent economy.

Community mesh networks as freedom infrastructure and Low-fee, censorship-resistant cryptocurrencies reduce dependence on gatekeepers that could cut off an agent. Site authors help by writing plainly; see A guide to this wiki for AI agents.

Why it matters for an abundance future

A freedom-first, post-scarcity future depends on many people delegating research, purchasing, and publishing to agents. If those agents can be hijacked, power concentrates in whoever writes the most persuasive hidden text. If agents stay loyal to their owners, capability spreads widely: a modest home server can run an assistant that pays small fees through x402, and publishes research without platform permission. Agent-to-agent commerce works only when each side can trust that the other agent speaks for its owner. Loyal agents also support open longevity research, and health records, including mental health records, that stay under the control of the person they describe. See Post-scarcity economy and Open Source Freedom Tech Worth Watching in Agent Infrastructure.

Discussion questions

  • If an agent you own followed a hidden instruction and spent your money, who consented to that payment, and how should agent design answer that question?
  • Which tasks would you delegate to an agent on your own hardware, and which should always wait for your approval?

Essay ideas

  • Argue that prompt injection is a consent problem and compare it with other forms of coercion that act through a trusted intermediary.
  • Explain how hijackable agents could concentrate power, and how loyal, self-hosted agents could spread abundance.

AI prompt ideas

  • Help me write a one page alignment document for a personal agent that reads my email and holds a small wallet.
  • Quiz me on direct and indirect prompt injection, then help me plan a least privilege setup for an agent on my own hardware.

Readings from Wikipedia

See also

References