Self-hosted · Business SDK

Getting Started

Deploy Fred — your AI business development agent — on your own infrastructure. One Docker Compose command. Your data never leaves your server.

Prerequisites

RequirementNotes
Docker + ComposeDocker Engine 24+ and Docker Compose v2
VPS or serverMin 2 vCPU, 4GB RAM. Hetzner CX21 or equivalent.
Domain nameA domain you control with DNS access
License keyIssued after checkout at aifredo.chat/fred-setup
Google OAuth credentialsOptional — for Gmail / Calendar integration

Quickstart

Get Fred running in under 5 minutes.

1

Clone the SDK repo

git clone https://github.com/aifredoai/sdk.git aifredo-sdk
cd aifredo-sdk
2

Configure your environment

cp .env.example .env
nano .env

At minimum you need:

AIFREDO_LICENSE_KEY=your-license-key-here
ANTHROPIC_API_KEY=sk-ant-...
DOMAIN=fred.yourdomain.com
3

Point your DNS

fred.yourdomain.com  →  A  →  YOUR_SERVER_IP
4

Start the stack

docker compose up -d
✓ Caddy provisions a free SSL certificate via Let's Encrypt. Allow 60 seconds on first boot.
5

Verify Fred is running

curl https://fred.yourdomain.com/health

You should see {"status":"ok"}. Charged is live.

Environment Variables

VariableRequiredDescription
AIFREDO_LICENSE_KEYYesYour SDK license key from the setup wizard
ANTHROPIC_API_KEYYesYour Anthropic API key — powers Fred
DOMAINYesYour domain (e.g. fred.yourdomain.com)
GOOGLE_CLIENT_IDOptionalFor Gmail & Calendar integration
GOOGLE_CLIENT_SECRETOptionalFor Gmail & Calendar integration

License Key

Issued after the setup wizard at aifredo.chat/fred-setup. Links your deployment to the AiFredo control plane for heartbeat monitoring, config sync, and billing.

⚠ Keep your license key secret. Do not commit your .env to version control.

Fred Config

SOUL.md

Defines Fred's personality and rules. Edit to match your brand voice.

# config/fred/SOUL.md
You are Fred, working for [Your Company].
Your goal is to [your sales objective].
Target market: [your ideal customer]
Tone: professional / casual / direct

config.yaml

name: fred
model: claude-sonnet
tool_groups:
  - web
  - files
  - bash

Docker Services

ServicePortDescription
caddy80, 443Reverse proxy + automatic SSL
langgraph2024Fred's AI engine (DeerFlow + Claude)
gateway8001API gateway for tool routing
workspace-mcp8000Google Workspace MCP server
# View services
docker compose ps

# Stream Fred logs
docker compose logs langgraph -f

# Restart Fred
docker compose restart langgraph

Caddy & SSL

Caddy handles SSL automatically via Let's Encrypt. Set DOMAIN in your .env and ensure DNS is pointing to your server before starting the stack.

✓ SSL renews automatically. No certbot, no cron jobs, no nginx config.

Google Workspace Integration

Fred can send emails, read your calendar, and access Google Docs via the included MCP server.

1

Create a Google Cloud project

Go to console.cloud.google.com → New Project

2

Enable APIs

Enable: Gmail API, Google Calendar API, Google Drive API

3

Create OAuth credentials

APIs & Services → Credentials → OAuth 2.0 Client ID. Redirect URI: https://fred.yourdomain.com/oauth/callback

4

Add to .env

GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret

Control Plane API

Your SDK communicates with aifredo.chat automatically. No manual integration needed.

EndpointMethodDescription
/api/sdk/config/:keyGETFetch latest Fred configuration
/api/sdk/heartbeatPOSTReport uptime every 6 hours
/api/sdk/onboardPOSTRegister new deployment
/api/sdk/onboard/statusGETCheck onboarding status

Heartbeat

The SDK pings aifredo.chat every 6 hours to confirm your deployment is healthy. Powers the status indicator in your dashboard.

# Check heartbeat logs
docker compose logs gateway | grep heartbeat
If heartbeats stop for 24+ hours, you'll receive an email alert at your registered address.