Using the deployed agent
You have deployed something. Now you use it, and using it is where the runtime vocabulary from lesson one stops being nouns on a page and starts being calls you make in order.
The order of operations
The shape of a conversation with a deployed agent is always the same. There is a thread, which is the state your conversation lives in. There is an assistant, which is the configuration deciding how the agent behaves, and you already have one because every graph gets a default. And there is a run, which is the thing you actually start: it takes that assistant configuration, applies it to that thread, and advances the thread’s checkpoint.
The first message creates or names a thread. Every message after that references the same thread, which is how the agent knows what you were talking about. That is the whole trick, and it is why “which identifier do I carry forward” is a real question with a boring answer.
Four statuses, and only four
A thread is always in exactly one of four states:
idle: nothing is running against itbusy: a run is in flightinterrupted: execution paused, waiting to be resumederror: a run failed
The escape hatch: stateless runs
Not every call wants a conversation. The API separates Thread Runs from Stateless Runs, and that separation is the entire persistence question expressed as two groups of endpoints.
A thread run attaches to a thread and advances its checkpoint. A stateless run does not: no thread, no checkpoint, no history. You get the answer and none of the bookkeeping. Useful for one-shot classification or enrichment, useless for anything that has to remember.
When the user will not stop typing
The run starts. The user, being a human being, immediately sends another message. There are four documented strategies:
| Strategy | In-flight run | Already-done work |
|---|---|---|
| enqueue | finishes | kept, new input runs after |
| reject | finishes | kept, new input refused |
| interrupt | stopped | kept |
| rollback | stopped | discarded |
Learn it as that table rather than as four loose names, because the discriminating column is the third one. enqueue and reject both let the run finish and differ on the new input. interrupt and rollback both stop it and differ on the partial work. That second pair is the one most likely to be tested against itself, because the names sound like near-synonyms and are not.
The parameter you pass them under
The parameter is multitask_strategy, and the name carries a hint worth keeping: the platform’s word for double-texting is multitask, so if you are searching the docs for “double texting” and finding nothing, search for that instead.
The casing follows the usual split, and both forms are worth recognising:
// TypeScript SDK: camelCase on the client
await client.runs.create(threadId, assistantId, {
input,
multitaskStrategy: "interrupt",
});
// The HTTP API and the Python SDK: snake_case on the wire
// { "multitask_strategy": "interrupt" }An option that offers something like on_conflict or concurrency_mode is built out of adjacent-sounding config vocabulary. on_conflict in particular is real, but it belongs to creating threads and assistants ("raise" or "do_nothing"), not to concurrent runs, which makes it the most convincing wrong answer available.
Try it yourself
The four thread statuses
There are exactly four. Not three, not five. The count is as examinable as the names.
Name all four thread statuses and describe what each one indicates.
Reveal answer
idle, busy, interrupted, and error. idle means no run is currently working on the thread. busy means a run is in flight. interrupted means execution paused, which is the human-in-the-loop case waiting to be resumed. error means a run against the thread failed. Learn the count as well as the names, because an option list offering a fifth plausible status such as completed or pending is exactly the shape of a distractor.
What you give up with a stateless run
You call the stateless runs endpoints rather than the thread runs endpoints. What have you traded away?
Show answer
Correct answer: B — The thread, and therefore the checkpoint and the history that come with it
A stateless run does not attach to a thread, so there is no checkpoint being advanced and no history accumulating. You get the agent's answer and none of the bookkeeping. The tempting wrong answer is the authorization one, because stateless sounds like it is skipping infrastructure generally and it is easy to extend that intuition one box too far: auth is a property of the request reaching the server, not of whether the run persists. The billing option is the shape of a distractor that concedes the split is real while denying it means anything.
Which double-texting strategy throws work away
The user sends a second message while a run is still going. Two of the four strategies abandon the in-flight run. Only one of those two discards what it had already produced.
Show answer
Correct answer: D — rollback
rollback discards the in-flight run and the work it had already done, then starts on the new input. The tempting wrong answer is interrupt, because both interrupt and rollback stop the current run, which makes them feel interchangeable. The difference is what happens to the partial work: interrupt keeps it, rollback throws it away. enqueue and reject are easier to eliminate, since neither one stops the running work at all.
The four double-texting strategies
Learn these as a table with three columns, because the question that gets asked is always a discrimination question.
Name the four double-texting strategies and say what each does with the in-flight run and with the new input.
Reveal answer
enqueue lets the current run finish and queues the new input to run after it, keeping both. reject lets the current run finish and refuses the new input. interrupt stops the current run where it is and starts handling the new input, keeping the partial work already done. rollback discards the current run and its work, then starts on the new input. The pairing to hold: enqueue and reject both let the run finish and differ on whether the new input survives; interrupt and rollback both stop the run and differ on whether the partial work survives. You pass them under multitask_strategy (multitaskStrategy in the TypeScript SDK), and the platform's own word for double-texting being multitask is the reason that name is worth memorising rather than reasoning out.
Trace one turn on paper
No server needed. This is the drill that makes the run-thread-assistant triangle stop being abstract.
- Write down the sequence for a first message to a brand new conversation: which object gets created first, what identifier comes back, and what you pass on the next call.
- Annotate the thread status at each moment in that sequence, using only the four legal values.
- Now add a human-in-the-loop pause partway through and say which status the thread sits in while it waits.
- Finally, add a second user message arriving during the run, and write down which of the four strategies you would choose and what happens to the partial work under each of the other three.