---
title: Draft Marketing Content on a Schedule (public)
description: Run a weekly agent that researches a topic with Action Gateway web search, drafts copy in your brand voice using an inline skill, and commits it to a …
product: Managed Agents
url: https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/examples/draft-marketing-content/
last_updated: "2026-10-01"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# Draft Marketing Content on a Schedule (public)

DigitalOcean Harness Runtime provides managed, hardware-isolated microVM sandboxes with built-in tools such as Chromium to run harnesses and execute arbitrary code. Rich lifecycle APIs preserve conversational history and working state across sessions, letting you pause, resume, and fork work to control costs and adapt to the nonlinear nature of agentic workflows. Scale complete agents such as Claude Code or use sandboxes independently for code execution, all through the same service. See [What You Can Build](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/details/what-you-can-build/index.html.md) for example use cases.

Agents on Harness Runtime are not limited to code. The adapters are coding agents, but a coding agent is good at reading a brief, researching, writing files, and committing them, which is most of a content pipeline.

This example runs weekly: the agent researches a topic with web search, drafts a post in your brand voice, and commits it to a content repository as a branch for a human to review. It introduces two things the earlier examples do not use: inline skills, and tools from Action Gateway.

## Teach the Agent Your Voice With a Skill

A skill is instructions the agent loads when it decides they are relevant. The `description` is what it reads when deciding, so write it as “Use when …” and make it specific. A vague description means the skill is loaded at the wrong times or not at all.

Skills are declared inline in the spec, so a brand voice guide travels with the environment instead of living in a prompt someone has to remember to paste.

## Environment Spec

Save the following as `content-drafts.yaml`:

```yaml
name: weekly-content-draft
agent: claude-code
size: mars-2vcpu-4gb
repos:
  - your-org/content
env:
  HARNESS_INFERENCE_MODEL: anthropic-claude-5-sonnet
secrets:
  HARNESS_INFERENCE_API_KEY: ${HARNESS_INFERENCE_API_KEY}
  GITHUB_TOKEN: ${GITHUB_TOKEN}
egress:
  - github.com
  - api.github.com
tools:
  - do.actions: [exa_web_search, exa_web_fetch]
skills:
  - name: brand-voice
    description: "Use when drafting or editing any customer-facing copy, including blog posts, release announcements, and social copy."
    instructions: |
      # Brand Voice

      Write for a working practitioner who is short on time.

      - Lead with what changed and who it affects.
      - Prefer concrete nouns over category words. "Postgres" beats "data layer".
      - No exclamation marks, no rhetorical questions, no "in today's world".
      - Claims about performance or cost need a number or they get cut.
      - British and American spellings both appear in our archive. Use American.
permissions:
  default: allow
  rules:
    - tool: bash
      match: { command: "rm -rf *" }
      action: deny
```

Note what is not in `egress`. Action Gateway catalog tools reach their providers over platform-managed networking, so `exa_web_search` works without an egress entry. Only hosts the sandbox itself connects to need listing, which is why `github.com` is there.

## Create the Schedule

Create a cron trigger that fires every Monday morning:

```shell
doctl harness-runtime triggers create \
  --kind cron \
  --name weekly-content-draft \
  --session-mode fresh \
  --spec content-drafts.yaml \
  --prompt "Clone your-org/content. Research what changed in managed Postgres offerings over the past week, then draft one 600-word post about it. Commit the draft to a new branch named drafts/<date> and push it." \
  --cron-expr "0 9 * * 1" \
  --timezone America/New_York \
  --output-mode email \
  --output-email <your-email-address>
```

The agent pushes a branch rather than publishing. A human opens the pull request, edits, and merges. Keeping the last step human is the difference between a useful drafting agent and a publishing pipeline nobody reviews.

**Note**:

  Exa web search and web fetch carry per-call charges on top of the standard Action Gateway tool-call rate, and they require prepayment. When all your balances are empty, the gateway blocks calls to those tools. See [Action Gateway Pricing](https://docs.digitalocean.com/products/managed-agents/action-gateway/details/pricing/index.html.md) and [Manage Prepayment](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/manage-ag-prepayment/index.html.md).

## Adapt It

| To do this | Change this |
|---|---|
| Draft with a different model | Change `HARNESS_INFERENCE_MODEL` to another ID from [Available Models](https://docs.digitalocean.com/products/inference/details/models/index.html.md). Writing quality varies more between models than most agent tasks, so this is worth testing on one run before you schedule it. |
| Add more voice or format rules | Extend the `instructions` block, or add a second skill with its own `description`. A spec accepts up to 32 skills, capped at 32 KiB each. |
| Draft from a brief instead of a topic | Keep the brief in the content repository and point the prompt at its path. |
| Give the agent other tools | Add slugs to the `do.actions` list, or reference a versioned [Toolbelt](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/create-toolbelts/index.html.md) with `toolbelt:<name>@<version>`. |
| Restrict which tools it may call | Add server-qualified rules such as `tool: do.actions/exa_web_search` to `permissions`. |
| Deliver to Slack instead of email | Use `--output-mode slack` with `--output-slack-webhook`. |
| Run it once to test before scheduling | Launch the spec interactively with `doctl harness-runtime launch --spec content-drafts.yaml --prompt "..."` and watch what it does. |

## Related

- [Connect Action Gateway to Harness Runtime](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/connect-action-gateway/index.html.md) for attaching and scoping tools.
- [Environment Spec Reference](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/reference/environment-spec/index.html.md#skills) for every field a skill accepts.
- [Run Agents With Triggers](https://docs.digitalocean.com/products/managed-agents/agent-harness-runtime/how-to/run-agents-with-triggers/index.html.md) for schedules, payload placeholders, and execution history.