Skip to main content

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:

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

1

Add Package Dependency in Xcode

  1. Open your Xcode project.
  2. Navigate to File → Add Package Dependencies…
  3. Enter the repository URL:
  1. Select version 1.0.0 or later.
  2. Choose your target and click Add Package.
2

Or Add to Package.swift

Add OrbitAI to your Package.swift file:
Package.swift
3

Import and Initialize

Import OrbitAI in your Swift files and configure:

Environment Variables Configuration

OrbitAI uses environment variables for API keys and configuration. Set them up using one of these methods:

Configure in Xcode

  1. Select your target scheme (Product → Scheme → Edit Scheme…)
  2. Go to Run → Arguments
  3. Add environment variables under Environment Variables section
Example variables:

Configuration Variables Reference

Configure API keys for different LLM providers:At least one provider key is required.
Control logging behavior:
Configure data persistence:
Set performance parameters:
Enable/disable features:

macOS Security & Permissions

OrbitAI may require specific permissions for certain features on macOS.

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

  1. Navigate to System Settings → Privacy & Security.
  2. Select the appropriate category (e.g., “Full Disk Access”, “Automation”).
  3. Add your application.
  4. 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
Run the test:
Expected output:

Troubleshooting

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+)
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)
Problem: “Missing API key” error at runtimeSolutions:
  • Verify environment variables are set correctly
  • Check spelling of variable names (e.g., OPENAI_API_KEY)
  • Ensure .env file is in the correct directory
  • For Xcode: Confirm environment variables are set in scheme settings
  • Print environment variables to debug: print(ProcessInfo.processInfo.environment)
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
Problem: High memory usage or slow performanceSolutions:
  • Adjust ORBIT_MAX_TOKENS to 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

Protect your API keys and sensitive data.

API Key Security

1

Never Hardcode Keys

❌ Don’t do this:
✅ Do this instead:
2

Use .gitignore

Add sensitive files to .gitignore:
.gitignore
3

Rotate Keys Regularly

  • Regenerate API keys periodically
  • Use different keys for development and production
  • Revoke compromised keys immediately
4

Implement Access Controls

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