An agentic system is software where an LLM decides the next step in a loop: think, call a tool, read the result, repeat. In architecture terms, the agent is just a component that needs clear boundaries, like any other service. Give it a small set of explicit tools, because every extra tool increases the chance of wrong calls and makes behavior harder to test. Always add hard limits such as a maximum number of steps, a timeout, and a budget, so a confused agent cannot run forever. Log every tool call and result as an architecture concern, because this trace is your main way to debug and audit what the agent did.

Simple example: a support agent

Situation: a customer writes „Where is my order 123?“. The goal is that an agent finds the order and sends the customer an email.

How to read the code below: it is short Python-style pseudocode, not a file you run. It only shows the shape of the agent loop. The functions llm.decide, search_orders and send_mail are placeholders for your own code.

MAX_STEPS = 5 # rule 1: hard limit
tools = {"search_orders": search_orders,
"send_mail": send_mail} # rule 2: only these 2 tools exist
for step in range(MAX_STEPS):
action = llm.decide(goal, history, tools.keys()) # LLM picks the next step
if action.name == "finish":
break
result = tools[action.name](**action.args) # run the chosen tool
history.append((action, result)) # rule 3: keep a trace

Kommentar verfassen

I’m Iman

Mein Name ist Iman Dabbaghi. Ich arbeite als Senior Software Engineer in der Schweiz. Außerdem interessiere ich mich sehr für gewaltfreie Kommunikation, Bachata-Tanz und Musik sowie fürs die Persönlichkeitsentwicklung.

Ich habe einen Masterabschluss in Informatik von der Universität Freiburg in Deutschland, bin Spring/Java Certified Professional (OCP), Certified Professional for Software Architecture (CPSA-F) und ein lebenslanger Lernender 🎓.

EN:

My name is Iman Dabbaghi. I work as a Senior Software Engineer in Switzerland. I am also very interessted in nonviolent communication, Bachata dance and music and also for personal development.

I hold a masters degree in computer science from the university of Freiburg in Germany, am a Spring / Java Certified Professional (OCP), Certified Software Architecture (CPSA-F) and Life Long Learner🎓

Let’s connect