sophia-ai
v1.0.5
Published
An intelligent AI coding agent built for the terminal. Powered by Venice.ai
Downloads
7
Maintainers
Readme
Sophia
An intelligent AI coding agent built for the terminal. Powered by Venice.ai
Sophia is a powerful command-line coding assistant designed specifically for creating and managing medium-sized websites and programming projects. Built on Venice.ai's privacy-first infrastructure, Sophia combines advanced AI capabilities with deep codebase understanding to help developers write, debug, and architect better code.
🎯 Mission
Sophia is built for one purpose: to be the perfect coding companion for web development and programming projects. Unlike general-purpose AI wrappers, Sophia integrates directly into your development workflow with project context awareness, intelligent code analysis, and autonomous multi-step operations.
✨ Core Features
🧠 Intelligent Code Understanding
- LSP Integration: Real-time code intelligence across multiple languages
- Project Context: Understands your entire codebase, dependencies, and architecture
- AST Analysis: Deep syntax tree parsing for accurate refactoring and suggestions
- Multi-file Awareness: Tracks changes across your entire project structure
🛠️ Autonomous Development
- Plan & Execute Mode: Reviews plans before making changes
- Multi-step Operations: Autonomous task execution with checkpoints
- Smart Refactoring: Intelligent code transformation with safety checks
- Dependency Management: Automatic package installation and updates
🌐 Venice.ai Integration
- Multiple Models: Choose from Venice's curated AI models
- Web Search: Real-time research with citations
- Reasoning Mode: Step-by-step problem-solving with visible thinking
- Function Calling: Tool use and external API integration
- Privacy-First: No data retention, complete privacy
💡 Developer Experience
- Interactive TUI: Beautiful terminal interface built with modern UI components
- Session Management: Save and resume coding sessions
- Git Integration: Intelligent commit messages, PR generation, conflict resolution
- Error Recovery: Automatic debugging and fix suggestions
🚀 Quick Start
Installation
npm install -g sophia-aiSetup
- Get your Venice.ai API key from venice.ai
- Initialize Sophia:
sophia init- Enter your API key when prompted
Basic Usage
# Interactive coding session
sophia
# Single command execution
sophia "add authentication to my Express app"
# Plan mode (review before execution)
sophia plan "refactor database layer to use Prisma"
# Specific model
sophia --model venice-uncensored "help me debug this error"📚 Available Models (2025)
Sophia supports Venice.ai's latest model lineup:
Text Models
| Model | Description | Context | Best For | |-------|-------------|---------|----------| | qwen3-235b | Venice Large 1.1 | 131k | Deep reasoning, production agents, complex refactoring | | venice-uncensored | Uncensored generation | 32k | Creative solutions, red-team testing | | mistral-31-24b | Venice Medium 3.1 | 131k | Vision + tools, image analysis, multimodal | | qwen3-4b | Venice Small | 40k | Fast responses, chatbots, quick fixes | | llama-3.3-70b | General purpose | 131k | Balanced performance | | llama-3.2-3b | Lightweight | 131k | Fastest inference, simple tasks |
Image Models
| Model | Description | Best For | |-------|-------------|----------| | venice-sd35 | Stable Diffusion 3.5 | UI mockups, design assets | | flux-dev | FLUX.1 Dev | Artistic styles, creative generation |
🎓 Commands
Core Commands
# Start interactive session
sophia
# Execute single task
sophia "task description"
# Plan mode (review before execution)
sophia plan "task description"
# Use specific model
sophia --model qwen3-235b "task description"
# Enable web search
sophia --web-search "research latest React patterns"
# Enable reasoning mode
sophia --reasoning "solve this algorithm problem"Configuration
# Set default model
sophia config set model qwen3-235b
# Set API key
sophia config set api-key YOUR_API_KEY
# View current config
sophia config list
# Reset to defaults
sophia config resetProject Management
# Analyze project structure
sophia analyze
# Initialize Sophia in project (creates SOPHIA.md)
sophia init-project
# Review codebase
sophia review
# Generate documentation
sophia docsGit Integration
# Intelligent commit
sophia commit
# Generate PR description
sophia pr
# Resolve merge conflicts
sophia resolve
# Analyze git diff
sophia diff🏗️ Architecture
Project Context System
Sophia uses SOPHIA.md files throughout your project to maintain context:
# Project: MyWebApp
## Architecture
- Frontend: React + TypeScript
- Backend: Node.js + Express
- Database: PostgreSQL + Prisma
## Coding Standards
- Use functional components
- TypeScript strict mode
- ESLint + Prettier
## Current Focus
- Implementing authentication system
- Migrating to React QueryLSP Integration
Sophia connects to Language Server Protocol servers for:
- Real-time error checking
- Auto-completion context
- Symbol navigation
- Refactoring operations
Autonomous Agent System
User Request → Plan Generation → User Approval → Execution → Verification
↓
[Multi-step Operations]
↓
File Analysis → Code Generation → Testing → Commit🌟 Advanced Features
Web Search Integration
# Latest best practices
sophia --web-search "modern React state management 2025"
# Research with citations
sophia --web-citations "secure authentication patterns Node.js"Venice Parameters:
enable_web_search: 'auto' | 'on' | 'off'enable_web_citations: Include source linksenable_web_scraping: Extract content from URLs
Reasoning Mode
sophia --reasoning "optimize this database query for performance"Sophia will show its thinking process:
- Problem analysis
- Multiple solution paths
- Trade-off evaluation
- Final recommendation
Function Calling
Sophia can use external tools:
- Package managers (npm, pip, cargo)
- Build tools (webpack, vite, rollup)
- Testing frameworks (jest, vitest, pytest)
- Linters (eslint, pylint, clippy)
- Formatters (prettier, black, rustfmt)
Vision Processing
sophia --image design.png "convert this design to React components"📖 API Reference
Venice.ai API Endpoints
Base URL: https://api.venice.ai/api/v1
Chat Completions
POST /chat/completions
{
"model": "qwen3-235b",
"messages": [
{"role": "system", "content": "You are a coding assistant"},
{"role": "user", "content": "Help me debug this code"}
],
"temperature": 0.7,
"max_tokens": 4000,
"stream": true,
"venice_parameters": {
"enable_web_search": "auto",
"strip_thinking_response": false,
"enable_web_citations": true
}
}Key Parameters:
model: Model IDmessages: Conversation historytemperature: 0-2 (default 0.7)max_tokens: Token limittop_p: Nucleus samplingfrequency_penalty: -2.0 to 2.0presence_penalty: -2.0 to 2.0stream: Boolean for streamingtools: Function definitionsresponse_format: JSON schema for structured output
Venice-Specific Parameters:
character_slug: Use specific characterenable_web_search: Web researchenable_web_citations: Include sourcesenable_web_scraping: Extract from URLsstrip_thinking_response: Show/hide reasoningdisable_thinking: Disable reasoning modeinclude_venice_system_prompt: Use Venice defaults
Models Endpoint
GET /models
// Response includes:
{
"data": [
{
"id": "qwen3-235b",
"type": "text",
"context_tokens": 131072,
"capabilities": {
"function_calling": true,
"web_search": true,
"logprobs": true
},
"pricing": {
"input": 0.15,
"output": 0.6
},
"traits": ["reasoning", "tools"]
}
]
}Image Generation
POST /images/generations
{
"model": "venice-sd35",
"prompt": "modern web dashboard UI design",
"size": "1024x1024",
"quality": "hd",
"n": 1
}🔧 Configuration
Config File Location
- macOS/Linux:
~/.config/sophia/config.json - Windows:
%APPDATA%/sophia/config.json
Config Options
{
"api-key": "your-venice-api-key",
"model": "qwen3-235b",
"temperature": 0.7,
"max-tokens": 4000,
"web-search": "auto",
"reasoning": false,
"plan-mode": true,
"auto-commit": false,
"lsp-enabled": true
}🎯 Use Cases
1. Building a New Feature
sophia "add user authentication with JWT to my Express app"Sophia will:
- Analyze your project structure
- Create a plan (install packages, create middleware, update routes)
- Wait for your approval
- Execute the plan
- Run tests
- Commit changes with descriptive message
2. Debugging
sophia "this API endpoint returns 500 error"Sophia will:
- Read error logs
- Analyze the code path
- Identify the issue
- Suggest fixes
- Apply the fix if approved
- Verify with tests
3. Refactoring
sophia plan "convert class components to functional components with hooks"Sophia will:
- Identify all class components
- Create refactoring plan
- Show you the plan
- After approval, refactor each file
- Update tests
- Verify everything works
4. Documentation
sophia docsSophia will:
- Analyze your codebase
- Generate API documentation
- Create usage examples
- Update README
- Add JSDoc comments
🛡️ Safety & Privacy
Privacy-First Architecture
- No Data Storage: Venice.ai doesn't store your code or conversations
- Local Processing: Project context stays on your machine
- Encrypted Transit: All API calls use HTTPS
- No Training Data: Your code is never used for model training
Safety Features
- Plan Mode: Review changes before execution
- Git Integration: All changes are committed, easy to revert
- Backup System: Automatic backups before major operations
- Permission System: Approve dangerous operations (deletions, system commands)
- Sandbox Mode: Test changes in isolated environment
📊 Pricing
Sophia uses Venice.ai's API. Current pricing (October 2025):
Text Models
| Model | Input (per 1M tokens) | Output (per 1M tokens) | |-------|----------------------|------------------------| | qwen3-235b | $0.15 | $0.60 | | qwen3-4b | $0.15 | $0.60 | | llama-3.3-70b | $0.15 | $0.60 | | llama-3.2-3b | $0.15 | $0.60 |
Alternative Payment
- DIEM Tokens: Stake DIEM for discounted access
- Free Tier: Available with Venice.ai account
🤝 Contributing
Sophia is open source! Contributions welcome.
# Clone repository
git clone https://github.com/yourusername/sophia.git
# Install dependencies
cd sophia
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build
npm run buildDevelopment Roadmap
- [ ] LSP integration for all major languages
- [ ] Model Context Protocol (MCP) support
- [ ] Multi-agent architecture
- [ ] Custom tool creation
- [ ] Plugin system
- [ ] VS Code extension
- [ ] Team collaboration features
- [ ] Project templates
- [ ] Code review automation
- [ ] CI/CD integration
📝 Recent Updates (October 2025)
Latest Changes
- ✅ Complete API documentation overhaul (programmatically generated)
- ✅ Added
logprobsparameter support - ✅ Pricing information in
/modelsendpoint - ✅ OpenAI Embedding name compatibility
- ✅ Billing usage export API
- ✅ Enhanced Chat Completions swagger docs
- ✅ Web search with citations on all text models
- ✅ Function calling on qwen3-235b, qwen3-4b, mistral-31-24b
- ✅ Model lineup updated (Qwen3 235b & Qwen3 4b replace Llama 4 Maverick & Llama 3.2 3B)
🆘 Support
- Documentation: docs.venice.ai
- Venice Discord: discord.gg/askvenice
- GitHub Issues: Report bugs and request features
- Email: [email protected]
📄 License
MIT License - see LICENSE for details.
🙏 Acknowledgments
Built with:
- Venice.ai - Privacy-first AI infrastructure
- Commander.js - CLI framework
- Inquirer.js - Interactive prompts
- Chalk - Terminal styling
- Ora - Terminal spinners
Sophia - Your intelligent coding companion. Built for developers who value privacy, autonomy, and excellence.
"Code smarter, not harder."
