Semantic, fuzzy search over the codebase using AugmentCode. Designed for high-level understanding and exploration when exact file names, symbols, or locations are unknown.
ACE Tool provides semantic code search capabilities through the AugmentCode MCP (Model Context Protocol) server. It interprets natural language queries and retrieves conceptually relevant code rather than exact string matches.
- π Semantic Search: Understand code intent, not just string matching
- π§ High-Level Understanding: Get code overviews and relationships
- π― Context-Aware: Provides relevant code snippets with context
- π Persistent Index: Maintains index state through daemon process
- π Multiple Queries: Support for various query types
- When to Use: When you don't know exact file names, symbols, or locations, and need semantic understanding
- When NOT to Use: For exact identifier, symbol name, or literal string matching - use
rg(ripgrep) instead - Pre-Edit Rule: Before editing any file, ALWAYS first use ACE Tool to gather detailed context
- Bun runtime: JavaScript runtime
- ACE CLI Tool: Required CLI tool for ACE MCP server
- Repository: https://github.com/eastxiaodong/ace-tool
- Installation: See the CLI tool repository for setup instructions
cd ~/.pi/agent/skills/ace-tool
# 1. Install ACE CLI Tool (required dependency)
# Visit: https://github.com/eastxiaodong/ace-tool
# Follow the installation instructions in that repository
# 2. Install dependencies (if needed)
bun install
# 3. Configure ACE MCP Server
cp .env.example .env
# Edit .env with your ACE server credentialsThe ACE CLI Tool provides the underlying functionality for semantic code search. You must install it before using this skill:
# Clone the ACE CLI Tool
git clone https://github.com/eastxiaodong/ace-tool.git
cd ace-tool
# Install and configure
# Follow the repository's README for installation steps
# Make sure the CLI is available in your PATH
ace-tool --version # Verify installationCreate a .env file in the skill directory:
# ACE CLI Tool Configuration
ACE_CLI_PATH="/path/to/ace-tool" # Path to ACE CLI tool (optional if in PATH)
# ACE MCP Server Configuration
ACE_BASE_URL="https://your-ace-server.com/relay"
ACE_API_KEY="your-ace-api-key-here"
ACE_PORT=4231.env to version control. Use .env.example as a template.
Before using this skill, verify that the ACE CLI Tool is properly installed:
# Check if ACE CLI is available
ace-tool --version
# Test basic functionality
ace-tool search "test query" # Should work if configuredThe daemon maintains the index state and should be started once:
cd ~/.pi/agent/skills/ace-tool
bun run daemon.tsThe daemon starts automatically when you use the client.
For testing and development, start the web interface:
cd ~/.pi/agent/skills/ace-tool
bun run start
# or
bun run serverOpen your browser to http://localhost:4231
Run both daemon and web UI simultaneously:
cd ~/.pi/agent/skills/ace-tool
bun run dev# From skill directory
bun run client.ts search "Where is the user authentication handled?"
# From any project directory
bun ~/.pi/agent/skills/ace-tool/client.ts search "How does the payment flow work?"bun run client.ts enhance "Add a login page"This opens a Web UI for prompt enhancement.
Start the debug web interface for testing and development:
cd ~/.pi/agent/skills/ace-tool
bun run serverThen open your browser to: http://localhost:4231
The web UI provides:
- π¨ Minimalist dark interface
- π Real-time search testing
- π Status indicator
- π‘ Quick example queries
- π Code results display
- Status Indicator: Shows ACE server connection status
- Query Input: Textarea for natural language queries
- Quick Examples: Pre-configured example queries
- Results Display: Shows search results with file paths and scores
- Error Handling: Clear error messages for debugging
- Open browser to
http://localhost:4231 - Check the status indicator (green = online, red = offline)
- Enter your search query in the textarea
- Click "Search" button
- View results with file paths and code snippets
- Use quick examples for common queries
The web UI features:
- Clean, minimalist dark theme
- Status indicator showing ACE server connectivity
- Large textarea for queries
- Quick example buttons
- Real-time search results display
- Error messages for debugging
- Click "Search" button
- View results with file paths and code snippets
- Use quick examples for common queries
GET /: Web UI pageGET /api/status: Check ACE server statusPOST /api/search: Perform semantic search
Example API Call:
curl -X POST http://localhost:4231/api/search \\
-H "Content-Type: application/json" \\
-d '{"query": "Where is authentication handled?"}'# Search for functionality
"Where is the user authentication handled?"
"How does the payment flow work?"
"Where are API endpoints defined?"
# Search for patterns
"How are errors handled in this codebase?"
"Where is state management implemented?"
"How do components communicate with each other?"
# Search for concepts
"Where is the database connection established?"
"How are user sessions managed?"
"Where is authentication middleware defined?"# Use rg for exact matches
rg "class UserAuthentication"
rg "function authenticateUser"
rg "API_KEY"- daemon.ts: Persistent daemon that maintains index state
- client.ts: Client script for interacting with ACE MCP server
- server.ts: Web UI server for testing and development
- ACE CLI Tool: External dependency providing core functionality
- .ace-tool/: Runtime directory for logs and cache
User Query β Web UI / Client β ACE CLI Tool β ACE MCP Server β Indexed Code β Results
ACE Tool Skill (this repository)
β depends on
ACE CLI Tool (eastxiaodong/ace-tool)
β uses
ACE MCP Server
ACE CLI Tool acts as a bridge between this skill and the ACE MCP server, providing the core semantic search functionality.
Browser β server.ts β ACE MCP Server β Results β Display
β
Static HTML
Search results include:
- Relevant code snippets
- File paths
- Context around matches
- Semantic relevance scores
# Check if port is available
lsof -i :4231
# Check ACE server connectivity
curl https://your-ace-server.com/relay/health- Try rephrasing your query
- Check if the daemon is running
- Verify ACE MCP server is accessible
- Verify ACE_BASE_URL in
.env - Check ACE_API_KEY is correct
- Ensure network connectivity to ACE server
- π Never commit
.env- It contains sensitive API keys - π Use
.env.example- Template for configuration - π Rotate API keys - Regularly update your ACE API key
- π Access control - Limit access to ACE MCP server
ACE Tool can be used to scan code for knowledge base documentation:
# Scan codebase for concepts
bun ~/.pi/agent/skills/knowledge-base/lib.ts scan
# This internally uses ACE Tool for semantic understandingACE Tool can be integrated with other Pi Agent skills that need code understanding:
- Knowledge Builder: Analyze project structure
- System Design: Understand code architecture
- Project Planner: Analyze existing code patterns
- Use Semantic Queries: Describe what you're looking for, not exact terms
- Pre-Edit Context: Always gather context before editing files
- Combine with rg: Use ACE for understanding, rg for exact matches
- Iterate Queries: Refine your query if results aren't relevant
- Check Daemon: Ensure daemon is running for best performance
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - See LICENSE file
- ACE CLI Tool: https://github.com/eastxiaodong/ace-tool - Required dependency
- AugmentCode: https://augmentcode.dev/
- MCP Protocol: https://modelcontextprotocol.io/
- Pi Agent: https://github.com/badlogic/pi-mono
- ACE MCP Server: Contact your administrator for access
This skill depends on the following external tool:
- ACE CLI Tool: Required CLI tool for ACE MCP server
- Provides core semantic search functionality
- Acts as a bridge between this skill and ACE MCP server
- Must be installed and configured separately
- Install ACE CLI Tool from https://github.com/eastxiaodong/ace-tool
- Configure ACE CLI Tool according to its documentation
- Install this skill (clone and configure)
- Configure
.envwith your ACE server credentials - Start using
This skill wraps the ACE CLI Tool to provide:
- Web UI interface
- Pi Agent integration
- Standardized configuration
- Enhanced user experience
For issues or questions:
- Check the Issues page
- Review existing documentation
- Contact your ACE MCP server administrator
Status: β Production Ready
Version: 1.0.0
Last Updated: 2026-01-07
Maintainer: Dwsy