Tools
Tools are functions that AI agents can call during conversations. They provide persistent memory, external research, and integration with external services.
How to Use Tools
In OpenCode
# Read from memory
> memory-read("observations/project-patterns")
# Update memory
> memory-update("observations/new-pattern", "Content here")
# Find skills
> find_skills("test")
# Use skill
> use_skill("test-driven-development")
# Analyze Figma
> read_figma_design("https://www.figma.com/design/...")
CLI
# List all tools
aikit tools list
# Create custom tool
aikit tools create my-tool
Tool Categories
Memory Tools
- memory-read - Read from persistent memory
- memory-update - Update persistent memory
Session Management
- list_session - List previous sessions
- read_session - Load session context
Skill Tools
- find_skills - Find available skills
- use_skill - Load and use skill
Figma Tools
- read_figma_design - Extract design tokens
- develop_figma_screen - Develop Figma screen
Beads Tools
- bead-create - Create new task
- bead-update-status - Update task status
- bead-complete - Complete with quality gates
- bead-list - List all tasks
- bead-update-type - Update task type
Research Tools
- websearch - Web search (requires config)
- codesearch - GitHub code search (requires config)
Tool Definitions
memory-read
Read from persistent memory (project or global).
> memory-read("observations/project-patterns")
> memory-read("research/figma-analysis")
Arguments:
key(string, required) - The memory key to read
memory-update
Update persistent memory with new information.
> memory-update("observations/auth-pattern", "Always use JWT")
> memory-update("research/api-design", "Findings...", append=true)
Arguments:
key(string, required) - The memory key to updatecontent(string, required) - The content to writeappend(boolean, optional) - Whether to append (default: true)
list_session
List previous sessions to discover what happened and when.
> list_session(limit=10)
Arguments:
limit(number, optional) - Maximum sessions to return (default: 10)
read_session
Load context from a previous session.
> read_session("2024-01-15T10-30-00")
Arguments:
sessionId(string, required) - Session ID from list_session
find_skills
Find available workflow skills.
> find_skills("test")
> find_skills("debug")
Arguments:
query(string, optional) - Search query to filter skills
use_skill
Load and use a specific skill workflow.
> use_skill("test-driven-development")
Arguments:
name(string, required) - Name of skill to use
read_figma_design
Read and analyze a Figma design using Figma API.
> read_figma_design("https://www.figma.com/design/...")
Arguments:
url(string, required) - Figma design URL
Extracts:
- Colors (hex codes)
- Typography (fonts, sizes, weights)
- Spacing system (8px grid)
- Components
- Screens/Frames
- Breakpoints
develop_figma_screen
Smart workflow to develop a specific Figma screen.
> develop_figma_screen(figmaUrl="https://...", screenId="screen-id")
Arguments:
figmaUrl(string, required) - Figma design URLscreenId(string, required) - Screen ID or name
Workflow:
- Check current code status
- Compare with Figma design
- Download needed assets
- Generate development plan
- Use downloaded assets (not placeholders)
bead-create
Create a new bead/task for tracking work.
> bead-create(title="Add auth", description="Implement JWT auth")
Arguments:
title(string, required) - Title of bead/taskdescription(string, required) - Description of what needs to be done
bead-update-status
Update bead status.
> bead-update-status(id="bead-001", status="in-progress")
Arguments:
id(string, required) - Bead IDstatus(string, required) - New status (todo, in-progress, completed, blocked)
bead-complete
Complete a bead with quality gates.
> bead-complete(id="bead-001")
Arguments:
id(string, required) - Bead ID
Quality Gates (all must pass):
npm run typechecknpm run testnpm run lintnpm run build
bead-list
List all beads in project.
> bead-list(filter="in-progress")
Arguments:
filter(string, optional) - Filter by status (todo, in-progress, completed, blocked)
bead-update-type
Update type of an existing bead.
> bead-update-type(id="bead-001", type="feature")
Arguments:
id(string, required) - Bead IDtype(string, required) - New type (feature, pattern, decision, knowledge)
Custom Tools
Create custom tools for project-specific needs:
aikit tools create my-tool
Edit .aikit/tools/my-tool.ts:
import { defineTool } from 'aikit';
export default defineTool({
name: 'my-tool',
description: 'Does something useful',
args: {
input: {
type: 'string',
description: 'The input',
required: true,
},
},
async execute({ input }) {
return `Result for: ${input}`;
},
});