Once you've restarted Antigravity IDE, test the MCP workflow with these questions:
How does search work in KnowCode?
Expected Result:
sufficiency_score >= 0.8- Agent answers from context only
- No external LLM call
- Response includes details about SearchEngine, HybridIndex, etc.
What does the retrieve_context_for_query method do?
Expected Result:
sufficiency_score >= 0.8- Agent answers from context only
- Response includes method signature, parameters, and logic
Explain the overall architecture of KnowCode
Expected Result:
sufficiency_scoremay be 0.70-0.85- Agent may use external LLM for synthesis
- But context should be retrieved first
Show me how semantic search is implemented
Expected Result:
sufficiency_score >= 0.8- Agent answers from context only
- Response includes HybridIndex, VectorStore, embeddings
What are the best practices for Python async programming?
Expected Result:
sufficiency_score < 0.50- Agent uses external LLM
- This is correct behavior (not in codebase)
The agent should have access to retrieve_context_for_query tool.
Look for these indicators in the agent's response:
- "Retrieving context from codebase..."
- "Sufficiency score: X.XX"
- "Answering from local context" (when score >= 0.8)
ps aux | grep "knowcode mcp-server"Should show the server running with the venv path.
You should NOT need to manually run knowcode mcp-server - Antigravity starts it automatically.
-
Check MCP server is running:
./verify_mcp_connection.sh
-
Verify configuration:
cat ~/.gemini/mcp_servers.json -
Check IDE logs (if available)
-
Restart IDE again
-
Verify semantic index exists:
ls -la knowcode_index/
-
Rebuild index if needed:
source .venv/bin/activate knowcode index . --output knowcode_index
-
Check embedding configuration in
aimodels.yaml
- Verify
.agent/context.mdexists and contains the rules - Check the rules are properly formatted
- Try rephrasing your query to be more specific
✅ MCP server starts automatically when IDE starts
✅ retrieve_context_for_query tool is available
✅ Agent retrieves context before answering
✅ High sufficiency scores (>0.8) for codebase questions
✅ Agent answers from context only when sufficient
✅ Agent uses external LLM only when needed (score < 0.8)
- Monitor token usage - Track how much you save
- Adjust thresholds - Fine-tune sufficiency_score threshold
- Update knowledge store - Re-analyze after code changes
- Expand to other projects - Set up MCP for other codebases
- Document learnings - Note what works best for your workflow
Track these metrics over time:
| Metric | Target | Current |
|---|---|---|
| % Queries with score >= 0.8 | >70% | TBD |
| Avg response time (local) | <2s | TBD |
| Avg response time (external) | <10s | TBD |
| Token savings per day | >50% | TBD |
| Answer accuracy (local) | >95% | TBD |
What functions does SearchEngine.search call?
How do SearchEngine, HybridIndex, and Reranker work together?
Which functions were recently modified?
What would break if I change the HybridIndex.search method?
The goal is local-first retrieval to:
- ✅ Reduce external LLM token consumption
- ✅ Get faster responses for codebase questions
- ✅ Maintain privacy (code stays local)
- ✅ Improve answer quality (direct from source)
Good luck with your testing! 🚀