I am calling /v1/threads/runs from an automation workflow. Each call creates a brand new thread with a single user message containing clip_type, variant_number, and topic. The assistant has a knowledge base attached via vector store. The problem: when the same topic is requested across separate thread calls with different variant numbers, the assistant regenerates identical or near-identical prompts. I need strict non-repetition across all calls for a given topic. My current approach creates a new thread per run with no prior context passed. Questions: 1) Should I maintain a persistent thread per topic and keep appending to it, or is passing a compact list of prior prompt summaries in each new thread’s user message more reliable? 2) Is the Agents SDK state store the right tool here, or is application-side persistence with explicit prior-output context in every request the better pattern? 3) What is the most reliable architecture for guaranteed non-repetition across stateless thread calls to the same assistant? Stack: automation workflow calling /v1/threads/runs directly via HTTP, no SDK currently, outputs are structured JSON video prompts.
Hi @Mr.Smartypants, each new thread is stateless, so the model cannot know what it generated previously.
For reliable non-repetition, store prior outputs in your application, pass relevant exclusions with each request, and check new outputs for exact or semantic similarity before accepting them. A persistent conversation can provide context, but it cannot guarantee uniqueness.
Please also note that the Assistants API has been retired. We recommend migrating to the Responses API and using the Conversations API for persistent state.
~ Smith