This is now the primary approach! We've pivoted from reimplementing Guide to directly customizing Guide. Here's why and how:
- ✅ Full Embabel integration - All agent framework, RAG, search operations
- ✅ ChatActions - Complete chat functionality with @Action triggers
- ✅ DataManager - Has
ingestDirectory(String dir)method that can index local directories - ✅ DrivineStore - Complete RAG infrastructure with vector search
- ✅ WebSocket/SSE support - Full frontend integration
- ✅ Embabel Hub frontend - Already integrated
- Configuration - Point to codebase directory instead of URLs
- Data ingestion - Use
ingestDirectory()instead ofingestPage()for URLs - Reference configuration - Point to codebase instead of docs
That's it! Everything else (RAG, chat, agent framework, frontend) stays the same.
-
Fork Guide repository:
git clone https://github.com/embabel/guide.git cd guide -
Modify
GuidePropertiesto support codebase path:public record GuideProperties( String referencesFile, List<String> urls, // Keep for docs String codebasePath, // ADD: Your codebase path boolean useCodebase // ADD: Toggle between docs and codebase ) {}
-
Modify
DataManager.loadReferences():public void loadReferences() { if (guideProperties.useCodebase() && guideProperties.codebasePath() != null) { // Use codebase directory logger.info("⏳Loading codebase from: {}...", guideProperties.codebasePath()); ingestDirectory(guideProperties.codebasePath()); logger.info("✅ Loaded codebase from: {}", guideProperties.codebasePath()); } else { // Original URL-based ingestion for (var url : guideProperties.urls()) { ingestPage(url); } } }
-
Configuration - Update
application.yml:guide: codebase-path: /path/to/your/codebase use-codebase: true urls: [] # Empty for codebase mode
-
Use Guide as a dependency:
<dependency> <groupId>com.embabel.agent</groupId> <artifactId>guide</artifactId> <version>0.1.0-SNAPSHOT</version> </dependency>
-
Override DataManager to use codebase:
@Service @Primary public class CodebaseDataManager extends DataManager { @Override public void loadReferences() { // Use ingestDirectory() for your codebase ingestDirectory("/path/to/codebase"); } }
-
Keep all Guide components - ChatActions, frontend, everything
| Aspect | Customize Guide | Reimplement (Current) |
|---|---|---|
| Complexity | Very Low | High |
| Maintenance | Low (upstream updates) | High (maintain everything) |
| Features | All Guide features | Need to implement |
| Frontend | Already integrated | Need to integrate |
| RAG Infrastructure | Already working | Need to build |
| Time to Value | Fast | Slow |
| Customization | Minimal changes needed | Full control but more work |
Definitely customize Guide! Here's why:
- Guide already has
ingestDirectory()- It can index local directories - Minimal changes needed - Just configuration and maybe DataManager
- All features included - RAG, chat, frontend, WebSockets
- Easy to maintain - Pull upstream updates from Guide
- Proven code - Guide is battle-tested
- GuideProperties.java - Add codebase path configuration
- DataManager.java - Modify
loadReferences()to useingestDirectory()for codebase - application.yml - Configure codebase path instead of URLs
That's literally it! Everything else (ChatActions, RAG store, frontend, agent framework) works as-is.
- Copy Guide to your repo or fork it
- Add codebase configuration to GuideProperties
- Use
ingestDirectory()instead ofingestPage() - Configure path in application.yml
- Done! Everything else works
This would give you the same "talk to docs" experience but for your codebase, with minimal code changes.
Conclusion: You're right to question this. Customizing Guide is definitely the better approach than reimplementing. The current project structure could serve as documentation of what needs to be customized, or you could pivot to directly customizing Guide instead.