Requirements
Before installing OrbitAI, ensure your development environment meets these requirements:Swift 6.0+
Latest Swift toolchain required
Xcode 15.0+
For iOS/macOS development
macOS 13.3+
Required for MLX support
iOS 16.0+
Minimum iOS version supported
Platform Support
OrbitAI supports multiple Apple platforms:| Platform | Minimum Version |
|---|---|
| macOS | 13.3+ (required for MLX support) |
| iOS | 16.0+ |
| watchOS | 9.0+ |
| tvOS | 16.0+ |
| visionOS | 1.0+ |
Managed Dependencies
OrbitAI automatically manages all required dependencies:- GRDB.swift - SQLite persistence
- swift-log - Structured logging
- mlx-swift - ML embeddings and semantic search
- SwiftSoup - HTML parsing and web scraping
Swift Package Manager Installation
Add Package Dependency in Xcode
- Open your Xcode project.
- Navigate to File → Add Package Dependencies…
- Enter the repository URL:
- Select version 1.0.0 or later.
- Choose your target and click Add Package.
Environment Variables Configuration
OrbitAI uses environment variables for API keys and configuration. Set them up using one of these methods:- Xcode Scheme
- .env File
- Command Line
Configure in Xcode
- Select your target scheme (Product → Scheme → Edit Scheme…)
- Go to Run → Arguments
- Add environment variables under Environment Variables section
Configuration Variables Reference
LLM Provider API Keys
LLM Provider API Keys
Configure API keys for different LLM providers:
At least one provider key is required.
| Variable | Provider | Required | Example |
|---|---|---|---|
OPENAI_API_KEY | OpenAI | Yes* | your-openai-key |
Logging Configuration
Logging Configuration
Control logging behavior:
| Variable | Description | Default | Options |
|---|---|---|---|
ORBIT_LOG_LEVEL | Logging verbosity | info | trace, debug, info, warning, error |
ORBIT_LOG_FORMAT | Log output format | pretty | pretty, json |
ORBIT_LOG_FILE | Log file path | None | File path string |
Database & Storage
Database & Storage
Configure data persistence:
| Variable | Description | Default |
|---|---|---|
ORBIT_DATABASE_PATH | SQLite database location | ./orbit_data.db |
ORBIT_MEMORY_STORAGE | Memory storage path | ./orbit_memory/ |
ORBIT_CACHE_DIR | Cache directory | ./orbit_cache/ |
Performance & Limits
Performance & Limits
Set performance parameters:
| Variable | Description | Default |
|---|---|---|
ORBIT_MAX_TOKENS | Maximum tokens per request | 4096 |
ORBIT_TIMEOUT | Request timeout (seconds) | 60 |
ORBIT_MAX_RETRIES | Maximum retry attempts | 3 |
ORBIT_RATE_LIMIT | Requests per minute | 60 |
Feature Flags
Feature Flags
Enable/disable features:
| Variable | Description | Default |
|---|---|---|
ORBIT_ENABLE_TELEMETRY | Usage analytics | true |
ORBIT_ENABLE_MEMORY | Agent memory system | true |
ORBIT_ENABLE_GUARDRAILS | Safety checks | true |
ORBIT_ENABLE_TOOLS | Tool integration | true |
macOS Security & Permissions
Required Permissions
Depending on the tools and features you use, you may need to grant:Network Access
Required for LLM API calls and web scraping tools
File System Access
For knowledge base document ingestion and file operations
Calendar & Reminders
When using Apple ecosystem tools
Location Services
For location-aware agent features
Granting Permissions
- Navigate to System Settings → Privacy & Security.
- Select the appropriate category (e.g., “Full Disk Access”, “Automation”).
- Add your application.
- Restart your application.
You’ll be prompted for permissions when features requiring them are first accessed.
Verification & Testing
Verify your installation with this simple test:Test.swift
Troubleshooting
Package Resolution Fails
Package Resolution Fails
Problem: Xcode can’t resolve the OrbitAI packageSolutions:
- Ensure you’re using Xcode 15.0+
- Check your internet connection
- Try resetting package cache: File → Packages → Reset Package Caches
- Verify the repository URL is correct
- Check if the minimum platform version is met (macOS 13.3+)
MLX Dependencies Error
MLX Dependencies Error
Problem: MLX-related build errorsSolutions:
- Verify you’re running on macOS 13.3 or later
- MLX requires Apple Silicon (M1/M2/M3) or compatible Intel Mac
- Ensure Xcode Command Line Tools are installed:
xcode-select --install - Try cleaning build folder: Product → Clean Build Folder (Shift + Cmd + K)
API Key Not Found
API Key Not Found
Problem: “Missing API key” error at runtimeSolutions:
- Verify environment variables are set correctly
- Check spelling of variable names (e.g.,
OPENAI_API_KEY) - Ensure
.envfile is in the correct directory - For Xcode: Confirm environment variables are set in scheme settings
- Print environment variables to debug:
print(ProcessInfo.processInfo.environment)
Permission Denied Errors
Permission Denied Errors
Problem: macOS blocks file or network accessSolutions:
- Grant necessary permissions in System Settings → Privacy & Security
- For file access: Add app to “Full Disk Access” or “Files and Folders”
- For network: Check “Network” permissions
- Restart your app after granting permissions
Memory or Performance Issues
Memory or Performance Issues
Problem: High memory usage or slow performanceSolutions:
- Adjust
ORBIT_MAX_TOKENSto a lower value - Disable memory features if not needed:
ORBIT_ENABLE_MEMORY=false - Clear cache directory periodically
- Monitor agent execution with logging:
ORBIT_LOG_LEVEL=debug - Consider using lighter LLM models for development
Security Best Practices
API Key Security
Rotate Keys Regularly
- Regenerate API keys periodically
- Use different keys for development and production
- Revoke compromised keys immediately
Next Steps
Quickstart Guide
Build your first OrbitAI application
Core Components
Learn about Agents, Tasks, and Orbits
Agent Examples
Explore practical agent implementations
API Reference
Detailed API documentation