Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Writing an Agent Loop from Scratch: Plan, Tool Call, Observation and Stop Condition
We write an agent loop in C# without a framework: returning tool results and errors to the model, step/token/time budgets, blocking repeated calls and tracing every step. A real run shows tokens piling up turn by turn; then we do the same job with FunctionInvokingChatClient and MAF's ChatClientAgent and compare what each layer abstracts away.
What Is an AI Agent? Workflows, Agents and Deciding You Don't Need One
An agent is a system where the model directs the control flow; in a workflow, code draws the path. We run three Bookstore scenarios (order status, a return, find a book and add it to the cart) on the same code with qwen3:4b, measure model calls, tokens and time, and derive the price of an agent and the criteria for deciding you don't need one.
The Evolution of LLM APIs: From Completions to Tool Calling, Structured Outputs and MCP
The evolution of LLM APIs with verified dates, from the first text-continuing API to the chat format, from function calling to JSON mode and structured outputs, from reasoning parameters to the Model Context Protocol and agents. We see which example in the series each step maps to, and at the end of the series we build a bridge to the next AI series.