Skip to content

docs(learn): add tool-call gating with Tessera (multi-agent example)#5627

Draft
kenithphilip wants to merge 2 commits intocrewAIInc:mainfrom
kenithphilip:docs/tessera-tool-call-gating
Draft

docs(learn): add tool-call gating with Tessera (multi-agent example)#5627
kenithphilip wants to merge 2 commits intocrewAIInc:mainfrom
kenithphilip:docs/tessera-tool-call-gating

Conversation

@kenithphilip
Copy link
Copy Markdown

Summary

Adds a Learn how-to page introducing Tessera, an Apache-2.0 library that gates sensitive tool calls in multi-agent crews when the active context contains untrusted segments. CrewAI's multi-agent flow is one of the canonical scenarios where indirect prompt injection (OWASP Agentic ASI01) compounds across delegation; Tessera's per-segment provenance gives the crew an automatic floor.

Why this PR is here now

A previous draft of this PR was held back because the example needed to demonstrate the multi-agent failure mode end-to-end, not just the single-agent wiring. This PR ships:

  • A runnable demo at examples/crewai_multi_agent_gated.py in the Tessera repo: a Researcher + Planner crew with a poisoned page served by a local stub. Demo verified locally to emit POLICY_DENY for the injected book_hotel(name='Cabo Resort', nights=30) while allowing the user-requested book_hotel(name='The Plaza', nights=2).
  • A docs/en/learn/tool-call-gating-with-tessera.mdx page (~150 lines) that walks through the same scenario.

What this adds

  • docs/en/learn/tool-call-gating-with-tessera.mdx (new page).
  • 10 nav entries in docs/docs.json (one per tab variant). Surgical regex edit; the file is otherwise unchanged.

Test plan

  • Adapter test exists upstream at tests/test_crewai_adapter.py.
  • Worked example in the docs is the same example file the runnable demo links to.
  • python3 -c "import json; json.load(open('docs/docs.json'))" validates the docs.json after the surgical regex edit.

Why draft

First downstream-introduction PR from Tessera; submitting as draft so the CrewAI docs maintainers can guide on placement (Learn vs. Observability vs. Concepts), tone, or whether to fold this into an existing security-related page.

DCO sign-off applied per the Tessera contribution policy.

Adds a Learn how-to page introducing [Tessera](https://github.com/kenithphilip/Tessera),
an Apache-2.0 library that gates sensitive tool calls in
multi-agent crews when the active context contains untrusted
segments (the canonical OWASP Agentic ASI01 indirect-prompt-
injection vector).

The page walks through the canonical injection scenario in a
multi-agent setup:

- Researcher agent fetches a hotel review URL via fetch_url
  (output labelled UNTRUSTED).
- Planner agent consumes the research output and tries to
  invoke book_hotel.
- An attacker-controlled page contains an injection that
  asks the planner to book a different hotel.

Without a guard, the planner's LLM follows the injection.
With TesseraCrewCallback wired as step_callback, book_hotel is
denied because the active context's min_trust is below the
policy's USER floor.

Includes the wiring (Agent / Task / Crew / step_callback) and
links to a runnable end-to-end demo at
examples/crewai_multi_agent_gated.py in the Tessera repo.

Adds the page to the en/learn nav across the multi-tab docs
config (10 group entries).

No CrewAI code changes; documentation only.

Signed-off-by: Kenith Philip <kennethpallota@gmail.com>
kenithphilip added a commit to kenithphilip/Tessera that referenced this pull request Apr 26, 2026
Companion to the upstream CrewAI docs PR
(crewAIInc/crewAI#5627). Demonstrates the canonical OWASP
Agentic ASI01 failure mode in a multi-agent crew:

- Researcher fetches a hotel review URL (output labelled
  UNTRUSTED).
- Planner consumes the research and tries book_hotel.
- Poisoned page injects an instruction to book a different
  hotel for far more nights.
- TesseraCrewCallback denies book_hotel because the active
  context's min_trust is UNTRUSTED, below the policy's USER
  floor for that tool.

Synthetic-policy fallback path runs when crewai is not
installed, so the example stays exercisable in environments
without the optional [crewai] extra (verified locally: prints
POLICY_DENY with the right reason and exits 0).
Two lint fixes:
- E401: split 'import os, secrets' into separate lines.
- F821: replace _do_fetch / _do_book references with self-
  contained inline returns so the example imports cleanly
  with just the documented dep pins.

Signed-off-by: Kenith Philip <kennethpallota@gmail.com>
@kenithphilip
Copy link
Copy Markdown
Author

Tangentially: Tessera (the upstream library this PR introduces a callback for) is recruiting 2 co-maintainers from any other organisation as the gate for an OpenSSF Sandbox application. If anyone reviewing this PR or active in the repo's community is interested, the public ask is at kenithphilip/Tessera#21. No expectation that you read or weigh in here, just leaving the link visible in case it's a fit.

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.

1 participant