An AI-native platform designed to orchestrate end-to-end marketing campaigns. Pilot models a realistic campaign-planning workflow: create a project, complete a structured brief, run an autonomous agent with local tool access, approve the final output, and evaluate the specific run against core KPIs.
- Next.js 16 App Router
- Bun
- TypeScript
- Tailwind CSS
- Zod
- Anthropic Claude Messages API
- OpenCode / OpenAI-compatible fallback
- Mock fallback for offline demos
- Claude-style tool use with local tool execution
- Agent roles: Manager, Research, Strategist, Content, Reviewer
- Lightweight RAG over curated local knowledge
- Prompt-injection and claim-safety guardrails
- Human-in-the-loop approval before final report generation
- Run-specific evaluation for completeness, brief alignment, tool success, guardrails, actionability, and approval readiness
- Browser-local project persistence with
localStorage
Campaigns- Starts empty on first load.
- Create or reopen campaign projects saved in this browser.
Workspace- Complete the structured campaign brief.
- Run the agent only when the brief has enough usable input.
- Review tool traces, retrieved knowledge, decisions, blockers, and the approval gate.
- Approve the draft to create final campaign output.
Evaluations- Empty until an approved run exists.
- Scores the selected run against the original brief and generated output.
bun install
bun run devOpen http://localhost:3000.
Copy .env.example to .env.local and choose a provider.
AI_PROVIDER=anthropic
ANTHROPIC_API_KEY=...
ANTHROPIC_MODEL=claude-sonnet-4-5-20250929OpenCode-compatible fallback:
AI_PROVIDER=opencode
OPENCODE_BASE_URL=http://localhost:4096/v1
OPENCODE_API_KEY=...
OPENCODE_MODEL=...Offline demo:
AI_PROVIDER=mockIf AI_PROVIDER is empty, the app auto-detects in this order:
- Anthropic when
ANTHROPIC_API_KEYexists - OpenCode when
OPENCODE_BASE_URLandOPENCODE_MODELexist - Mock fallback
POST /api/agent/plan
Validates the campaign brief, runs input guardrails, asks the active provider to plan tool calls, executes local tools, and returns a draft.
POST /api/agent/finalize
Requires { draft, approved: true } and returns the final campaign report.
POST /api/evaluations/run
Evaluates a specific run from { brief, draft, report, toolTrace }.
GET /api/evaluations
Returns an empty list in this local-first version. The UI uses run-specific evaluations instead of global dummy scenarios.
bun testCovered areas:
- Schema and provider selection
- Local campaign store serialization
- Guardrails
- Tool execution
- Run evaluation scoring
The project intentionally avoids databases, Redis, vector DBs, and external social APIs. Campaign projects are persisted in localStorage under samy_campaign_projects_v1, so the first visit looks like a real empty product instead of a pre-filled mock dashboard.

