-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
aiAI/ML relatedAI/ML relatedbackendBackend/API related changesBackend/API related changesintegrationThird-party integrationsThird-party integrationssobers-buddySobers Buddy AI companion featureSobers Buddy AI companion feature
Milestone
Description
🛠️ Set up Vercel AI SDK Infrastructure
Overview
Establish the foundation for AI-powered conversations with streaming responses, tool calling, and provider-agnostic architecture.
Goals
- Unified AI interface supporting multiple providers (OpenAI, Anthropic, Google)
- Streaming responses for natural conversation feel
- Tool calling framework for actions (meetings, breathing exercises, etc.)
- TypeScript-first implementation for React Native compatibility
Technical Requirements
Dependencies
npm install ai @ai-sdk/openai @ai-sdk/anthropic
npm install react-native-ai-sdk # or equivalent RN wrapperCore Components
| Component | Purpose |
|---|---|
| AI Provider Config | Switch between OpenAI/Anthropic based on cost/performance |
| Streaming Handler | Manage real-time response streams |
| Tool Registry | Define available actions (findMeeting, startBreathing, etc.) |
| Context Manager | Maintain conversation history |
Implementation Tasks
- Install and configure Vercel AI SDK
- Set up AI provider configuration (env-based switching)
- Implement streaming response handling
- Create tool calling framework
- Set up mem0 integration (Implement mem0 user memory system #423)
- Configure context management
- Add error handling and fallbacks
- Write unit tests for AI interactions
Acceptance Criteria
- AI responses stream in real-time
- Tool calls execute correctly (test with mock tools)
- Provider switching works without code changes
- Failed AI calls gracefully degrade
- Unit tests cover >80% of AI module
Technical Notes
- Use environment variables for API keys (never commit keys)
- Implement request/response logging for debugging
- Consider rate limiting and cost monitoring
- Set up A/B testing framework for model comparison
Related
- Parent: [Epic] Sobers Buddy Implementation #412
- Blocks: Build message generation and scheduling system #417, Implement slip/relapse supportive response flow #418, Add meeting finder tool integration #419
- Depends on: Implement mem0 user memory system #423 (mem0)
Part of Sobers v2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aiAI/ML relatedAI/ML relatedbackendBackend/API related changesBackend/API related changesintegrationThird-party integrationsThird-party integrationssobers-buddySobers Buddy AI companion featureSobers Buddy AI companion feature
Type
Projects
Status
Todo