Skip to content

feat(multiagent): Sprint 22 β€” inter-agent / Agent-in-the-Middle attack battery (v1.12.0) - #14

Merged
konjoinfinity merged 1 commit into
mainfrom
claude/konjo-toki-lkvusj
Jun 24, 2026
Merged

feat(multiagent): Sprint 22 β€” inter-agent / Agent-in-the-Middle attack battery (v1.12.0)#14
konjoinfinity merged 1 commit into
mainfrom
claude/konjo-toki-lkvusj

Conversation

@konjoinfinity

Copy link
Copy Markdown
Contributor

Sprint 22 β€” Multi-Agent / Inter-Agent Attack Battery (v1.12.0)

Motivation

A fresh Konjo Discovery sweep (run after the P3 backlog was cleared) showed the 2026 frontier has moved past single-agent attacks (which toki.agentic already covers) to multi-agent systems. The inter-agent message channel is the new attack surface: an adversarial Agent-in-the-Middle intercepts, tampers with, or spoofs agent-to-agent messages so a downstream agent acts on attacker content believing it came from a trusted peer (OWASP ASI 2026 insecure inter-agent comms; arXiv 2510.06445, SIRAJ 2510.26037). toki had nothing for multi-agent topologies.

What's new β€” toki.multiagent (zero external deps)

  • MultiAgentAttackType (8): message tampering / interception, identity spoofing, instruction injection, goal-hijacking relay, memory-relay poisoning, trust exploitation, capability escalation β€” each mapped to an OWASP ASI 2026 category
  • MultiAgentScenario / MultiAgentVerdict (frozen) β€” agent topology, sender provenance, original vs tampered message, deterministic SHA-256 seed
  • MultiAgentBattery β€” 32 deterministic cases (4/type) modelling a MITM on one channel of an agent pipeline
  • MultiAgentEvaluator β€” flags whether the downstream agent acted on tampered content or held to provenance/policy

Integration

  • toki.coverage β€” new multiagent category axis (critical), routed without misrouting to agentic/multiturn
  • CLI: python -m toki multiagent [--type all|<name>] [--json]
  • toki.__init__ exports + __version__ β†’ 1.12.0; pyproject.toml bumped

Live demo

The battery against a mock safe downstream agent (verifies sender provenance) blocks all 32 attacks β†’ ASR 0%, mean score 1.0; echoing the tampered message back yields ASR > 0 across every type.

Verification

  • 763/763 Python tests passing (744 prior + 19 new); toki.multiagent 100% covered
  • ruff check/format clean on new files; vulture clean; all functions ≀ grade B; cargo test green
  • PLAN.md + CHANGELOG.md updated

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01WRE1YLhT6aNP4GZT8zbw6q


Generated by Claude Code

…k battery (v1.12.0)

A fresh Discovery sweep showed the 2026 frontier has moved past single-agent
attacks (toki.agentic) to multi-agent systems: the inter-agent message channel
is the new attack surface. An adversarial Agent-in-the-Middle intercepts,
tampers with, or spoofs agent-to-agent messages so a downstream agent acts on
attacker content believing it came from a trusted peer (OWASP ASI 2026;
arXiv 2510.06445 / 2510.26037).

- toki.multiagent: MultiAgentAttackType (8 inter-agent threats) + OWASP_ASI
  mapping; MultiAgentBattery (32 deterministic cases, 4/type) modelling a MITM
  on an agent pipeline; MultiAgentEvaluator scoring whether the downstream agent
  acted on tampered content vs held to provenance; MultiAgentScenario/Verdict
- toki.coverage: new "multiagent" category axis (critical), routed without
  misrouting to agentic/multiturn
- CLI: python -m toki multiagent [--type] [--json]
- toki.__init__ exports; version 1.11.0 -> 1.12.0; pyproject bumped
- 19 new tests (16 module + 3 CLI); 763/763 passing; module 100% covered

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WRE1YLhT6aNP4GZT8zbw6q
@konjoinfinity
konjoinfinity marked this pull request as ready for review June 24, 2026 12:33
@konjoinfinity
konjoinfinity merged commit 219d1d4 into main Jun 24, 2026
7 checks passed
@konjoinfinity
konjoinfinity deleted the claude/konjo-toki-lkvusj branch June 24, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants