Skip to content
Pine Computer Request access
Menu

07 / 26 Research and reports · Example

Research a market

An analyst names a market and gets a report that ties every figure to its source.

Illustration of an example: in your analyst’s research software, a market report on commercial heat pumps in Northern Europe writes itself. Each figure carries the number of its source, and the sources are read on a live screen beside it. Larkfield shows full reports only to subscribers, so the analyst signs in on the screen and hands it back. Where the trade body and Larkfield size the market differently, the report gives both, each with its source. It arrives in Word and as a PDF, with a spreadsheet of the figures.
Who it’s for
Market-research software whose analysts build each report from a paid database and the open web.
Why it’s hard
The forecasts worth citing are in Larkfield, a database the team pays for. Trade bodies and forecasters disagree on the market’s size, so the report has to say who said what.
You get back
  • The report, in Word and as a PDF
  • A spreadsheet of the figures, each with the page it came from
How it runs, in your product’s code

Pine’s AI starts with trade bodies and installers’ sites, noting the page behind each figure. Larkfield shows full reports only to subscribers, so the analyst signs in with the team’s account on the live screen. With the analyst signed in, it reads the heat pump outlook too. Where two sources size the market differently, the report gives both.

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  Research the commercial heat pump market in Northern Europe.  Write a sourced report, with the figures in a spreadsheet.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.