Skip to content
Pine Computer Request access
Menu

23 / 26 Sales and marketing · Example

Draft content from research

A writer approves the sources first, then gets a draft guide in Word with each claim cited.

Illustration of an example: your content software hands Pine Computer the brief for a guide to cutting food waste in small restaurants. It reads the Food Statistics Office’s figures for restaurants and cafés and the surveys around them, keeping each claim with its page. The writer approves the source list on the live screen before a word is drafted. Then the guide is written in Word, each source cited where it’s used, and a claim it couldn’t source is highlighted for the writer to cut.
Who it’s for
Content-marketing software whose users publish research-backed guides under their own bylines.
Why it’s hard
A figure without a source can’t go in a guide with the writer’s name on it. Whether a source is fit to cite in public is the writer’s call.
You get back
  • A draft guide, as a Word document
  • The approved sources, cited where they’re used
How it runs, in your product’s code

The computer reads the Food Statistics Office’s figures for restaurants and cafés, and the surveys around them, keeping each claim with its page. Before a word is drafted, the writer gets the source list on the live screen and approves it. The guide is then written in Word, following the style guide your product handed over. Any claim it couldn’t source is highlighted for the writer to cut.

Ruby · task-turn excerpt
# Existing backend Computer and session; see setup docs.# saved_message_id is your durable ID for this request.computer.require_agent_protocol!agent = session.agentgoal = <<~JOB  Draft a guide to cutting food waste for small restaurants,  with a source for every claim.JOBturn = agent.run(goal, idempotency_key: saved_message_id)# Persist turn.turn_id before waiting or leaving this process.turn = agent.wait(turn_id: turn.turn_id, timeout: 30)case turn.statewhen "running", "canceling"  # Schedule another wait for this turn ID.when "needs_input"  # Present turn.question; authorize any desktop handoff.  # When the user replies, answer this turn and save the new ID:  # agent.answer(turn_id: turn.turn_id, answer: reply.text)when "answered"  # Continue with turn.next_turn_id; do not resubmit the goal.when "completed"  turn.result.artifacts.each do |file|    bytes = session.read_file(file.fetch("relative_path"))    # Save bytes in your own file store before stopping.  end  # Verify the outputs and external state against the request.when "failed", "canceled"  # Record the outcome; check side effects before any retry.end

Requires a configured Computer, session and durable request ID. The comments mark application logic you supply; this excerpt does not implement storage, polling or human handoff. Agent integration · Saving outputs

Build more.
Hand AI the work.