Running the Tool Loop Ourselves

Part of the Determesh series. What Determesh talks to the models through Spring AI, but it does not let Spring AI run the tool loop. The model returns tool calls, Determesh runs them one round at a time through Spring AI’s ToolCallingManager, records each step in the thread, and decides whether there is another round. Why A loop you cannot see into cannot be judged The convenient mode of any agent library is: give it tools, give it a prompt, get the final answer. The tool calls happen inside. For a demo that is ideal. For Determesh it hides exactly the things the system needs. ...

October 31, 2026 · 5 min · 854 words · Sagar Nayak

Threads as Postgres Rows, With No Queue Server

Part of the Determesh series. What Every conversation in Determesh, and every piece of work behind it, is a thread. A thread is a row in Postgres with a status. Workers claim runnable rows with SELECT ... FOR UPDATE SKIP LOCKED, run them, and write the result back. There is no message broker and no workflow engine. Postgres is the queue and the record at once. Why The design was already a queue of records The design said threads are loosely tied. A thread waiting on a manager’s approval holds nothing: no process, no timer, no connection. If the manager replies in five years, the thread picks up. A new message from the user reopens a thread that finished. A parent waits for its children, and children can wait for each other. ...

October 25, 2026 · 5 min · 1008 words · Sagar Nayak