Agents SDK: Agent Skills are files in your agent's Workspace
Agent Skills in the Cloudflare Agents SDK are now files. Write a folder with a SKILL.md into your agent's Computer ↗︎ Workspace, under /workspace/.agents/skills/, and the agent can use it on its next turn. You do not need a build step or a deploy, and the agent can write its own skills.
src/server.jsjs
import { Think, skills } from "@cloudflare/think";
export class MyAgent extends Think {
getSkills() {
return [
skills.workspace(this.workspace), // /workspace/.agents/skills
skills.r2(this.env.SKILLS_BUCKET, { prefix: "skills/" }),
];
}
}
src/server.tsts
import { Think, skills } from "@cloudflare/think";
export class MyAgent extends Think<Env> {
getSkills() {
return [
skills.workspace(this.workspace), // /workspace/.agents/skills
skills.r2(this.env.SKILLS_BUCKET, { prefix: "skills/" }),
];
}
}
This release includes:
- Three sources. Load skills from a Computer Workspace, an R2 bucket, or code. Think lists every source again before each turn. …