@principal-ade/ai-brain
v0.3.4
Published
Core library for Principal AI - GitHub parsing and LLM services with view-aware context
Maintainers
Readme
@principal/core
Core library for Principal AI - GitHub repository parsing and LLM services for the hackathon.
Features
- GitHub Repository Loading: Fetch and cache repository contents via GitHub API
- MemoryPalace Integration: Access codebase views, notes, and guidance from
.alexandria/directories - Groq LLM Integration: Ultra-fast LLM inference for intelligent responses
Setup
- Install dependencies:
bun install- Set your GitHub token (for API access):
export GITHUB_TOKEN=your_github_token_hereDemo
Run the demo to see MemoryPalace loading a GitHub repository:
bun run src/demo.tsArchitecture
Adapters
- GitHubFileSystemAdapter: Pre-fetches repository files and implements MemoryPalace's
FileSystemAdapterinterface - GitHubGlobAdapter: Fetches file trees from GitHub and implements glob pattern matching
How It Works
- Pre-fetch: Downloads
.alexandria/directory structure from GitHub - Cache: Stores files in memory to support synchronous file operations
- MemoryPalace: Uses cached files to read views, notes, and guidance
- LLM Context: Sends structured context to Groq for intelligent responses
Next Steps
- Integrate with Groq LLM for Q&A
- Connect to voice interface (Agora/ElevenLabs/HeyGen)
- Deploy to Appwrite
