Daily LinkedIn draft agent, built as a Trigger.dev task. Per project, once a day: drafts a LinkedIn post with an LLM, runs deterministic brand-voice guardrails and a post-quality guard, then posts a Slack card for human-in-the-loop Approve/Deny.
Extracted from bowtiefunnel/agents (formerly
agent/subagents/linkedin/), where it originated and still runs in production.
- Trigger.dev — scheduled task runtime (
daily-linkedin-drafts-scheduled) - OpenRouter — LLM drafting
- Supabase — project list, review cards, audit log, draft memory
- Slack — HITL Approve/Deny review surface
- Langfuse (optional) — LLM call tracing/cost observability
npm install
cp .env.example .env # fill in real keys
npm run typecheck
npm testThis repo is currently unlinked from any Trigger.dev project (extracted for ownership/isolation, not yet cut over from prod). To run it standalone:
- Create a new project in the Trigger.dev dashboard.
- Set
TRIGGER_PROJECT_REF/TRIGGER_SECRET_KEYin.env. npm run dev(local) orset -a; . ./.env; set +a; npm run deploy(prod).
agent/
subagents/linkedin/ the agent: daily-linkedin-drafts.ts, lib (linkedin-memory, post-guard)
connections/ shared clients: openrouter, langfuse, slack, supabase
lib/ shared helpers: blocks (Slack card builder), company-context,
draft-memory, guardrails, trace
schemas.ts shared Zod schemas (Project, AgentPayload)
Relative import depth mirrors the parent repo's agent/ folder exactly, so nothing
was rewritten during extraction.