README.md (2694B)
1 # Dave - The Nostr AI Assistant 2 3 Dave is an AI-powered assistant for the Nostr protocol, built as a Notedeck application. It provides a conversational interface that can search, analyze, and present Nostr notes to users. 4 5 <img src="https://cdn.jb55.com/s/73ebab8f43804da8.png" width="50%"/> 6 7 ## Overview 8 9 Dave demonstrates how to build a feature-rich application on the Notedeck platform that interacts with Nostr content. It serves both as a useful tool for Nostr users and as a reference implementation for developers building Notedeck apps. 10 11 ## Features 12 13 - [x] Interactive 3D avatar with WebGPU rendering 14 - [x] Natural language conversations with AI 15 - [x] Query and search the local Nostr database for notes 16 - [x] Present and render notes to the user 17 - [x] Tool-based architecture for AI actions 18 - [ ] Context-aware searching (home, profile, or global scope) 19 - [ ] Chat history persistence 20 - [ ] Anonymous [lmzap](https://jb55.com/lmzap) backend 21 22 ## Technical Details 23 24 Dave uses: 25 26 - Egui for UI rendering 27 - WebGPU for 3D avatar visualization 28 - OpenAI API (or Ollama with compatible models) 29 - NostrDB for efficient note storage and querying 30 - Async Rust for non-blocking API interactions 31 32 ## Architecture 33 34 Dave is structured around several key components: 35 36 1. **UI Layer** - Handles rendering and user interactions 37 2. **Avatar** - 3D representation with WebGPU rendering 38 3. **AI Client** - Connects to language models via OpenAI or Ollama 39 4. **Tools System** - Provides structured ways for the AI to interact with Nostr data 40 5. **Message Handler** - Manages conversation state and message processing 41 42 ## Usage as a Reference 43 44 Dave serves as an excellent reference for developers looking to: 45 46 - Build conversational interfaces in Notedeck 47 - Implement 3D rendering with WebGPU in Rust applications 48 - Create tool-based AI agents that can take actions in response to user requests 49 - Query and present Nostr content in custom applications 50 51 ## Getting Started 52 53 1. Clone the repository 54 2. Set up your API keys for OpenAI or configure Ollama 55 ``` 56 export OPENAI_API_KEY=your_api_key_here 57 # or for Ollama 58 export OLLAMA_HOST=http://localhost:11434 59 ``` 60 3. Build and run the Notedeck application with Dave 61 62 ## Configuration 63 64 Dave can be configured to use different AI backends: 65 66 - OpenAI API (default) - Set the `OPENAI_API_KEY` environment variable 67 - Ollama - Use a compatible model like `hhao/qwen2.5-coder-tools` and set the `OLLAMA_HOST` environment variable 68 69 ## Contributing 70 71 Contributions are welcome! See the issues list for planned features and improvements. 72 73 ## License 74 75 GPL 76 77 ## Related Projects 78 79 - [nostrdb](https://github.com/damus-io/nostrdb) - Embedded database for Nostr notes