Autonomous influencer marketing: describe a campaign once, and CampaignOS helps discover creators, score fit with your objectives, draft outreach, and surface optimizations — powered by a LangGraph agent pipeline, brand-document retrieval (Nia), and creator metrics (Reacher).
Built as a Bun monorepo: a React + Tailwind dashboard (apps/web) and an Elysia API (apps/api) that runs the campaign intelligence graph.
- Onboarding — Campaign brief via
CampaignIntakeForm(optional brand file uploads when Nia is configured). - Agent run — LangGraph pipeline: normalize brief → retrieve document context → fetch creator metrics → run scorers → strategist → attribution reasoning → recommendations → composed report.
- Dashboard — View report, tiers, drafts, and insights in
CampaignDashboard. - Outreach — Batch outreach endpoint integrates with Reacher when keys are present (
/api/outreach/batch).
- Runtime & tooling: Bun, TypeScript
- API: Elysia, CORS
- Agent: LangGraph + @langchain/openai
- Knowledge: Nia (
nia-ai-ts) for ingesting brand files - Creator data: Reacher API for metrics / outreach
- Frontend: React 19, Vite 8, Tailwind CSS 4
- Bun installed (
bun --version)
bun installCopy the example env to the repository root (the API loads ../../.env):
cp .env.example .envFill in at minimum:
OPENAI_API_KEY— required for the campaign agentREACHER_API_KEY— creator metrics and outreach (use mock/reduced scope if your hackathon rules allow)NIA_API_KEY— optional; without it, document ingestion is disabled but much of the UI/agent path still runs
See .env.example for all variables and defaults (API_PORT, OPENAI_MODEL, Reacher base URL, etc.).
Standard dev (API + web):
bun run dev- API:
http://localhost:3041(override withAPI_PORT) - Web:
http://localhost:5173(override withWEB_PORT)
Hackathon demo preset (loads bundled demo fixture on the intake screen once):
bun run demo(VITE_ENABLE_DEMO=1 plus the same concurrent API/web servers.)
curl -s http://localhost:3041/healthExpect JSON with "ok": true and "service": "campaign-os-api".
Other useful commands:
bun run typecheck
bun run buildVite proxies /api to VITE_API_URL (default http://localhost:3041). Keep API_PORT and VITE_API_URL in sync — if the SPA proxies to the wrong host/port, you may see 404 on ingest or agent calls even when the UI loads.
| Method | Path | Purpose |
|---|---|---|
GET |
/health |
Liveness |
POST |
/api/agent/run |
Run campaign agent (JSON body: intake payload or legacy prompt shape) |
POST |
/api/agent/run/stream |
Same pipeline with NDJSON progress events |
POST |
/api/nia/ingest, /api/nia/upload |
Upload brand files for Nia indexing (NIA_API_KEY required) |
POST |
/api/outreach/batch |
Batch outreach (Reacher-backed when configured) |
apps/
api/ # Elysia server, LangGraph campaign graph, Nia + Reacher integrations
web/ # Vite + React + Tailwind dashboard
.env.example
- 404 on
/api/...— Startbun run dev:api(or fullbun run dev) and confirmVITE_API_URLmatches the API’s URL/port. - Nia ingest returns 503 — Set
NIA_API_KEYin.envat repo root. - Agent errors — Confirm
OPENAI_API_KEYand that your chosenOPENAI_MODELis available on your account.
Private hackathon project ("private": true in package.json). Adjust licensing if you open-source after the event.