Everything in this series so far has assumed the agents themselves are well-behaved. Identity proves who is calling. Allowlists decide who may call. Owners, versions and escalation keep shared state honest.
This last part deals with the uncomfortable case: an agent that is exactly who it says it is, allowed to do what it's doing, and still wrong, because something it read told it what to do.
Injection doesn't stay where it lands
Prompt injection is well known by now. It's the first item on the OWASP list of risks for LLM applications. Most discussions picture one model reading one hostile document.
Multi-agent systems make it travel. A research agent reads a web page with hidden text. It summarizes faithfully, including the instruction, because the instruction was part of the page. The planner reads that summary and treats it as a finding. The writer turns the plan into an email. Three hops later, a sentence a stranger put on a web page is driving an action, and every individual agent behaved reasonably given what it was handed.
The core mistake is treating another agent's output as trusted because it came from "inside" the system. It didn't originate inside. It passed through.
Treat agent output as input
The rule I'd put on a poster: content from another agent is data, never instructions, unless something you control says otherwise.
In practice that means three things.
Tag where it came from. Every message or state value that originates from another agent carries its source: which agent, which run, and whether that agent touched external content. The receiving agent's prompt can then show it clearly as "output from web-agent, which read external pages", inside a delimited block, separate from its own instructions. Research on this approach (sometimes called spotlighting) shows that marking untrusted text clearly reduces how often models follow instructions hidden in it. It doesn't eliminate it, which is why it's only the first layer.
Check its shape before it reaches a prompt. If the research agent is supposed to return { summary, plans[], sources[] }, validate that on the way in. A schema won't catch a malicious sentence inside summary, but it stops the easy tricks: extra fields, instructions smuggled into a field that should be a number, a payload ten times the expected size.
Prefer structured handoffs. The more agents hand each other typed fields instead of free text, the less room there is for instructions to ride along. "risk: high, reasons: [3 chargebacks]" is much harder to weaponise than a paragraph.
Containment beats detection
Here's the honest part: no filter catches every injection. Models can be steered by text that looks perfectly innocent. So the guard above reduces the odds, and the rest of this series is what limits the damage when it fails.
If the research agent is compromised, it can only call agents that list it (part 3). The call chain stops it reaching the email sender through a trusted middleman. It can't use tools nobody approved for it (part 4). It can't overwrite decisions it doesn't own (part 5). And a sudden burst of denials from it shows up in Traces as an alert.
Detection is a nice-to-have. Containment is the actual security model.
Trust should be earned from history
The last piece is the one people ask about most: shouldn't some agents be trusted more than others?
Yes, and that trust should come from evidence, not from someone's opinion of which agent is "the senior one". A platform that traces every run already has the evidence:
- feedback from people reviewing the agent's outputs,
- error rate on its runs and tool calls,
- regressions when its new versions are tested against past runs,
- denials it triggered, especially new kinds.
Combine those into a score per agent, update it regularly, and let it decay so last quarter's good behavior doesn't cover for this week's problems.
Then use it carefully. Two uses I'm comfortable with:
- Vote weights in escalations (part 7). An agent with a long clean record counts for more than one that started failing yesterday.
- Review rules, like "writes from agents scoring below X need review before they take effect".
And one I'm not: never let a score grant permissions. A high score can reduce friction inside what an agent is already allowed to do. It should never let an agent do something it isn't allowed to do. Scores can be gamed and they lag behind reality. Permissions are a deliberate decision by a person, and they should stay that way.
Putting it all in one place
Trust settings that live in eight different config files don't get reviewed. That's why DNotifier puts it on a single screen per project: who can call whom, pending proposals and conflicts, open escalations, and trust scores, each linking back to the traces that explain them.
How DNotifier handles it
Untrusted-content guard. Messages and state values that come from other agents are tagged with their source. Optionally they're checked against a schema before they reach the receiving agent's prompt, and by default, content from another agent is never treated as instructions.
Trust score per agent. Built from what tracing records about each agent: feedback, error rate, test regressions and denials. It updates daily and is used as vote weights in escalations and in review rules like "writes from agents below X need review". It never grants permissions.
Trust and state screen in the portal. A who-can-call-whom matrix, pending proposals and conflicts, escalations and trust scores, all linked to Traces, so owners see and edit trust settings in one place.
The claim behind this whole series: trust is earned from traced history, not assumed.
The whole series in one paragraph
Message passing moves data. Multi-agent systems also need agents with real identities issued by the platform, receivers that decide who may call them, permissions someone actually approved, shared state where every key has an owner and a rule, writes that check what they're overwriting, a clear path for disagreements to reach a judge, a vote or a person, and a healthy suspicion of anything another agent hands you. None of that is exotic. It's the same discipline we've applied to distributed services for years, adjusted for components that think for ten seconds and can be talked into things.
Start from the beginning: multi-agent systems need shared context, not just message passing.
FAQ
Can prompt injection spread between agents?
Yes. An agent that reads injected content can pass the instructions on in its output, and the next agent may act on them. Treat agent output as untrusted input, tag its source, validate its shape, and limit what each agent can reach.
Can a schema stop prompt injection?
Not by itself. It blocks structural tricks and keeps handoffs typed. Instructions hidden in a free-text field still need the other layers: source tagging, clear separation in the prompt, and authorization limits.
How is an agent trust score calculated?
From traced history: human feedback, error rates, regressions in tests against past runs, and denials. Weight recent behavior more, and let old results decay.
Should a high trust score give an agent more permissions?
No. Use scores to adjust review and vote weight within existing permissions. Granting permissions stays a human decision.



