Writing
Briefs
Drafts
Review
Blank pages are expensive. Teams already know the audience and the points — they need a first draft that follows the brief. A Content Writer Agent turns structured inputs into editable markdown, then optionally reviews itself against the original constraints.
Success looks like a draft with a title, scannable sections, the required points covered, and a short checklist of claims or links a human still needs to verify.
Paste into Claude, Codex, Cursor, or another coding agent to scaffold this harness.
# Context: Vidbyte SDK Vidbyte SDK is a Python package (import as `vidbyte`) for building agent workflows yourself. Use it when you want to own the agent loop: system prompts, model/provider choice, tools, managed context, middleware, pipelines, tracing, evals, and multi-agent composition. Core mental model: 1. Create an Agent or BaseAgent. 2. Attach a system prompt, provider/model, optional tools, context, middleware, and runtime choices. 3. Call run() or arun(). 4. Let the SDK handle message assembly, tool schemas/calls, iteration limits, and optional pipelines. Public package boundary: reusable local agent infrastructure. It does not ship private Vidbyte learning models or proprietary platform internals. GitHub: https://github.com/cerredz/Vidbyte-SDK Install: pip install vidbyte-sdk Verify: python -c "from vidbyte import Agent, BaseAgent, tool; print(Agent, BaseAgent, callable(tool))" # Install Primary: ```bash pip install vidbyte-sdk ``` From a checkout (pre-release / local development): ```bash git clone https://github.com/cerredz/Vidbyte-SDK.git cd Vidbyte-SDK pip install -e . ``` # Task: Build a Content Writer Agent Build a Vidbyte SDK content writer that turns a short brief into a draft post, email, or marketing page. Scenario: A marketer provides audience, goal, tone, and key points. The agent produces a structured draft the human can edit — not a vague wall of text. The harness should: - Accept a structured brief (audience, goal, format, must-include points, length) - Produce markdown with a clear title and sections - Respect tone and length constraints - Optionally run a self-review pass that checks against the brief - Return the draft plus a short checklist of what the human should still verify Constraints: - Use Agent or a small multi-step review loop - Respect format and length from the brief - Do not invent product claims not present in the brief - Output markdown suitable for human editing # Deliverable Produce a small, runnable Python harness that uses the Vidbyte SDK (`vidbyte` package) to implement this agent. Prefer clear modules, a main entrypoint, and short comments that explain the control flow. Do not invent private Vidbyte backend APIs.
Anchor the system prompt on the brief. The agent should treat missing product facts as gaps, not opportunities to invent.
from vidbyte import Agent
writer = Agent(
name="content-writer",
system_prompt=(
"You write marketing and product drafts from a brief. "
"Follow audience, tone, format, and length. "
"Do not invent product claims missing from the brief. "
"Return markdown ready for human edit."
),
provider="openai",
model_name="gpt-4.1",
)Structured briefs beat freeform prompts. Pass the same fields every time so outputs stay comparable.
brief = {
"format": "blog post",
"audience": "developers evaluating agent frameworks",
"goal": "explain why a controllable agent loop matters",
"tone": "clear, practical, non-hype",
"length": "600-800 words",
"must_include": [
"tools and verification",
"difference from single-shot chat",
"one concrete example",
],
"must_avoid": ["fake customer logos", "unverified benchmarks"],
}Serialize the brief into the user message. Ask for title, body, and a verification checklist for the human editor.
prompt = f"""
Write a {brief['format']} for {brief['audience']}.
Goal: {brief['goal']}
Tone: {brief['tone']}
Length: {brief['length']}
Must include: {', '.join(brief['must_include'])}
Must avoid: {', '.join(brief['must_avoid'])}
Return:
# Title
## Draft
## Editor checklist
"""
draft = await writer.arun(prompt)
print(draft.content)A second agent (or second call) that only checks the draft against the brief catches missed points without rewriting everything blindly.
from vidbyte import BaseAgent
reviewer = BaseAgent(
name="brief-reviewer",
system_prompt=(
"Compare the draft to the brief. "
"List missing must-include points, tone mismatches, "
"and invented claims. Suggest minimal fixes."
),
provider="openai",
model_name="gpt-4.1",
)
review = await reviewer.arun(
f"Brief: {brief}\n\nDraft:\n{draft.content}"
)
print(review.content)Wrap draft + optional review in a single function or CLI so writers can reuse the same pipeline every week.
async def write_from_brief(brief: dict) -> dict:
draft = await writer.arun(format_brief(brief))
review = await reviewer.arun(
f"Brief: {brief}\n\nDraft:\n{draft.content}"
)
return {"draft": draft.content, "review": review.content}