- Issue created by @marcus_johansson
- 🇩🇪Germany marcus_johansson
So here is a general issue, if someone can think of a smart solution.
We need to frontend to know a thread id before its starting to poll an agent, because otherwise you only access this information when the response comes in. Unless you are streaming, this is when the agent is finished, so then this serves no purpose for anyone wanting to poll in realtime.
This means that everytime you send a request to an agent, this has to be included. This means that we need a way to get a cycle_id before you send the agent request, which is not great, but I can't think of another solution.
I'm not sure if cycle_id is the correct id name as well, right now there is basically:
* thread_id - if there is some history from the main caller, you can see this being followed up here. So this could be the session history for the assistant. This needs to be set from the caller.
* cycle_id - the stateless loop from the main caller. This is what needs to be set from the caller.
* caller_id - if the agent is being called from another agent, this will set a unique uuid. Happens automatic in the service.
* agent_runner_id - this is a unique id for the first agent and all sub agents, so you for instance can see when the same sub agent is called twice, with two separate tasks. Happens automatic in the service.So if you are the assistants api, you are in charge of creating and maintaing the thread_id, which you can reuse and getting a cycle_id from the polling service that has to be unique.
Does this make sense?