System Design : Architectural Patterns for Agentic AI based deployments
3 min read

How do we deploy agents in a large organization to deal with scale ? Agentic AI involves autonomous systems acting on their own. They are ultimately powered by models and these models need to be updated as well. In addition to doing their work they also need to ensure they adhere to AI safety rules.
Agents can be seen as microservices as well. But they are much less formal in their behaviour than well defined microservices. Also, microservices are mostly synchronous. Agentic AI is asynchronous.
Agent 1 here spends its own time executing the commands and achieving the objective and eventually returns an output. Agent is actually a model that creates a plan and hands it over to another system to execute the plan. Agents themselves don’t have a notion of state.
PRA Loop
Perceive - Reason - Act Loop is how most agents work today. Perceive step involves the agent using all its sensors to gather as much information as it can about the “current state”. Based on that current state it creates a reasoning chain of what needs to be done and a rough plan of goal and sub-goals. Once that is done it determines the “next action”. Then performs that next action. However the results of this “next action” might change the state of the world which the agent needs to factor in. So it executes the PRA steps again. This goes on until the Agent has determined that the goal has been achieved and it is time to stop.
Let us take an example:
A customer opens their banking app and decides to chat the with AI chatbot. The chatbot knows the customerId. It can fetch all the accounts and recent communication sent to customer. The chatbot knows in advance that that customer’s account was recently blocked due to suspected fraud. This is the perceive state. In the reasoning the bot might reason that the customer is contacting to unblock the account. In the act stage the chatbot might want to ask the customer "Are you here to unblock your account ending in 0000?”
If the customer says yes, the bot then updates its internal understanding of the state (Perceive) and then reasons what next step it should take. The next step could be to verify certain transactions on the account to decide if the transactions were indeed fraudulent.
For an Agent to work correctly it needs this external information too such as user’s recent transactions. This is achieved using another archiecture.
Augmented Language Model
ALM or Augmented Language Model is the model that can call external tools. The model knows that it needs to call an external REST api to get user’s last 5 transactions. To achieve this, another Tool Manager works closely with the LLM to generate proper prompts.
For example the LLM might generate placeholder tokens that the tool manager and translates with returned response of the tool.
Conclusion
PRA loop forms the basis of the Agentic AI. In our future post we will discuss how an agent fits into a larger software system.