# Introducing the SOP-driven LLM agent frameworks

[Grab](https://yomu.fyi/company/grab) · Fujiao Liu · Apr 25, 2025

## Summary

Standard operating procedure (SOP) driven Large Language Model agent frameworks address common generative AI challenges such as hallucinations, non-standard output formats, and branching navigation errors. Workflows are represented as hierarchical trees where nodes encapsulate actions or decision points that can be created using a visual editor and annotated with explicit external function calls. Execution relies on a tripartite architecture consisting of a Depth-First Search planner module with backtracking, an adaptive worker agent that limits API exposure and compresses context, and a multilingual user agent. Supporting tools include a Graph Retrieval-Augmented Generation pipeline, a plugin system integrating Python and SQL, and a state stack for pausing workflows during human intervention. In production deployments for fraud and account takeover investigations, the framework automated up to 87% of cases while cutting handling times substantially.

## Takeaways

- The framework navigates SOP trees using a Depth-First Search planner module that generates step-by-step prompts and executes backtracking.
- Hallucinations and inefficiencies are mitigated by strategically limiting accessible API tools and applying context compression to worker agents.
- Human-in-the-loop workflows are managed through a state stack that allows processes to be paused and resumed seamlessly without losing execution state.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [LLMs](https://yomu.fyi/topic/llm), [Machine Learning](https://yomu.fyi/topic/machine-learning), [Python](https://yomu.fyi/topic/python), [Reliability](https://yomu.fyi/topic/reliability)

[Read original post](https://engineering.grab.com/introducing-the-sop-drive-llm-agent-framework)
