AI Agent Guide
Understanding, monitoring, and improving PowerMarketing's AI agents.
Agent Overview
PowerMarketing runs eight AI agents. Each agent is triggered differently and produces a specific output.
| Agent | Primary trigger | What it does | Output |
|---|---|---|---|
| ContentDispatcher | Scheduler / manual | Reads calendar, generates content, routes to Track 1 or 2 | Posts + decisions |
| ContentCreator | Dispatcher / Create page / manual | Writes post content for one platform | Post content |
| ContentRepurposer | Manual | Adapts existing post for a new platform | New post |
| EngagementAnalyst | Manual | Analyses performance context and gives recommendations | Text recommendations |
| LeadNurture | Nurture scheduler / manual | Drafts personalised outreach for a lead; when autopilot permits, sends directly within the nurture sequence | Communication draft or sent message |
| VideoCreator | Manual | Writes video script + storyboard | Video record |
| Publisher | Dispatcher (Track 1) / manual | Posts approved content to social platform | Published post |
| Planner | Manual — Insights "Propose plan" or Command Center AI command box | Reads content pillars + audience funnel and proposes a whole-funnel weekly plan (content + newsletter + nurture) as one approvable Decision | Plan Decision |
The Two-Track Pipeline
This is the most important concept in PowerMarketing's automation.
Track 1 — Auto-publish (zero human action)
Calendar Entry → Dispatcher → ContentCreator → Publisher → Live on platform
The brand configures which content types are Track 1 in Settings → Automation → Publication Rules. Default Track 1 eligible types: news, trend_scan, short_post, repurposed.
The user never has to touch Track 1 posts. They appear in the Command Center's overnight summary bar after they've been published.
Track 2 — Approval required
Calendar Entry → Dispatcher → ContentCreator → Decision Inbox → Human approves → Publisher → Live
Used for strategic, high-visibility content. Default Track 2 types: article, post, story, carousel, video, reel, email.
video and email types are always Track 2 — this cannot be changed.
Per-Entry Override
A calendar entry's "Require approval" checkbox forces Track 2 for that entry, regardless of the brand's publication rules. Useful for sensitive topics even in normally auto-published content types.
Fallback Behaviour
If Track 1 auto-publish fails (no credential configured, API error), the post falls back to Track 2 — the post appears in the Decision Inbox instead of being silently dropped. Errors are logged in the agent run record.
Autopilot — Supervision Levels
Every brand has a per-brand autopilot dial that controls how much outward action agents take without a human in the loop. Set it in Command Center → Brand Settings → Autopilot.
Everything waits
All agent outputs land in the Decision Inbox. Nothing is published or sent until a human approves. Best for new brands or tightly controlled campaigns.
Routine auto, strategic waits
Track 1 content and routine nurture steps auto-publish/send. Strategic content (articles, emails, plans) still requires approval. The right balance for most brands.
Fully autonomous
Agents act on all outputs automatically. The system pauses only when a guardrail fires: monthly budget cap reached, complaint-rate spike detected, or required credentials are missing.
Guardrails always apply. Even in auto-guardrails mode, the three pause conditions (budget cap, complaint spike, missing credentials) cannot be disabled. They protect the brand regardless of supervision level.
Earned autonomy (per content type): beyond the dial, individual content types can earn auto-publish grants. The system tracks unedited-approval rates per type; at ≥95% over 20+ reviews it proposes a 🎓 Autonomy Upgrade decision. An approved grant lets that type auto-publish even at Review level — but never at Manual, and never for locked types (video, email) or entries flagged "require approval". See the Feedback Loop.
The ContentDispatcher in Detail
The dispatcher is the orchestration layer. Here is the full execution sequence per calendar entry:
- Fetch brand's
llm_provider,llm_model,api_key,tavily_api_key - For each platform in the entry's
platformsfield:- Create a
postsrow (status =draft) - Call ContentCreatorAgent with appropriate mode (
trend_scanfor news/trend_scan content,product_topicfor everything else) - On success: evaluate
should_auto_publish(content_type, brand, require_approval_override) - Track 1: call PublisherAgent → mark post
published - Track 2: create Decision record (status =
pending) - On LLM failure: log error, leave post as
draft, continue to next platform
- Create a
- Mark
calendar_entries.status = 'dispatched'after processing all platforms
A single LLM failure does not abort the entire dispatch run. Each platform is processed independently.
Generation Modes
ContentCreator supports three modes:
| Mode | Best for | What the AI does |
|---|---|---|
product_topic | Articles, thought leadership | Writes from brand perspective using brand voice, pillars, messaging |
trend_scan | News, industry updates | Fetches live web content (Tavily), connects trends to brand story |
competitor_signal | Positioning content | Differentiates brand against specific competitors |
The mode is auto-selected by the dispatcher based on content type. When generating manually on the Create page, the user selects mode explicitly.
Nurture Automation
A nurture sequence is an ordered list of steps. Each step defines a delay, a delivery channel, and an AI prompt used to personalise the message for the lead.
How the scheduler processes a due step
Each step in a sequence carries:
- Delay — time to wait after the previous step (or enrolment for step 1), e.g.
2d,1w - Channel —
email,linkedin_dm, orsms - AI prompt — the instruction passed to LeadNurture for this step; can reference merge fields like
{{lead.first_name}}or{{lead.company}}
Tip: Keep early-sequence steps short and informational (autopilot-friendly), and reserve longer, high-stakes messages for later steps where human review is natural.
Feedback Loop
The agents learn from three signals — what performed, what you edited, and why you rejected:
- Performance: a nightly job fetches real engagement metrics (likes, comments, shares) for published posts and computes an engagement score. The Planner's prompt includes the brand's recent top performers ("lean into what works"), the recycler re-queues proven winners, and the auto dispatch mode learns the best posting hour.
- Edits: when a reviewer changes a post's content before approving, the pending decision is flagged
edited. Content types you consistently approve unedited (≥95% over 20+ reviews) earn an 🎓 auto-publish grant proposal — human review shrinks to the types that still need it. - Rejections: every rejection captures a reason code that feeds the Insights page.
| Reason code | Meaning |
|---|---|
off_brand | Tone, language, or positioning doesn't match the brand |
inaccurate | Facts, claims, or figures are wrong or unverifiable |
wrong_format | Structure, length, or platform conventions are off |
weak_cta | Call to action is unclear, missing, or low-impact |
other | Free-text note required |
What Insights does with this data:
- Shows a rejection summary chart broken down by reason code and agent
- Surfaces AI-generated prompt-tweak suggestions — e.g. "Your
off_brandrejection rate on LinkedIn is 40%; consider adding a tone constraint to your platform_linkedin prompt" - Allows one-click navigation from the suggestion directly to Settings → Prompts
Reason codes accumulate over time. The feedback signal becomes most useful after ~10 rejections per agent — earlier data is shown but suggestions are marked as low-confidence.
Agent Prompts — Customisation
Every agent uses a system prompt. These can be overridden per-brand in Settings → Prompts.
Available customisations:
system— the agent's core instruction setplatform_linkedin— LinkedIn-specific style instructionsplatform_twitter— Twitter/X style instructions- (and other platform keys)
Leave a prompt blank to use the platform default. Changes take effect immediately on the next generation. This is the most powerful quality lever after brand voice.
Improving Output Quality
Quality improvements in order of impact:
- Brand Voice — most impactful. Must be 80+ chars. Should describe tone, what to avoid, and style examples. Use AI Assist (✦ AI Assist button) to generate it from structured questions.
- Content Pillars — clear, simple topic names (use the pill UI, not JSON). AI rotates through these.
- Owner Voice Descriptions — if calendar entries use owners, rich voice descriptions produce more personalised content.
- Agent Prompts — platform-specific style overrides in Settings → Prompts.
- Calendar Entry Notes — the Notes field maps to the
objectiveparameter. Use it to give the AI extra context. - Key Points — when creating manually, the "Key Points" field forces specific claims into the output.
- Feedback Loop — reject with a reason code. Insights will suggest prompt tweaks based on patterns.
Monitoring Agents
| Where | What you see |
|---|---|
| Command Center — overnight summary | Count of Track 1 posts auto-published since last visit |
| Command Center — Decision Inbox | Pending Track 2 posts awaiting approval |
| Command Center — Recent Activity | Last 8 agent runs with status |
| Log page (/log.html) | All agent runs: status, tokens, duration, errors |
| Insights — Rejection Summary | Rejection reason codes by agent; AI prompt-tweak suggestions |
A failed Track 1 post always appears in the Decision Inbox — content is never silently lost.
Web Search (Tavily)
Tavily powers the trend_scan generation mode and the Trend Research panel on the Create page.
Setup:
- Add Tavily API key in Settings → API Keys
- Enable Web Search in Settings → Automation
When enabled, ContentCreator fetches up to 5 live articles on the topic before writing. The fetched content is passed as trend_context to the LLM, grounding the output in current industry events.
If Tavily is disabled or the key is missing, trend_scan mode still runs but generates content from brand knowledge only (no live data).
LLM Configuration
| Setting | Where |
|---|---|
| Provider (Claude / DeepSeek / Moonshot) | Settings → Brand Profile → AI Provider |
| Default model for this brand | Settings → Brand Profile → model dropdown |
| API key for the provider | Settings → API Keys |
| Global model registry | Settings → LLM Models |
| Connection test | Settings → Brand Profile → Test Connection button |
The LLM Models registry is global (shared across all brands). Add new models there once; all brands can then select them.
Supported providers:
- Claude (Anthropic): claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5 (and future releases)
- DeepSeek: deepseek-chat, deepseek-reasoner
- Moonshot/Kimi: moonshot-v1-8k, moonshot-v1-32k, moonshot-v1-128k
Cost Control — Optional LLM Gateway
For brands running high message volumes, PowerMarketing can route all agent LLM calls through a LiteLLM gateway instead of calling provider APIs directly. The gateway enforces per-brand monthly budget caps and automatically selects a model tier based on the task's stakes.
Model tiers
| Tier | Models | Used for | Cost profile |
|---|---|---|---|
| local | Ollama open-weight (e.g. Llama 3, Mistral) | High-volume, low-stakes: nurture drafts, short posts, repurposed content | Near-zero (self-hosted) |
| mid | DeepSeek · Moonshot/Kimi | Default for most content generation tasks | Low–medium |
| frontier | Claude (Opus / Sonnet) | High-stakes or escalation: strategic articles, Planner decisions, competitor analysis | Higher; gated by budget cap |
Budget cap & fallback
Set a per-brand monthly budget (USD) in Settings → LLM Gateway. When spend reaches the cap:
- Frontier-tier calls are blocked and the task is queued as a Decision for the next billing period.
- Mid- and local-tier calls continue normally.
- An alert fires in the Command Center.
Gateway off = direct keys. When the LiteLLM gateway is disabled (the default), each brand uses its own provider API key configured in Settings → API Keys. The gateway is purely optional and additive — disabling it has no effect on normal operation.