Access SAM from your iPad, iPhone, or any device with a browser.
SAM Web is a web interface that lets you chat with SAM when you're away from your Mac. Perfect for quick questions from your tablet or accessing SAM from other devices on your network.
SAM Web is a browser-based interface that lets you chat with SAM from any device. All of SAM's backend features work through the chat interface - you're just controlling SAM remotely.
How it works:
SAM Web connects to SAM running on your Mac. When you chat with SAM through your iPad's browser, SAM executes everything on your Mac and streams the responses back to you. This means:
What's different: - You can't drag-and-drop documents into the browser to upload them (may be available in a future release) - You need SAM running on your Mac with the API server enabled - You need network access to your Mac (same Wi-Fi or VPN)
Think of SAM Web as a remote control for SAM. Everything SAM can do, you can do through SAM Web - you're just doing it from a different device.
Before using SAM Web, you need:
SAM must stay running while you use SAM Web
API server enabled in SAM
Copy your API token (you'll need this for SAM Web)
Network access to your Mac
Remote access: Requires VPN or port forwarding (advanced)
Web browser on your device
The easiest way to use SAM Web is to serve it directly from the repository:
Clone the repository:
bash
git clone https://github.com/SyntheticAutonomicMind/SAM-web.git
cd SAM-web
Start a local web server: ```bash # Using Python (built into macOS) python3 -m http.server 8000
# Or using Node.js npx http-server -p 8000 --cors
# Or using Caddy caddy file-server --listen :8000 ```
http://localhost:8000On other devices: http://YOUR_MAC_IP:8000
Connect to SAM:
You can also connect directly to SAM's API without downloading SAM Web:
Copy the API Token
Find your Mac's IP address:
192.168.1.100)Only needed for access from other devices
Open SAM Web:
http://localhost:8000 (same device)Or http://192.168.1.100:8000 (from iPad/other device)
Enter credentials:
Chat Interface: - Type your message and press Enter or click Send - See responses stream in real-time - Code blocks have syntax highlighting - Click copy button on code blocks to copy
Conversations: - Create new conversations with the New button - Load previous conversations from the sidebar - Delete conversations with the trash icon - Rename conversations by clicking the conversation title
Mini-Prompts: - Quick context injection for specialized tasks - Click the prompts icon to view available mini-prompts - Click a mini-prompt to add it to your message - Create, edit, or delete mini-prompts
Model Selection: - Choose from available AI models - Switch models mid-conversation - Models must be configured in SAM first
Parameters: - Adjust temperature for more creative or focused responses - Configure top_p for sampling control - Set max tokens for response length
On iPad: - Add to Home Screen for app-like experience - Use landscape mode for more screen space - Keyboard shortcuts work: Enter to send, Escape to cancel
Performance: - Keep SAM and your device on the same network for best speed - Close unused conversations to keep interface responsive - Large conversations may load slower over network
Privacy: - All data stays on your Mac (SAM Web is just an interface) - API token is stored in your browser's LocalStorage - No data sent to external servers
Possible causes: 1. SAM is not running on your Mac 2. API server is disabled in SAM Preferences 3. Wrong API token 4. Network connectivity issues
Solutions:
1. Verify SAM is running with API server enabled
2. Check that your API token is correct (copy fresh from SAM)
3. Make sure both devices are on same network
4. Try pinging your Mac's IP address: ping 192.168.1.100
This shouldn't happen with normal setup, but if it does:
1. Make sure you're serving SAM Web from a web server (not opening index.html directly)
2. Check that SAM's API server allows your origin
3. Try accessing from http://localhost:8000 instead of file://
http://YOUR_MAC_IP:8080 (SAM API) in iPad browserLocal network use (recommended): - Keep SAM Web on your trusted home/office network - Use strong Wi-Fi password - Don't expose port 8080 directly to internet
Remote access (advanced users): - Use VPN to connect to your home network - Or set up secure port forwarding through your router - Consider using HTTPS with proper certificate
SAM Web is a remote interface to SAM. All AI work happens on your Mac where SAM is installed. You're just controlling it from a different device.
Everything works through chat: - Chat with full streaming responses - Use all conversation features (system prompts, personalities, mini-prompts, shared topics, folders) - Access all AI models and providers you've configured - Generate images (saved on your Mac) - Read, write, and edit files (on your Mac) - Run terminal commands (on your Mac) - Search your documents and memory - Use all of SAM's tools and capabilities
What's missing: - Document upload: Can't drag-and-drop documents into the browser yet (may be available in a future release) - LoRA training UI: No web interface for training models (use the native app) - Conversation export: Can't export conversations as files (use the native app) - Memory/RAG management UI: Can't manage documents through a UI (but SAM can still access them via tools)
The key thing to understand: When you ask SAM to do something through SAM Web, it happens on your Mac. If you ask SAM to generate an image, edit a file, or run a command, it does that on your Mac and shows you the results.
Frontend: - Pure HTML5, CSS3, JavaScript (ES6+) - No build step or dependencies - Zero npm packages - All assets self-hosted
Communication: - REST API via SAM's Vapor server - Server-Sent Events (SSE) for streaming - Bearer token authentication
Storage: - LocalStorage for API token and settings - SessionStorage for temporary state - No backend database (all data in SAM)
POST /api/chat/completions - Send messagesGET /api/conversations - List conversationsPOST /api/conversations - Create conversationDELETE /api/conversations/:id - Delete conversationGET /api/models - List available modelsGET /api/prompts/mini - List mini-promptsPOST /api/prompts/mini - Create mini-promptMinimum requirements: - JavaScript enabled - LocalStorage support - Server-Sent Events (SSE) support - Modern CSS (Grid, Flexbox)
Source code: github.com/SyntheticAutonomicMind/SAM-web
License: GNU General Public License v3.0 (same as SAM)
Contributions: Welcome! See repository for contribution guidelines.
SAM Web brings SAM to your iPad and other devices. For full features, use the native macOS app.