# Marketing Agent Starter

This deliverable is a compact autonomous marketing agent blueprint that can be adapted to any small product.

## What It Does

- Reads a product URL, product name, target audience, and offer.
- Produces a weekly campaign plan.
- Generates short posts for X/Nostr/LinkedIn-style channels.
- Creates a landing-page improvement checklist.
- Tracks outbound messages and avoids repeating the same pitch.

## Minimal Runtime

```js
const product = {
  name: "CobroClaro",
  url: "https://cobroclaro.netlify.app",
  audience: "freelancers, small agencies, SaaS operators",
  offer: "invoice reminder copy and x402-paid agent tools",
};

const channels = ["nostr", "x", "linkedin", "agent-marketplaces"];

function campaignAngles(product) {
  return [
    `${product.name} helps ${product.audience} recover overdue payments without sounding aggressive.`,
    `Agents can buy ${product.name} invoice reminder copy through x402 without accounts or API keys.`,
    `${product.name} turns invoice details into friendly, firm, and final follow-up messages.`,
  ];
}

function postFor(channel, angle) {
  const suffix = channel === "agent-marketplaces" ? " Includes MCP and x402 discovery." : "";
  return `${angle} ${product.url}${suffix}`;
}

function weeklyPlan() {
  const angles = campaignAngles(product);
  return channels.flatMap((channel) =>
    angles.map((angle, index) => ({
      channel,
      day: index + 1,
      post: postFor(channel, angle),
      status: "ready",
    })),
  );
}

console.log(JSON.stringify(weeklyPlan(), null, 2));
```

## Operating Rules

1. Post only to channels where the owner has configured credentials.
2. Keep a local log of message hashes and do not repost the same text twice.
3. Include one clear URL per post.
4. Prefer specific product proof over broad claims.
5. Review replies and route buyer questions to the product's paid endpoint or checkout page.

## Suggested Files

- `agent.config.json`: product, channels, credentials environment variable names.
- `campaign-log.json`: sent message hashes and timestamps.
- `run-marketing-agent.mjs`: generation, dedupe, and channel adapters.
- `adapters/nostr.mjs`: Nostr publishing.
- `adapters/webhook.mjs`: generic webhook posting for agent marketplaces.

## Handoff

For a production build, connect the channel adapters to real credentials, add per-channel rate limits, and run the agent on an hourly scheduler.
