Using chat history instead of Run history

Hey guys,

I’m using Agno for a chatbot, so the proper way to do it is not multiple runs but 1 run with system,user,assist,user,assist…
when you use Run history it includes in the next run all the intermediate messages inside the run which is not relevant for the next message the user will send and create a huge context and more confusion, but I still continuity between messages…

any one encounter it? I’m thinking about pulling out the messages from the DB my self in order to acheive that - System → User → Run (last) Response → User → so on so on… without messages in the middle so it will use only the chat messages

Hey @uriafranko
thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.
If it’s urgent, please let us know. We appreciate your patience!

@Monali it’s pretty urgent, the Agents are not that relevant for chat bots in the current implementation - all the intermediate steps inside of a run are just confusing the Agent on the next run and making the context just way too big without a reason

Hi @uriafranko did you try setting num_history_runs on the Agent?
image

Can you tell me if this helps, see more reference here- Agent - Agno

Hey @kausmos
I did use it, the thing is I want all user/assistant history, but I do not want all the tool calls and the internal messages each run have.

So I want each new run to start with System->User->Assistant(just the content)->User->Assistant(just the content) without tool calls and internal communication of the agent

1 Like

I see @uriafranko we have a new WIP feature chat_history which really is just the chat history. What you would print in a chatgpt-like UI. But it is part of a 2.0 refactor code, it won’t reach the release line for a bit. What you can do right now is build that chat history yourself using the messages in the runs, as you suspect