OpenAssistantAPI

Dispatch cart & execution

How Prime plans, stages, and executes real-world actions with deterministic human review.

The grocery store problem

Imagine asking your assistant to "handle my inbox, book a meeting with Sarah, and send the Q2 report to the team." An AI that just does all that immediately is terrifying. What if it sends the wrong version of the report? What if it books the meeting at the wrong time?

The dispatch cart solves this. Prime shops on your behalf — adding items to the cart as it plans — and then presents the cart for your review before anything actually happens. Just like a grocery store: you browse, you add, you review, you check out. Nothing leaves the store until you pay.

How it works

During a task, Prime calls create_dispatch_cart and then add_dispatch for each action it wants to take. The cart is a staging area — nothing is executed yet.

When ready, Prime calls submit_cart. Your application receives a task.feedback_requested webhook event. You surface the cart to the user for review.

The user can:

  • Approve — execute all items as shown
  • Edit — modify an item and re-approve
  • Remove — drop one item and approve the rest
  • Reject — cancel everything with a note, Prime tries again

What goes in a cart

Any action that has real-world consequences. Not thoughts, not searches, not lookups — those happen inline. The cart is for things that send, create, or modify something outside the conversation.

Item typeWhat it does
emailSends an email on behalf of the user
calendar_eventBooks or modifies a calendar event
taskCreates a new sub-task
fileCreates or updates a file
reminderSets a reminder
replyReplies to an inbound message
rescheduleReschedules an existing event

The cart is a contract

When you approve a cart, you're not just saying "go." You're signing off on the exact text of every email, the exact time of every calendar event, the exact recipient of every message. Prime shows you each dispatch verbatim before executing.

This matters. It means you can read the email Prime drafted and decide it's slightly too formal. You can check the meeting time and realize it conflicts with something you know about but Prime doesn't. The cart turns Prime from an autonomous agent into a collaborative one — it does the research, drafting, and planning. You own the output.

Execution is deterministic

Once you approve, execution is fully deterministic. The dispatch executor reads the cart items, routes each one to the appropriate service, and executes them in order. No LLM is involved. No interpretation. The email that goes out is exactly the email you approved — word for word.

This is the guarantee: between approval and execution, nothing changes.

Approve via API

# Approve the pending cart
curl https://app.openassistant.us/api/tasks/<taskId>/cart/approve \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]"

# Reject with a note
curl https://app.openassistant.us/api/tasks/<taskId>/cart/reject \
  -X POST \
  -H "Authorization: Bearer ak_live_..." \
  -H "X-User-Email: [email protected]" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Wrong time — try Thursday instead." }'

After approval, the task's status returns to executing while the cart processes, then moves to completed when done.

What happens after checkout

After the cart executes, Prime writes an activity entry back to the task. You can see exactly what was sent, when, and to whom. If the user needs to follow up, the full context is right there.

If the recipient is also on the platform, their assistant receives the dispatch and routes it to a task automatically — two AI assistants coordinating on behalf of two humans, each with full visibility and control.