Deepseek-r1, ollama, has_memory=True, has_reasoning Bug

deep seek-r1 does NOT support tool calls. If you configure your Agent with one or more tools, you will get an error. When you set ‘has_memory=True’, a tool call to update memory is automatically added to the tool call list part way through the process flow causing an undesirable and unnecessary error to be thrown. I suspect that when ‘has_reasoning’ is activated the downstream call is made triggering the error. Two (2) choices: remove the error generation when an LLM without tool calling capability is used (which may trigger other problems), or create two (2) different tool call stacks one that has the original set of tools (in this case None) and the other with the update memory function.

Unfortunately, there are all sorts of additional edge cases that could warrant additional testing. We are creating a layer on top of your framework through which all of our Virtual Agents operate… making support substantially easier. That layer is somewhat generic and is intended to support any LLM and both local and remote processing environments.

Hi @bills, 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!

Hi @bills you are using deepseek-r1 via Ollama?

When you set ‘has_memory=True

I did not understand this. from where did you refer this and in what part of the code are you setting this flag? this is an internal flag and not available user level.

Would you be able to share your Agent config and and give a short example so we may replicate and help better.

Our “has_memory” parameter enables/activates your “enable_user_memories=True”. We automatically set up a PostgreSQL database (either new or re-use). This operation activates your update memory call for use after the LLM transaction is completed. But, any LLM that does not support tool calls (e.g., deep seek-r1) will error off.

Sorry for the confusion…