An AI content agent that drafts long-form content in a defined brand voice. It combines:
- Anthropic Claude for the writing
- an optional Notion-backed brand knowledge base (voice, product info, guidelines, examples)
- a lightweight skills system for reusable copywriting expertise
- a small Express API you can call from anywhere
Point it at your own brand and it drafts marketing, email, social, documentation, or support content that stays on-voice.
POST /api/generate-content
→ load brand context (Notion, or the built-in default template)
→ load relevant skills for the content type
→ build a system prompt from brand voice + guidelines + skills
→ Claude generates the content
→ returns { content, metadata }
Brand knowledge lives outside the code. With no Notion credentials it uses the generic template in src/brand-context.ts; with Notion connected, non-technical teammates can edit brand voice and guidelines directly in Notion and the agent picks it up (cached, 5-min TTL).
npm install
cp .env.example .env # add your ANTHROPIC_API_KEY
npm run devcurl -X POST http://localhost:3000/api/generate-content \
-H "Content-Type: application/json" \
-d '{
"type": "marketing",
"brief": "Landing page hero for a returns-automation tool",
"context": { "audience": "e-commerce ops leads", "length": "short" }
}'| Variable | Required | Purpose |
|---|---|---|
ANTHROPIC_API_KEY |
yes | Claude API access |
NOTION_TOKEN |
no | Enables the Notion-backed brand knowledge base |
NOTION_DATABASE_ID |
no | The Notion database holding brand pages |
PORT |
no | Server port (default 3000) |
Without the Notion variables, the agent runs on the default brand template — good for trying it out.
A database with these properties: Name (title), Category (select: Brand Voice, Product Info, Guidelines, Examples, Company Background), Tags (multi-select), Active (checkbox). Page body becomes the content.
marketing · email · social · documentation · support — each gets tailored instructions in the system prompt. Requests are validated with zod.
Drop reusable expertise into .agents/skills/<name>/SKILL.md. The loader maps content types to skills in src/services/skills.ts (e.g. marketing → copywriting, marketing-psychology). Two example skills are included.
src/
index.ts Express server + routes
agent/
contentAgent.ts orchestration
systemPrompt.ts prompt construction
services/
anthropic.ts Claude calls
notion.ts brand knowledge base
skills.ts skills loader
types/index.ts zod schemas + types
brand-context.ts default brand template (swap for your own)
.agents/skills/ reusable copywriting skills
MIT