Wafer Agent
The Wafer agent is an AI-powered assistant specialized in GPU kernel development. It can help you optimize CUDA and Triton kernels, understand GPU architecture, analyze performance traces, and navigate documentation.Quick Start
Modes
The agent supports three interaction modes:- Interactive TUI
- Simple Mode
- Single-Turn
Full terminal UI with conversation history and rich formatting.Features:
- Persistent conversation history
- Tool execution visualization
- Code syntax highlighting
- Session management
Options
| Option | Short | Description |
|---|---|---|
--interactive | -i | Launch full interactive TUI mode |
--simple | Use simple stdout mode (for scripts) | |
--single-turn | -s | Answer once and exit |
--template | -t | Run with a template (see Templates) |
--corpus | -c | Documentation corpus: cuda, cutlass, hip, amd |
--model | -m | Model override (default: claude-opus-4-5) |
--max-turns | Maximum conversation turns (default: 10) | |
--json | Output in JSON format | |
--tools | Comma-separated list of tools to enable | |
--resume | -r | Resume a previous session (see Sessions) |
Examples
Ask About GPU Architecture
Query Specific Documentation
Use the--corpus flag to focus on specific documentation:
Analyze a Trace
Optimize a Kernel
Available Tools
The agent has access to various tools depending on the mode and template:- File operations: Read, write, edit files in your project
- Search: Find patterns in code and documentation
- Bash: Execute shell commands (sandboxed by default)
- Wafer tools: Run profiling, evaluation, and analysis commands
By default, the agent runs in a sandbox that restricts file system access. Use
--no-sandbox to disable this for full access (use with caution).