@agentskit/templates
v0.5.3
Published
Extension toolkit for creating custom AgentsKit skills, tools, and adapters.
Maintainers
Readme
@agentskit/templates
Profile: concise-package
Create, validate, and scaffold custom AgentsKit extensions — tools, skills, adapters, memory backends, embedders, and flows — ready to customize, build, and publish.
Tags: ai · agents · llm · agentskit · ai-agents · scaffolding · templates · authoring · plugin · extension
Verified proof
- Package metadata and tests live under
packages/templates/. - Package guide: https://www.agentskit.io/docs/reference/packages/templates
- Stability map: docs/STABILITY.md
How this fits the ecosystem
@agentskit/templates helps you create new AgentsKit skills, tools, adapters, and package starters without inventing package shape from scratch.
- AgentsKit: compose it with the other packages in this repo to build agents from small, swappable parts.
- Registry: look for ready agents and templates that already use this layer at registry.agentskit.io.
- Playbook: learn the production patterns behind this layer at playbook.agentskit.io.
- AKOS: run the same concepts with enterprise deployment, governance, and observability at akos.agentskit.io.
Docs: package guide · agent handoff
Why templates
- Skip the boilerplate —
scaffold()generates a complete npm package with src, tests, tsconfig, and README in one call - Safe by default — validates names, refuses symlink destinations, stages atomically, and fails on collisions unless
overwrite: true - Catch mistakes early —
createToolTemplate()validates required fields before your code runs - Extend, don't rewrite — inherit from built-in skills/tools and override only what you need
- Build-ready output — compilable skeletons with dual CJS/ESM,
engines.node >=20, MIT, and caret-pinned AgentsKit deps
Install
npm install @agentskit/templatesCreate a custom tool
import { createToolTemplate } from '@agentskit/templates'
const slackTool = createToolTemplate({
name: 'slack-notify',
description: 'Send a message to a Slack channel',
schema: {
type: 'object',
properties: {
channel: { type: 'string' },
message: { type: 'string' },
},
required: ['channel', 'message'],
},
execute: async (args) => {
await fetch(webhookUrl, { method: 'POST', body: JSON.stringify({ channel: args.channel, text: args.message }) })
return `Sent to #${args.channel}`
},
})Extend a built-in skill
import { createSkillTemplate } from '@agentskit/templates'
import { researcher } from '@agentskit/skills'
const myResearcher = createSkillTemplate({
base: researcher,
name: 'my-researcher',
systemPrompt: researcher.systemPrompt + '\nAlways cite sources with URLs.',
temperature: 0.3,
metadata: { team: 'research' },
})Scaffold a full package
Eight shapes: tool, skill, adapter, memory-vector, memory-chat,
flow, embedder, browser-adapter.
import { scaffold } from '@agentskit/templates'
await scaffold({
type: 'tool',
name: 'my-search', // unscoped kebab-case only
dir: './packages',
description: 'Custom search tool for AgentsKit',
// overwrite: true, // default false — existing dirs fail safely
})
// → packages/my-search/
// package.json, tsconfig.json, tsup.config.ts
// src/index.ts (named export ToolDefinition factory)
// tests/index.test.ts (contract test)
// README.mdNot the same as agentskit init. The CLI bootstraps full apps with its own
templates. This package is the programmatic authoring toolkit for extension
packages (tools, skills, adapters, …).
Name & security notes
- Names must be unscoped npm-safe kebab-case (
my-search). Scoped packages (@org/pkg) are not supported in this beta — migration will land in a later minor if needed. - Destinations are staged then renamed atomically; symlink destination roots are refused;
collisions fail unless you pass
overwrite: true.
Features
createToolTemplate/createSkillTemplate/createAdapterTemplate— validated factoriesscaffold({ type, name, dir, overwrite? })— generate a complete npm packagevalidateToolTemplate/validateSkillTemplate/validateAdapterTemplateSCAFFOLD_TYPES,validateScaffoldConfig- Outputs align with
@agentskit/corecontracts (JSON Schema, not Zod)
Ecosystem
| Package | Role |
|---------|------|
| @agentskit/core | ToolDefinition, SkillDefinition, AdapterFactory |
| @agentskit/tools | Reference tool implementations |
| @agentskit/skills | Skills you can extend with createSkillTemplate |
| @agentskit/runtime | Where custom tools/skills run; flow scaffolds depend on it |
Contributors
License
MIT — see LICENSE.
Docs
Quick start
import { createToolTemplate } from '@agentskit/templates'
const echo = createToolTemplate({
name: 'echo',
description: 'Echo a string back',
schema: { type: 'object', properties: { text: { type: 'string' } }, required: ['text'] },
execute: async (args) => String(args.text),
})
console.log(echo.name)Maturity and compatibility
- Stability: beta — see docs/STABILITY.md
- Node.js 20+ and TypeScript strict mode
- Published as
@agentskit/templates
Contributing
See CONTRIBUTING.md and the monorepo LICENSE.
