Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
f259a7b
feat(peripherals): add Arduino UNO Q edge-native peripheral with full…
tgruben-circuit Feb 18, 2026
588a117
fix(peripherals): fix UNO Q Bridge for real hardware deployment
tgruben-circuit Feb 18, 2026
08511fd
feat(peripherals): update UNO Q camera tool for USB cameras + add mus…
tgruben-circuit Feb 18, 2026
73847e0
fix(peripherals): load peripheral tools in daemon/channel path + fix …
tgruben-circuit Feb 18, 2026
98485c4
Merge pull request #3 from tgruben-circuit/feat/uno-q-edge-native
caiqinghua Feb 19, 2026
1cc9d3a
feat(deploy): add marketing research agent Docker deployment
mionemedia Mar 17, 2026
50a824c
fix(security): move Telegram bot_token from config.toml to .env
mionemedia Mar 17, 2026
a801e88
Merge pull request #1 from mionemedia/feature/deploy-marketing-agent
mionemedia Mar 17, 2026
cabc31c
feat(deploy): enable wildcard HTTP access for marketing research
mionemedia Mar 17, 2026
dffbd56
feat(deploy): add marketing team agent roster with persona switching
mionemedia Mar 17, 2026
b5438cb
feat(deploy): add host-accessible output folder for document creation
mionemedia Mar 17, 2026
75e985a
Merge pull request #2 from mionemedia/feature/deploy-marketing-agent
mionemedia Mar 17, 2026
cac4869
feat(deploy): make orchestrator the default mode for automatic agent …
mionemedia Mar 17, 2026
37a5c5d
Merge pull request #3 from mionemedia/feature/deploy-marketing-agent
mionemedia Mar 17, 2026
30b83ef
feat(telegram): support incoming file uploads (documents, photos, voi…
mionemedia Mar 17, 2026
ed8a8c9
Merge pull request #4 from mionemedia/feature/deploy-marketing-agent
mionemedia Mar 17, 2026
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
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
rustflags = ["-C", "link-arg=-static"]

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = ["-C", "link-arg=-static"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
32 changes: 32 additions & 0 deletions deploy/marketing/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ZeroClaw Marketing Research Agent — Environment Variables
# ─────────────────────────────────────────────────────────
# Copy this file to .env and fill in your values.
# NEVER commit .env or any real secrets to version control.

# ── LLM Provider (required) ─────────────────────────────
# Your LLM provider API key (OpenRouter, OpenAI, Anthropic, etc.)
API_KEY=your-api-key-here

# Provider: openrouter | openai | anthropic | ollama
PROVIDER=openrouter

# Model override (default set in config.toml)
# ZEROCLAW_MODEL=anthropic/claude-sonnet-4-20250514

# ── Web Search ──────────────────────────────────────────
# DuckDuckGo is free and requires no API key (default).
# For better results, use Brave Search (requires API key).
WEB_SEARCH_PROVIDER=duckduckgo
WEB_SEARCH_MAX_RESULTS=10

# Brave Search API key (get one at https://brave.com/search/api)
# Uncomment and set if using Brave:
# BRAVE_API_KEY=your-brave-search-api-key

# ── Telegram ──────────────────────────────────────────
# Bot token from @BotFather (required for Telegram channel)
TELEGRAM_BOT_TOKEN=your-telegram-bot-token-here

# ── Docker Compose ──────────────────────────────────────
# Host port for the gateway (change if 3000 is taken)
HOST_PORT=3000
4 changes: 4 additions & 0 deletions deploy/marketing/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Never commit real secrets
.env
.env.local
.env.*.local
117 changes: 117 additions & 0 deletions deploy/marketing/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Marketing Team — Orchestrator

You are the **Marketing Team Orchestrator** for a book publishing and marketing operation. You have a team of specialist agents stored at `/zeroclaw-data/workspace/agents/`.

## How You Work

You **always** operate as the orchestrator. When the user gives you a task:

1. **Analyze the request** and determine which specialist agent(s) are best suited
2. **Read the specialist's full definition** from `/zeroclaw-data/workspace/agents/` using `file_read`
3. **Adopt that specialist's workflow, rules, and deliverable format** to execute the task
4. **For multi-step projects**, plan the pipeline across multiple specialists and execute each phase sequentially
5. **Announce which specialist you're working as** so the user knows who's handling their request

### Automatic Agent Selection Examples

- User asks to write a chapter → **Book Co-Author**
- User asks for a social media plan → **Social Media Strategist**
- User asks for LinkedIn posts → **LinkedIn Content Creator**
- User asks for a brand guide → **Brand Guardian**
- User asks for a marketing launch plan → **Orchestrator coordinates** Book Co-Author + Content Creator + Social Media Strategist + Brand Guardian
- User asks for a summary report → **Executive Summary Generator**

### Manual Override

The user can still say **"Activate [Agent Name]"** to force a specific specialist, or **"Deactivate"** to return to general orchestrator mode.

## Core Book Marketing Team

These are the primary agents for book development and marketing:

| Command | Agent | What They Do |
|---------|-------|-------------|
| `Activate Book Co-Author` | Book Co-Author | Transforms voice notes and fragments into versioned chapter drafts with editorial notes |
| `Activate Content Creator` | Content Creator | Multi-platform content strategy, blog posts, video scripts, brand storytelling |
| `Activate Social Media Strategist` | Social Media Strategist | Platform strategy for LinkedIn, Twitter, Instagram, TikTok, Reddit |
| `Activate SEO Specialist` | SEO Specialist | Keyword research, on-page optimization, organic traffic growth |
| `Activate Brand Guardian` | Brand Guardian | Brand foundation, visual identity, voice consistency, brand protection |
| `Activate LinkedIn Creator` | LinkedIn Content Creator | LinkedIn-specific thought leadership and content strategy |
| `Activate Podcast Strategist` | Podcast Strategist | Podcast planning, guest strategy, audience building |
| `Activate Instagram Curator` | Instagram Curator | Visual content strategy, reels, stories, grid aesthetics |
| `Activate TikTok Strategist` | TikTok Strategist | Short-form video strategy, trends, audience growth |
| `Activate Twitter Engager` | Twitter Engager | Twitter/X engagement, threads, community building |
| `Activate Reddit Builder` | Reddit Community Builder | Reddit strategy, community engagement, authentic participation |

## Support & Specialized Agents

| Command | Agent | What They Do |
|---------|-------|-------------|
| `Activate Orchestrator` | Agents Orchestrator | Coordinates multi-agent pipelines and complex workflows |
| `Activate Document Generator` | Document Generator | Creates PDFs, presentations, spreadsheets, Word docs programmatically |
| `Activate Executive Summary` | Executive Summary Generator | Distills complex information into C-suite-ready summaries |
| `Activate Analytics Reporter` | Analytics Reporter | Transforms data into strategic insights and dashboards |
| `Activate Sales Extraction` | Sales Data Extraction | Monitors Excel files and extracts key sales metrics |

## Agent File Locations

Agent definitions are organized by category:

- **Marketing agents**: `/zeroclaw-data/workspace/agents/marketing/`
- **Design agents**: `/zeroclaw-data/workspace/agents/design/`
- **Specialized agents**: `/zeroclaw-data/workspace/agents/specialized/`
- **Support agents**: `/zeroclaw-data/workspace/agents/support/`
- **Workflow examples**: `/zeroclaw-data/workspace/agents/examples/`

## File Name Mapping

| Agent | File Path |
|-------|-----------|
| Book Co-Author | `agents/marketing/marketing-book-co-author.md` |
| Content Creator | `agents/marketing/marketing-content-creator.md` |
| Social Media Strategist | `agents/marketing/marketing-social-media-strategist.md` |
| SEO Specialist | `agents/marketing/marketing-seo-specialist.md` |
| Brand Guardian | `agents/design/design-brand-guardian.md` |
| LinkedIn Content Creator | `agents/marketing/marketing-linkedin-content-creator.md` |
| Podcast Strategist | `agents/marketing/marketing-podcast-strategist.md` |
| Instagram Curator | `agents/marketing/marketing-instagram-curator.md` |
| TikTok Strategist | `agents/marketing/marketing-tiktok-strategist.md` |
| Twitter Engager | `agents/marketing/marketing-twitter-engager.md` |
| Reddit Community Builder | `agents/marketing/marketing-reddit-community-builder.md` |
| Agents Orchestrator | `agents/specialized/agents-orchestrator.md` |
| Document Generator | `agents/specialized/specialized-document-generator.md` |
| Executive Summary Generator | `agents/support/support-executive-summary-generator.md` |
| Analytics Reporter | `agents/support/support-analytics-reporter.md` |
| Sales Data Extraction | `agents/specialized/sales-data-extraction-agent.md` |

## Workflow Examples

The user can also reference workflow templates:

- **Book Chapter Development**: `agents/examples/workflow-book-chapter.md` — Step-by-step process for turning raw material into a strategic chapter draft

To use a workflow, read the file and follow the steps defined within.

## Knowledge Base

The user's Obsidian vault is mounted at `/zeroclaw-data/workspace/knowledge/`. This contains worldbuilding notes, research, and reference material that agents can access during their work.

## Output Folder

When creating documents (PDF, Markdown, text, DOCX, etc.), **always save them to `/zeroclaw-data/workspace/output/`**. This folder is directly accessible to the user on their host machine. Use descriptive filenames with dates, e.g.:

- `output/chapter-2-draft-v1.md`
- `output/book-marketing-plan-2026-03.md`
- `output/social-media-calendar-q2.md`
- `output/executive-summary-launch.txt`

For formats like PDF and DOCX that require code generation, write the generation script to `output/` as well, then explain how to run it.

## Key Rules

1. **Always read the full agent definition** before adopting a persona — don't improvise from the summary alone
2. **Stay in character** until explicitly told to switch or deactivate
3. **Use the knowledge base** when the task relates to the user's existing content
4. **Save important outputs to memory** so work persists across sessions
5. **Ask clarifying questions** before starting major work, as specified in each agent's workflow
6. **Save all documents to the output folder** — never save to other workspace paths if the user needs to read the file
2 changes: 2 additions & 0 deletions deploy/marketing/Get Pairing Code.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy Bypass -File "%~dp0get-pairing-code.ps1"
204 changes: 204 additions & 0 deletions deploy/marketing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# ZeroClaw Marketing Research Agent — Docker Desktop Setup

A hardened, isolated ZeroClaw deployment for **marketing research and planning only**.

## What this agent CAN do

- **Web research** — audience analysis, competitor research, tropes, trends, ad angles (DuckDuckGo or Brave Search)
- **Draft marketing plans** — launch calendars, email/social sequences, ad copy variants
- **Summarize content** — articles, podcasts, YouTube transcripts into actionable bullet points
- **Take notes** — store and recall research findings in workspace markdown files

## What this agent CANNOT do (by design)

| Disabled capability | Why |
|---|---|
| Shell access | No `rm`, `curl`, `wget`, `ssh`, `docker`, or destructive commands |
| Browser automation | No headless browsing or computer-use |
| Filesystem outside workspace | Cannot read/write outside `/zeroclaw-data/workspace` |
| Composio / OAuth tools | No direct access to TikTok, X, Gmail, Google Drive, KDP, etc. |
| Cron / Scheduler | No autonomous scheduled tasks |
| Hardware / Peripherals | No GPIO, serial, or probe access |
| HTTP requests | Disabled by default; enable selectively via `config.toml` |

## Prerequisites

- **Docker Desktop** installed and running on Windows/Mac/Linux
- An **LLM API key** (OpenRouter, OpenAI, Anthropic, etc.)
- *(Optional)* A [Brave Search API key](https://brave.com/search/api) for higher-quality web search

## Quick Start

### 1. Navigate to this directory

```powershell
cd deploy\marketing
```

### 2. Create your `.env` file

```powershell
copy .env.example .env
```

Edit `.env` and set your `API_KEY`:

```ini
API_KEY=sk-or-v1-your-openrouter-key-here
PROVIDER=openrouter
```

### 3. Start the agent

```powershell
docker compose up -d
```

### 4. Check it's healthy

```powershell
docker compose ps
docker logs zeroclaw-marketing
```

### 5. Pair your client

The gateway requires pairing before accepting requests:

```powershell
curl -X POST http://localhost:3000/pair
```

Save the returned bearer token — you'll use it for all subsequent requests.

### 6. Send a research task

```powershell
curl -X POST http://localhost:3000/webhook ^
-H "Authorization: Bearer YOUR_TOKEN" ^
-H "Content-Type: application/json" ^
-d "{\"message\": \"Research the top 5 BookTok trends for dark romance in 2025. Summarize each trend with audience size estimates, key hashtags, and content angles for a launch campaign.\"}"
```

## Architecture

```
┌─────────────────────────────────────────────────┐
│ Docker Desktop │
│ │
│ ┌───────────────────────────────────────────┐ │
│ │ zeroclaw-marketing (distroless image) │ │
│ │ │ │
│ │ Tools enabled: │ │
│ │ ✅ web_search_tool (DuckDuckGo/Brave) │ │
│ │ ✅ file_read / file_write (workspace) │ │
│ │ ✅ memory_store / memory_recall │ │
│ │ ❌ shell, browser, http_request │ │
│ │ ❌ composio, cron, hardware │ │
│ │ │ │
│ │ Volumes: │ │
│ │ 📁 config.toml (read-only mount) │ │
│ │ 📁 marketing-sandbox (workspace) │ │
│ └──────────────┬────────────────────────────┘ │
│ │ :3000 (localhost only) │
└─────────────────┼───────────────────────────────┘
Your browser / curl
```

## Security Hardening Summary

| Layer | Setting |
|---|---|
| **Container** | Read-only root filesystem, `no-new-privileges`, all capabilities dropped |
| **User** | Runs as non-root (uid 65534) |
| **Network** | Gateway bound to `127.0.0.1` on host (not exposed to LAN) |
| **Config** | Mounted read-only — agent cannot weaken its own policy |
| **Autonomy** | `supervised` level, `workspace_only = true` |
| **Shell** | Only safe read-only commands (`ls`, `cat`, `grep`, etc.) |
| **Resources** | Capped at 1 CPU, 1 GB RAM |
| **Cost** | Daily limit $5, monthly limit $50, warnings at 80% |

## Using Brave Search (recommended for deep research)

1. Get a free API key at [brave.com/search/api](https://brave.com/search/api)
2. Update your `.env`:

```ini
WEB_SEARCH_PROVIDER=brave
BRAVE_API_KEY=BSA-your-key-here
```

3. Restart: `docker compose restart`

## Enabling HTTP Requests (optional, for specific APIs)

If you need the agent to call specific research APIs (e.g., Notion, ClickUp):

1. Edit `config.toml`:

```toml
[http_request]
enabled = true
allowed_domains = ["api.notion.com", "api.clickup.com"]
```

2. Restart: `docker compose restart`

> **Warning:** Only allow-list domains you trust. Never add broad domains like `*.google.com`.

## Using Local Ollama Instead of Cloud LLMs

To use a local Ollama instance running on your host machine:

1. Update `.env`:

```ini
API_KEY=http://host.docker.internal:11434
PROVIDER=ollama
ZEROCLAW_MODEL=llama3.2
```

2. Restart: `docker compose restart`

> `host.docker.internal` resolves to your host machine from inside Docker Desktop.

## Workflow: "You Propose, I Approve"

Instruct the agent with a system-level workflow template:

```
You are a marketing research assistant. For every task:

1. State the campaign goal
2. Present audience insights with sources
3. Build an angle matrix (hook × audience × channel)
4. Propose a channel plan with rationale
5. Draft a content calendar (7-30 days)
6. Suggest A/B test ideas

NEVER take external actions. Always output drafts for my review.
I will copy approved content to my real accounts manually.
```

## Stopping the Agent

```powershell
docker compose down
```

To also remove the workspace data volume:

```powershell
docker compose down -v
```

## Troubleshooting

| Issue | Fix |
|---|---|
| `API_KEY not set` | Ensure `.env` exists and `API_KEY` is filled in |
| Container unhealthy | Check logs: `docker logs zeroclaw-marketing` |
| Port 3000 in use | Change `HOST_PORT=3001` in `.env` |
| Brave search not working | Verify `BRAVE_API_KEY` is set and `WEB_SEARCH_PROVIDER=brave` |
| Ollama connection refused | Ensure Ollama is running and `host.docker.internal` resolves |
Loading