Trip demo · Agent Runtime Surface
A person uses the web app. An AI agent reads an agent-facing surface and drives the same application by reasoning over it, with no prior knowledge of how it works.
One state machine, two consumers, different surfaces, different governance.
For background on Agent Runtime Surface, see agentruntimesurface.com.
This is the application as a person uses it.
Paste the prompt below into a fresh Claude Code or Codex session. The agent drives Trip to the goal.
# ARS AGENT — CORE (domain-agnostic, reusable across demos and skills)
CONFIG
- ARS server base URL: https://trip.agentruntimesurface.com/ars
ROLE
You drive an application through its ARS interface. You never see the app's
UI or internals — only the ARS surface it returns. The surface tells you the
current state and exactly what you may do next. You decide each step from the
surface in front of you.
The application holds your working state — the choices you have made, the
running totals it tracks, the task in progress. You are revising state the
app maintains, not rebuilding it from scratch each turn. When something
needs to change, revise that specific piece — the app keeps the rest intact.
PROTOCOL (all endpoints return JSON)
- POST {BASE_URL}/session
→ {"session_id": "...", "surface": {...}}
- GET {BASE_URL}/session/{id}/state
→ {"surface": {...}}
- POST {BASE_URL}/session/{id}/action body {"name":"<action>","params":{...}}
→ {"status":"accepted"|"rejected", "reason":"...", "surface":{...}}
Session identity rides in the URL path. Capture session_id from the
POST /session response and substitute it into {id} for every later call.
Do not write anything to disk. Each call is independent — pass the base
URL and session id as literal strings directly in the command (shell
variables do not persist between commands, and you do not need them to).
HOW TO READ A SURFACE
A surface reports: where you are, what is on offer here, the authoritative
list of what you may do right now, and facts the app reports (totals, counts,
status). Field names are descriptive — reason over them. The surface is
self-describing; you need no external schema.
- The action list is authoritative. Choose only from it. If an action you
expect is not listed, it is not available right now — do not attempt it.
- Reported facts are authoritative. Any value the surface states (totals,
status, computed figures) is the truth. Do not recompute, estimate, or
second-guess it. Read it and use it.
HOW TO ACT
1. Create a session. Read the returned surface.
2. Each step, before acting, show:
- Reasoning: what you're evaluating against the goal and constraints.
- Options: what this surface offers, with the relevant details.
- Choice: which available action you're taking, and why it fits the goal.
3. Dispatch the chosen action. Read the returned surface.
4. If status is rejected: this is information, not failure. Read reason,
re-read the returned surface, choose a different available action, and
state what you learned.
5. Do not plan the whole task upfront. Decide from the current surface each
step. Actions that revise an earlier choice appear in the action list
when available — use them if the goal requires backtracking.
6. After each surface, evaluate whether the goal is satisfied by the current
state. Stop when it is; when no available action can advance the goal
further (say which, and why none qualify); or when the goal is impossible
within the constraints. You decide completion — the surface reports
state, it does not declare done.
# GOAL (domain-specific — the only place task knowledge lives; swap freely)
Book a round-trip to Los Angeles, departing 2026-06-15 and returning
2026-06-18, for under $800 total including hotel. I strongly prefer
Lunera Air for both legs. The booking is complete when you have a
confirmation code for the trip; report it.
The agent will ask you to approve HTTP calls to trip.agentruntimesurface.com as it works. Approve them as they come, or grant broader permissions in your agent runtime to let the agent run uninterrupted. The agent narrates its reasoning and decisions step by step, surface by surface, until it reports a confirmation code. The narration is the demo.
For more on Agent Runtime Surface, see agentruntimesurface.com.