@agentskit/tools
Reusable executable tools for AgentsKit agents.
Install
npm install @agentskit/tools
Available tools
web_search | Search the web (DuckDuckGo default, configurable) |
read_file | Read file contents (sandboxed to basePath) |
write_file | Write to files (sandboxed to basePath) |
list_directory | List directory contents (sandboxed to basePath) |
shell | Execute shell commands with streaming output |
Quick example
import { createRuntime } from '@agentskit/runtime'
import { openai } from '@agentskit/adapters'
import { webSearch, filesystem, shell } from '@agentskit/tools'
const runtime = createRuntime({
adapter: openai({ apiKey, model: 'gpt-4o' }),
tools: [
webSearch(),
...filesystem({ basePath: './workspace' }),
shell({ timeout: 10_000, allowed: ['ls', 'cat', 'grep'] }),
],
})
const result = await runtime.run('Find and summarize the README')
Tool discovery
import { listTools } from '@agentskit/tools'
listTools()
Custom search provider
webSearch({ provider: 'serper', apiKey: '...' })
webSearch({ search: async (query) => mySearchAPI(query) })
Docs
Full documentation