opencode-ask-agent
v0.1.1-beta
Published
Read-only Ask agent for OpenCode with web research capabilities
Maintainers
Readme
opencode-ask-agent (v0.1.1-beta)
A read-only Ask agent for OpenCode with integrated web research capabilities. Perfect for codebase exploration, Q&A, and brainstorming.
Installation
NPX (Quick Start)
npx opencode-ask-agentBun
bunx opencode-ask-agentPNPM
pnpx opencode-ask-agentYarn
yarn dlx opencode-ask-agentGlobal Install (npm)
npm install -g opencode-ask-agent
opencode-ask-agentGlobal Install (bun)
bun install -g opencode-ask-agent
opencode-ask-agentThis will:
- Add
opencode-ask-agentto your OpenCode plugins - Configure the included MCP servers (context7, grep-app, websearch)
- Optionally set up your Exa API key for enhanced web search
Features
- Read-only access - Safely explore code without modifications
- Context7 - Official documentation lookup
- Grep.app - Search real-world GitHub code
- Exa WebSearch - Real-time web search (optional API key)
- Brainstorming - Ideation and solution exploration
Uninstall
NPX
npx opencode-ask-agent --uninstallBun
bunx opencode-ask-agent --uninstallPNPM
pnpx opencode-ask-agent --uninstallGlobal Install
opencode-ask-agent --uninstall
# or
npx opencode-ask-agent --uninstallThis will:
- Remove the Ask agent configuration from
~/.config/opencode/agent/ask.md - Remove MCP server configurations from
~/.config/opencode/opencode.json - Create a backup of your configuration at
~/.config/opencode/opencode.json.backup
Manual Install
Add to your ~/.config/opencode/opencode.json:
{
"plugin": ["opencode-ask-agent"]
}Exa WebSearch Setup (Optional)
For enhanced web search capabilities, get a free API key:
- Visit https://dashboard.exa.ai/api-keys
- Create an API key
- Add to your environment:
# Add to ~/.bashrc, ~/.zshrc, or equivalent export EXA_API_KEY="your-key-here"
Usage
After installation, restart OpenCode and press Tab to switch to the Ask agent.
Example Prompts
Code Analysis:
- "Explain how authentication works in this project"
- "What does the
processPaymentfunction do?" - "Trace the data flow from API request to database"
Documentation Lookup:
- "Show me the React Query documentation for mutations"
- "What are the options for Next.js middleware?"
GitHub Code Search:
- "Search GitHub for examples of rate limiting in Express"
- "Find production examples of WebSocket reconnection logic"
Web Research:
- "What's the best practice for handling errors in React Query?"
- "Latest recommendations for Next.js 14 caching"
Brainstorming:
- "Let's brainstorm approaches for implementing caching"
- "What are some ways to improve the performance of this API?"
- "Help me think through the architecture for a notification system"
What's Included
Ask Agent
A read-only agent focused on:
- Codebase exploration and analysis
- Documentation and research
- Brainstorming and ideation
Configuration:
- Mode:
primary(appears in Tab selector) - Temperature:
0.6(balanced for creativity) - Allowed tools:
read,glob,grep,webfetch - Denied tools:
write,edit,bash,task
MCP Servers
| Server | Description |
| ----------- | ---------------------------------------------------------- |
| context7 | Official documentation lookup for libraries and frameworks |
| grep-app | GitHub code search for real-world implementation examples |
| websearch | Exa-powered web search for current articles and tutorials |
Development
# Clone the repository
git clone https://github.com/israeltoledo/opencode-ask-agent.git
cd opencode-ask-agent
# Install dependencies
npm install
# Build
npm run build
# Type check
npm run typecheckLicense
MIT
