How phison-miphi-collaboration/aidaptiv-integration-vane works
Vane is a self-hosted AI answering engine. Users configure model providers, enter a question in chat, and receive a streamed answer with research steps and citations; search can also run through a dedicated API endpoint. Search supports web, discussion, and academic sources, uploaded documents, and contextual widgets, while separate features provide image/video search, suggestions, and Discover content. The graph reflects documented capabilities and relationships visible in excerpts or the source index; unsampled implementation details and uncertain links are omitted.
Main entry points: route.ts Chat endpoint · registry.ts Model registry · index.ts Search agent · manager.ts Upload processing
Components 22
User experience
- Chat interface
src/components/ChatWindow.tsx - Chat state
src/lib/hooks/useChat.tsx - Discover
src/app/discover/page.tsx - Search history
src/app/library/page.tsx
API orchestration
- Chat endpoint
src/app/api/chat/route.ts - Search endpoint
src/app/api/search/route.ts - Discover endpoint
src/app/api/discover/route.ts - Suggestions endpoint
src/app/api/suggestions/route.ts
Research and media
- Search agent
src/lib/agents/search/index.ts - Query classifier
src/lib/agents/search/classifier.ts - Research actions
src/lib/agents/search/researcher/index.ts - Context widgets
src/lib/agents/search/widgets/index.ts - Image and video search
src/lib/agents/media - SearxNG search
src/lib/searxng.ts
Models and settings
- Model registry
src/lib/models/registry.ts - Provider adapters
src/lib/models/providers - Configuration
src/lib/config
State and files
- Research session
src/lib/session.ts - Chat database
src/lib/db/schema.ts - Upload processing
src/lib/uploads/manager.ts - Text chunking
src/lib/utils/splitText.ts
Other components
- User
Connections 28
- User → Chat interface: asks question
- Chat interface → Chat state: uses chat state
src/components/ChatWindow.tsx - Chat state → Chat endpoint: sends chat
src/lib/hooks/useChat.tsx - Chat endpoint → Model registry: loads models
src/app/api/chat/route.ts - Chat endpoint → Search agent: starts research
src/app/api/chat/route.ts - Chat endpoint → Research session: creates session
src/app/api/chat/route.ts - Chat endpoint → Chat database: reads and writes
src/app/api/chat/route.ts - Chat endpoint → Upload processing: processes uploads
src/app/api/chat/route.ts - Search endpoint → Model registry: loads models
src/app/api/search/route.ts - Search endpoint → Research session: creates session
src/app/api/search/route.ts - Search endpoint → Search agent: starts search
src/app/api/search/route.ts - Search agent → Query classifier: classifies query
src/lib/agents/search/index.ts - Search agent → Research actions: runs research
src/lib/agents/search/index.ts - Search agent → Context widgets: executes widgets
src/lib/agents/search/index.ts - Research actions → SearxNG search: searches web
- Research actions → Upload processing: searches files
- User → Discover: browses content
- Discover → Discover endpoint: requests stories
- Discover endpoint → SearxNG search: fetches content
src/app/api/discover/route.ts - Chat state → Suggestions endpoint: requests suggestions
- Suggestions endpoint → Model registry: loads model
src/app/api/suggestions/route.ts - User → Image and video search: searches media
- Image and video search → SearxNG search: queries search
src/lib/agents/media/image.ts - Model registry → Configuration: reads providers
src/lib/models/registry.ts - Model registry → Provider adapters: loads adapter
src/lib/models/registry.ts - Upload processing → Text chunking: splits text
src/lib/uploads/manager.ts - Upload processing → Model registry: embeds chunks
- Search history → Chat database: views history