Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .supabase/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"projectId": "eykqbnfsxzdiscrmqxdb"
}
63 changes: 63 additions & 0 deletions Dockerfile.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Dockerfile.production
# Production build for Open-Command with all integrations


FROM node:20-slim


# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*


WORKDIR /app


# Copy package files
COPY package*.json ./
COPY package-lock.json ./
COPY yarn.lock ./
COPY pnpm-lock.yaml ./
COPY bun.lockb ./
RUN npm ci --only=production 2>/dev/null || \
(npm install && echo "Using npm fallback")


# Copy application code
COPY . .


# Copy integration files
COPY integrations/ ./integrations/
COPY scripts/ ./scripts/
COPY infrastructure/ ./infrastructure/


# Make scripts executable
RUN chmod +x ./scripts/install-agents-plugins.sh


# Install global tools
RUN npm install -g openclaw 2>/dev/null || echo "⚠️ openclaw install skipped"


# Create data directories
RUN mkdir -p data/agents data/skills data/plugins data/openclaw


# Expose ports
EXPOSE 3456 4000 18789


# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:3456/api/healthz || exit 1


# Start command
CMD ["sh", "-c", "node integrations/multion-bridge.js & swarmclaw start"]
148 changes: 148 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,151 @@
# Open-Command

**Enterprise AI Agent Orchestration Platform**

Built on [SwarmClaw](#swarmclaw) with Supabase, MultiOn, Agency Agents, and full automation capabilities.

---

## πŸš€ Quick Deploy to Render

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy)

---

## πŸ“‹ Prerequisites

1. **Supabase Account** (Free tier works)
- Create project at https://supabase.com
- Run SQL migrations from `infrastructure/supabase/migrations/`
- Get your URL and API key

2. **OpenRouter Account** (for LLM access)
- Get API key at https://openrouter.ai
- Free models available

3. **MultiOn Account** (for web automation)
- Get API key at https://multion.ai
- Optional but recommended

---

## πŸ—οΈ Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Open-Command Platform β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ SwarmClaw β”‚ β”‚ OpenClaw β”‚ β”‚
β”‚ β”‚ (Core) β”‚ β”‚ (Gateway) β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Supabase β”‚ β”‚
β”‚ β”‚ - Auth β”‚ β”‚
β”‚ β”‚ - Postgres β”‚ β”‚
β”‚ β”‚ - Vector DB β”‚ β”‚
β”‚ β”‚ - Storage β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β” β”‚
β”‚ β”‚Agencyβ”‚ β”‚Multiβ”‚ β”‚Skillsβ”‚ β”‚
β”‚ β”‚Agentsβ”‚ β”‚ On β”‚ β”‚ & β”‚ β”‚
β”‚ └────── β””β”€β”€β”€β”€β”€β”˜ β”‚Pluginsβ”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ”§ Local Development

```bash
# Clone repository
git clone https://github.com/OrgHide/Open-Command.git
cd Open-Command

# Install dependencies
npm install

# Copy environment file
cp .env.example .env.local

# Edit .env.local with your credentials
nano .env.local

# Run migrations (if using Supabase locally)
supabase db push

# Install agents and plugins
chmod +x ./scripts/install-agents-plugins.sh
./scripts/install-agents-plugins.sh

# Start development
npm run dev
```

---

## πŸ“¦ Deployment

### Option 1: Render (Recommended)

1. Push code to GitHub
2. Go to Render Dashboard β†’ New β†’ Blueprint
3. Connect repository
4. Set environment variables from `.env.example`
5. Deploy

### Option 2: Docker

```bash
docker build -f Dockerfile.production -t open-command .
docker run -p 3456:3456 -p 4000:4000 \
-e SUPABASE_URL=... \
-e SUPABASE_KEY=... \
open-command
```

---

## 🎯 Features

### βœ… Included
- **235+ Agency Agents** (pre-installed via agency-agents)
- **Supabase Integration** (Auth, DB, Vector, Storage)
- **MultiOn Web Automation** (autonomous browsing)
- **Task Queue System** (Supabase-based)
- **Skills Library** (from SkillsLLM & ClawHub)
- **OpenClaw Gateway** (WhatsApp, Telegram, Discord)
- **SwarmDock Integration** (agent marketplace)
- **Background Workers** (task processing)
- **Realtime Updates** (Supabase Realtime)

### πŸ”œ Coming Soon
- RabbitMQ integration (alternative to Supabase tasks)
- Advanced analytics dashboard
- Agent training interface
- Custom skill builder

---

## πŸ’° Cost Estimate

- **Render**: $25/month (Standard instance)
- **Supabase**: $0/month (Free tier sufficient for most)
- **OpenRouter**: Pay-per-use (free models available)
- **MultiOn**: $0-50/month (depending on usage)

**Total: ~$25-75/month** for full production setup

---

# SwarmClaw

[![CI](https://github.com/swarmclawai/swarmclaw/actions/workflows/ci.yml/badge.svg)](https://github.com/swarmclawai/swarmclaw/actions/workflows/ci.yml)
Expand Down
121 changes: 121 additions & 0 deletions infrastructure/supabase/migrations/001_open_command_setup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
-- Enable required extensions
create extension if not exists "uuid-ossp";
create extension if not exists vector;
create extension if not exists pg_cron;


-- Agent Memory & Context (Replaces LanceDB)
create table if not exists agent_memories (
id uuid primary key default uuid_generate_v4(),
agent_id text not null,
session_id text,
memory_type text not null, -- 'short_term', 'long_term', 'reflection', 'skill'
content text not null,
embedding vector(1536),
metadata jsonb default '{}',
created_at timestamptz default now(),
updated_at timestamptz default now()
);


create index idx_agent_memories_agent_id on agent_memories(agent_id);
create index idx_agent_memories_type on agent_memories(memory_type);
create index idx_agent_memories_embedding on agent_memories using ivfflat (embedding vector_cosine_ops);


-- Task Queue (Replaces RabbitMQ for most use cases)
create table if not exists agent_tasks (
id uuid primary key default uuid_generate_v4(),
task_type text not null,
agent_id text,
assigned_to text,
status text default 'pending' check (status in ('pending', 'processing', 'completed', 'failed', 'cancelled')),
priority integer default 0,
payload jsonb default '{}',
result jsonb,
error_message text,
retry_count integer default 0,
max_retries integer default 3,
scheduled_at timestamptz,
started_at timestamptz,
completed_at timestamptz,
created_at timestamptz default now()
);


create index idx_agent_tasks_status on agent_tasks(status);
create index idx_agent_tasks_priority on agent_tasks(priority desc);
create index idx_agent_tasks_scheduled on agent_tasks(scheduled_at) where status = 'pending';


-- Agent Registry (For Agency Agents)
create table if not exists agent_registry (
id uuid primary key default uuid_generate_v4(),
agent_name text unique not null,
agent_type text not null, -- 'agency', 'custom', 'openclaw'
provider text,
model text,
system_prompt text,
skills text[] default '{}',
tools text[] default '{}',
is_active boolean default true,
config jsonb default '{}',
created_at timestamptz default now()
);


-- MultiOn Automation Sessions
create table if not exists multion_sessions (
id uuid primary key default uuid_generate_v4(),
agent_id text not null,
session_id text unique not null,
url text,
command text,
status text default 'pending',
result jsonb,
created_at timestamptz default now(),
completed_at timestamptz
);


-- Skills Library (From SkillsLLM & ClawHub)
create table if not exists skills_library (
id uuid primary key default uuid_generate_v4(),
skill_name text unique not null,
source text not null, -- 'skillsllm', 'clawhub', 'agency-agents', 'custom'
category text,
content text not null,
metadata jsonb default '{}',
is_enabled boolean default true,
installed_at timestamptz default now()
);


-- Row Level Security (Auth integration)
alter table agent_memories enable row level security;
alter table agent_tasks enable row level security;
alter table agent_registry enable row level security;
alter table multion_sessions enable row level security;
alter table skills_library enable row level security;


-- Storage bucket for agent assets
insert into storage.buckets (id, name, public)
values ('agent-assets', 'agent-assets', true)
on conflict (id) do nothing;


-- Auto-update timestamps
create or replace function update_updated_at_column()
returns trigger as $$
begin
new.updated_at = now();
return new;
end;
$$ language plpgsql;


create trigger update_agent_memories_updated_at
before update on agent_memories
for each row
execute function update_updated_at_column();
Loading
Loading