Skip to content
Pine Computer Request access
Menu

11 / 26 Research and reports · Example

Write a daily briefing

Each team’s briefing is ready before they arrive, and an editor picks which paid stories go in.

Illustration of an example: in your briefing app, this morning’s energy policy briefing writes itself with only what’s new since yesterday’s, a link for every story and what’s new marked. The stories are read on a live screen beside it. A subscriber story from The Grid Ledger waits for the editor, who shares it from the screen and hands it back. A story already in yesterday’s briefing is left out. It arrives in Word and as a PDF.
Who it’s for
News-monitoring software whose users spend the start of every day reading the same sources.
Why it’s hard
Most of what the sources say each morning was already in yesterday’s briefing. The Grid Ledger lets the team share only so many articles a month, and the editor chooses which.
You get back
  • This morning’s briefing, in Word and as a PDF
  • A link for every story, with what’s new marked
How it runs, in your product’s code

At seven, a computer opens each source on the list in its own tab, with yesterday’s briefing as a file, and keeps only what’s new. Free stories go in with a link. Each subscriber story from The Grid Ledger waits for the editor, who shares the ones worth a place from the live screen.

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  Brief the policy team on what’s new in their sources since  yesterday’s briefing, with a link for every story.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.