Everything you need to get started with Companion and make the most of its powerful features.
pip install -r requirements.txtpython main.pyOnce Companion is running:
Companion automatically detects Ollama models. To add more models:
ollama pull <model-name>
Cloud AI models are available in Web Mode and provide access to the latest AI capabilities including GPT-4, Gemini, Claude, and more.
Companion offers two ways to use AI:
Choose Web Mode if you:
Choose Desktop Mode if you:
ollama pullNeed more help? Check out our:
Integrate Companion's AI capabilities into your applications with our comprehensive REST API.
Simple HTTP endpoints for conversation management and AI interactions
GET /api/docs
Complete API documentation
Access to multiple advanced AI models with intelligent fallback:
Built-in features for advanced AI interactions:
// Create a new conversation
POST /api/conversations
Content-Type: application/json
// Response
{
"id": "uuid-string",
"title": "New Chat",
"created_at": "2024-08-14T18:30:00Z"
}
// Get all conversations
GET /api/conversations
// Delete a conversation
DELETE /api/conversations/{id}
// Send a message
POST /api/conversations/{id}/messages
Content-Type: application/json
{
"message": "Explain quantum computing",
"active_tools": ["web", "think"]
}
// Response with AI answer
{
"content": "Quantum computing is...",
"thinking": "Step-by-step reasoning...",
"web_sources": ["url1", "url2"]
}
// Available AI tools
{
"web": "Real-time web search",
"think": "Step-by-step reasoning",
"deepsearch": "Comprehensive research",
"code": "Programming assistance",
"deepthink": "Multi-model analysis"
}
// Health check
GET /api/health
// System statistics
GET /api/stats