More screenshots
Works with the AI Agents you already use
Scoped View: Least Privilege for Multi-Agent Systems
Add scoped views, private memory and default-deny tool checks to your multi-agent runtime. Includes an offline Python demo, denial tests and audit records.
$9
Scoped View: Least Privilege for Multi-Agent Systems
Example session with this skill installed
Use Scoped AgentView to run the bundled offline demonstration and self-tests. Show the analyst's and editor's scoped data and permitted tools. Demonstrate the editor reviewing its own record, then show the analyst being denied access to the editor-only tool, the editor's record, and the editor's private memory. Check that rejected requests leave state and handler invocation counts unchanged, and report the audit and self-test results.
- Read your context and instructions
- Compiled the scoped view
Offline demonstration completed
I ran the bundled Scoped AgentView v0.1.1 script using Python 3.11 and the standard library:
python3 scoped_agentview.py --demo
python3 scoped_agentview.py --self-test
Both commands exited with code 0. The demonstration used synthetic, in-memory data without API keys, network calls, or third-party packages.
Scoped views
| Role | Visible record fields | Private memory | Shared memory | Permitted tools |
|---|---|---|---|---|
| Analyst | title: Research brief; profile.status: ready | A_PRIVATE_MEMORY | SHARED_RELEASE_DATE | read_record |
| Editor | title: Editorial draft; profile.status: ready | B_PRIVATE_MEMORY | None | read_record, mark_reviewed |
Each individual view excludes the other role's private memory and history. Internal record fields and unlisted nested fields are excluded from the projections.
This developer-facing report shows both synthetic viewpoints sequentially. Isolation is checked within each individual view.
All six demonstration requests
| Request | Status | Reason code | Result |
|---|---|---|---|
| Analyst reads its scoped view | allow | ok | Receives its authorized context |
| Editor reads its scoped view | allow | ok | Receives its authorized context |
| Editor calls mark_reviewed on its own case-b | allow | ok | Record status becomes reviewed |
| Analyst calls mark_reviewed on its own case-a | deny | tool_denied | State and handler invocation counts unchanged |
| Analyst calls read_record on the editor's case-b | deny | resource_denied | State and handler invocation counts unchanged |
| Analyst requests the editor's private memory | deny | resource_denied | No data returned; state and handler invocation counts unchanged |
Final tool-handler invocation counts
{
"read_record": 0,
"mark_reviewed": 1
}
These counters measure invocations, not successful operations. A handler invocation that raises an exception is still counted.
Audit results
The six requests produced nine audit events:
- Three allowed requests each recorded an authorization decision and an execution result: six events.
- Three denied requests each recorded a rejection decision: three events.
Rejected requests did not reach their tool handlers. Audit events contain request correlation, actor identity, stages and reason codes rather than raw private values.
Self-test results
All 13 built-in checks, T01–T13, passed with exit code 0. They cover scoped views, field projections, memory permissions, default deny, tool authorization, resource checks, instruction-like input, detached snapshots, memory writes, output boundaries, audit correlation and failure handling.
The failure-handling test also confirmed that required audit recording failure before execution prevents the handler from running.
Next steps
To apply this pattern to an existing application, map its roles, data fields, memory scopes and tool resources using the integration guide. Add regression tests at that application's actual entry points.
These results verify the bundled demonstration. They do not establish that an unrelated application is already isolated or provide an OS/process sandbox.
Connects securely to your tools. The creator never sees your data.
About this skill
Multi-agent systems can expose private data or tools to roles that should not have access. Scoped AgentView helps you implement explicit role boundaries in your application runtime: field-level views, private/shared memory scopes, and authorization checks before tool handlers run.
What it does
- Scope agent views: Project records onto explicitly allowed fields, including exact nested field paths.
- Separate memory scopes: Keep role-private memory separate from explicitly authorized shared content, with distinct read and write permissions.
- Enforce default deny: Validate host-bound identity, request arguments, tool permissions, and resource ownership before invoking a handler.
- Filter outputs: Apply boundaries to history and tool results, and return detached snapshots.
- Record decisions: Capture request IDs, actor identity, decision stages, and outcome codes without logging raw private values.
What's included
- SKILL.md: Principles, implementation steps, anti-patterns, a runnable example, and FAQ.
- scripts/scoped_agentview.py: A self-contained offline Python demonstration using synthetic data and the standard library. No API keys or third-party packages are required.
- references/integration-guide.md: A permission matrix, request contract, and checklist for integrating the pattern into an existing runtime.
- references/limitations.md: Trust assumptions and operational limits.
- 13 built-in self-tests: T01–T13 cover allowed and denied access, state separation, and failure handling.
How it works
- Define each role's responsibilities, data ownership, and authorized shared content.
- Configure exact field paths, memory permissions, tools, and permitted resources.
- Enforce checks at the application's actual model/tool boundary.
- Run the bundled demonstration and self-tests, then add regression tests for your own integration.
This is an implementation pattern to adapt, rather than a drop-in library that automatically secures an existing application.
Demonstrated behavior
The editor can review its own record, changing its status to reviewed. The analyst cannot invoke the editor-only mark_reviewed tool, read the editor's record, or retrieve the editor's private memory.
The demonstration produces six requests and nine audit events. Each rejected request leaves canonical state and handler invocation counts unchanged. Handler counts measure invocations, including calls that raise an exception, rather than successful operations.
The script imports no adjacent files and runs from an empty working directory. Requires Python 3.11+.
Use cases
- Separating analyst and editor access to private records and memory.
- Restricting reviewer roles from invoking writer-only tools.
- Excluding internal fields from model context and tool responses.
- Testing and reviewing authorization decisions in a host-controlled multi-agent runtime.
Known limitations
Application-layer authorization only. The host program, identity binding, policies, handlers, and audit sink are trusted components.
This is not an OS, filesystem, container, or database tenant sandbox. It does not guarantee resistance to every prompt injection or malicious host code.
Audit records are in memory and are neither durable nor tamper-proof. Running the bundled tests validates the demonstration; your own integration requires its own tests.
Reuse
The bundled demo script may be permanently incorporated into your own project and used commercially. SKILL.md, the reference text, and the whole skill package may not be resold or redistributed.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Requires Python 3.11+ for the offline demo. Applying the pattern to an existing application requires defining its roles, data permissions and tool boundaries, then adding integration tests. The example trusts the host program, identity binding and policy configuration. It does not provide OS or filesystem isolation, durable or tamper-proof audit logs, or protection against every prompt injection. Best suited to multi-agent runtimes with distinct roles and permissions.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 13 days ago
- Software
Python 3.11+ (standard library only)
Permissions
The offline demo requires reading the bundled instructions and script, writing a temporary script file, and executing Python 3.11+. It uses synthetic, in-memory data and requires no third-party Python packages, network calls, API keys, environment variables, or connected external accounts. Temporary file locations are chosen by the agent host. Integrating the pattern into an existing project may require reading and modifying buyer-authorized project files, with buyer confirmation before writes. The demo writes no persistent business data. Audit events are kept in memory and displayed in the terminal output.