← Securing Autonomous AI Agents
Blast-radius control 01 of 05
01

Capability scoping

Least privilege per invocation, not per agent.

Stop handing agents an identity that carries the union of every permission any task might ever need. Instead, expose a task-scoped interface: a class or wrapper that only surfaces the methods the current job requires. The agent can't route around what it can't see. Here's an email drafting agent. It gets one thread, one draft method, and nothing else.

// Bad: the agent gets the full Gmail SDK.
// It can read all mail, delete threads, manage labels, send anything.
const agent = createAgent({ tools: [gmailMCPServer] })

// Good: a task-scoped wrapper. No send(). No delete(). No listAll().
class EmailDraftAgent {
  constructor(private readonly threadId: string) {}

  // One thread. Read only.
  async readThread(): Promise<EmailThread> {
    return gmail.threads.get({ id: this.threadId })
  }

  // One draft. In this thread. That's it.
  async saveDraft(body: string): Promise<Draft> {
    return gmail.drafts.create({ threadId: this.threadId, body })
  }
}

// Build tool definitions from the scoped interface only.
const tools = buildTools(new EmailDraftAgent(threadId))
const agent = createAgent({ tools, systemPrompt })

Your agent should not inherit your access. It should inherit your intent.

View the talk

About the author

is a security leader focused on AI application security. These controls come from his opening keynote at the SF AppSec & DevSecOps Summit. More talks and background at aaronininfosec.com.