Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 1.1 KB

File metadata and controls

43 lines (34 loc) · 1.1 KB
Agent Scope

agent-scope

A security layer that ensures agents can only use the tools they're explicitly allowed to access.

Install

bun add agents-scope

Usage

import { createAgentScope } from "agents-scope";

const scope = createAgentScope({
  agents: [
    { id: "researcher", permissions: ["read_doc"] },
    { id: "admin", permissions: ["read_doc", "admin_delete_user"] },
  ],
});

// pass the tool and tool_id
const secureTool = scope.agent("researcher").secureTool(tool, "read_doc");

Any attempt by the research agent to execute admin_delete_user will be blocked.