GuidesAI SDK

Restricting Skills

Scope Skills to a session for more focused behavior.

By default, all Skills in a project (scoped by your API key) are available to your Bluebag agent.

When you want tighter control over what an agent can do, restrict the allowed Skills per session.

Restrict Skills in the constructor

Pass activeSkills when creating the Bluebag client:

import { Bluebag } from "@bluebag/ai-sdk";

const bluebag = new Bluebag({
  apiKey: process.env.BLUEBAG_API_KEY!,
  activeSkills: ["id-for-pdf-processing-skill"],
});

const config = await bluebag.enhance({
  model,
  messages,
});

Restrict Skills dynamically

You can also set Skills after creating the client:

import { Bluebag } from "@bluebag/ai-sdk";

const bluebag = new Bluebag({
  apiKey: process.env.BLUEBAG_API_KEY!,
});

// Set activeSkills before calling enhance
bluebag.setActiveSkills(["id-for-pdf-processing-skill"]);

const config = await bluebag.enhance({
  model,
  messages,
});

To clear the restriction and enable all available Skills, pass null or undefined.

On this page