LLM Agent State Graph Control for Reliable Task Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing large language model (LLM) agents often suffer from hallucinations and fail to follow deterministic patterns during complex task execution due to inaccurate outputs and lack of real-time external information, leading to misidentification of issues and suboptimal decision-making.

Innovation Solution

A unified framework is provided to control LLM agent behavior using a state graph and optimization principles, where each node represents a distinct state with predefined agent executions, and edges define transitions, allowing for dynamic modification and adaptation based on operational feedback.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If LLM agents rely on generative language models to produce flexible responses, then adaptability and versatility are improved, but hallucination and reliability deteriorate

Engineering Contradiction:
ImproveadaptabilityVSAvoidreliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary control layer between the LLM and the environment, consisting of a state graph and principle-based constraints. The state graph acts as a mediator that routes agent actions through predefined valid transitions, while principles serve as additional mediation constraints that filter and guide the LLM's generated actions. This intermediary structure allows the flexible LLM to operate while its outputs are systematically controlled to prevent hallucinations and ensure reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the control parameters of the LLM by introducing external constraints through principles and state graphs. Instead of relying solely on the LLM's internal probability distributions, the system modifies the effective action space by applying principle-based filters and state transition validations. This parameter change approach transforms the LLM from an uncontrolled generative model into a constrained system that maintains adaptability while achieving reliability through structured parameter control.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If LLM agents execute complex tasks autonomously, then productivity is improved, but decision-making accuracy deteriorates due to lack of real-time external information

Engineering Contradiction:
ImproveproductivityVSAvoiddecision-making accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent implements feedback mechanisms where the state graph continuously monitors agent execution and provides real-time validation. When the LLM generates an action, the system checks it against the current state and predefined transitions, providing immediate feedback if the action would lead to an invalid state. This feedback loop ensures that productivity gains from autonomous execution do not compromise decision-making accuracy, as erroneous actions are caught and corrected through the feedback mechanism.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If LLM agents follow programmed diagnostic steps, then measurement precision is improved, but adaptability deteriorates due to rigid execution patterns

Engineering Contradiction:
Improvediagnostic accuracyVSAvoidadaptability
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The patent applies dynamics by making the principle constraints configurable and modifiable. Rather than hardcoding rigid diagnostic steps, the system uses principles that can be dynamically adjusted based on the specific task and environment. The state graph itself is designed to be adaptable, allowing new states and transitions to be added as needed. This dynamic approach maintains measurement precision through structured guidance while preserving adaptability through flexible configuration.

Inventive Principle:
Principle #15Dynamics

4Reliability

If state graph controls agent transitions, then reliability is improved, but device complexity increases

Engineering Contradiction:
Improveexecution reliabilityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent achieves universality by designing the state graph and principle framework to handle multiple types of tasks and domains through a single unified structure. Rather than creating separate control systems for different tasks, the same state graph mechanism and principle-based constraints can be applied across diverse scenarios. This universal approach improves reliability through consistent control while managing complexity by reusing the same structural patterns across different applications.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20250348703A1Systems and methods for controllable artificial intelligence agents
Publication Date: 2025.11.13 SALESFORCE INC
  • US20250348703A1 patent drawing
  • US20250348703A1 patent drawing
  • US20250348703A1 patent drawing

AI summary

Embodiments described herein provide a unified framework to control LLM agent behavior using a state graph. The agent's behavior is articulated through the state graph where each node represents a distinct state correlating with predefined agent executions, viewed as deterministic actions.