Documentation Index
Fetch the complete documentation index at: https://mintlify.com/5unnykum4r/grip-ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thegrip serve command starts a lightweight REST API server without the full gateway features. It provides HTTP endpoints for agent interaction but skips channels (Telegram, Discord, Slack), cron scheduler, and heartbeat services.
Use this when:
- You only need the HTTP API
- You don’t want messaging platform integrations
- You want a minimal deployment
- You’re building custom integrations
Usage
What It Starts
REST API Server
HTTP API with FastAPI + Uvicorn:- Chat endpoints -
/api/chatfor agent conversations - Session management -
/api/sessionsfor session control - Tool execution -
/api/toolsfor direct tool calls - Health checks -
/api/healthfor monitoring - MCP servers -
/api/mcpfor server management
http://0.0.0.0:8080
What It Excludes
Compared togrip gateway, this does NOT start:
- ❌ Telegram, Discord, or Slack channels
- ❌ Cron scheduler for periodic tasks
- ❌ Heartbeat service for autonomous check-ins
- ❌ Message bus for channel routing
Options
—host / -H
Override the bind address from config:0.0.0.0 (all interfaces)
Common values:
0.0.0.0- Listen on all network interfaces127.0.0.1- Localhost only (most secure)192.168.1.100- Specific interface
—port / -p
Override the bind port from config:8080
Starting the Server
Basic Start
- Server is running
- Bind address and port
- Ready to accept requests
Custom Port
Localhost Only
Custom Host and Port
API Endpoints
Once running, access these endpoints:Health Check
Chat API
Session Management
Tool Execution
MCP Server Management
Configuration
The server reads from~/.grip/config.json:
host- Bind address (overridden by--host)port- Bind port (overridden by--port)max_request_body_bytes- Maximum request size (default: 1MB)rate_limit_per_minute- Global rate limitrate_limit_per_minute_per_ip- Per-IP rate limit
Stopping the Server
PressCtrl+C to stop:
- Stops accepting new requests
- Completes in-progress requests
- Closes connections
- Exits cleanly
Always use Ctrl+C or
kill <pid> (not kill -9) for graceful shutdown.Dependencies
The API server requires optional dependencies:- FastAPI - Web framework
- Uvicorn - ASGI server
- Pydantic - Request validation
- Python-multipart - File uploads
Use Cases
API-Only Deployment
Run Grip AI as a backend service:Development Server
Quick local testing without channels:Microservice Architecture
Embed Grip AI in a larger system:Docker Container
Production Deployment
Using systemd
Create/etc/systemd/system/grip-serve.service:
Behind Nginx
Using PM2
Docker Compose
Monitoring
Health Checks
Logs
Uvicorn logs are printed to stdout:Metrics
Access logs show request patterns:Troubleshooting
Port Already in Use
API Dependencies Missing
Connection Refused
- Server is running
- Correct host and port
- Firewall settings
- Server logs for errors
High Memory Usage
Comparison: serve vs gateway
| Feature | grip serve | grip gateway |
|---|---|---|
| REST API | ✓ | ✓ |
| Telegram | ✗ | ✓ |
| Discord | ✗ | ✓ |
| Slack | ✗ | ✓ |
| Cron scheduler | ✗ | ✓ |
| Heartbeat service | ✗ | ✓ |
| Message bus | ✗ | ✓ |
| Startup time | Fast | Slower |
| Memory usage | Low | Higher |
| Use case | API-only | Full platform |
grip serve:
- Building custom integrations
- Embedding in applications
- API-only deployments
- Minimal resource usage
- Development/testing
grip gateway:
- Need messaging platforms
- Want scheduled tasks
- Require autonomous agents
- Full feature set
- Production deployments
Related Commands
- grip gateway - Full platform with channels and services
- grip agent - Interactive chat (no server required)
- grip config - Configure server settings
- grip status - Check system status