# US 2025/0156703 A1 · State machine driven automated agent with nested auditing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0156703 A1
- Document ID: US20250156703A1
- Status: Published application
- Kind: A1
- Application number: 18/509,366
- Filed: 2023-11-15
- Published: 2025-05-15
- Earliest claimed: 2023-11-15
- Assignees: Scaled Cognition, Inc.
- Applicants: Scaled Cognition, Inc.
- Inventors: Dan Klein; Mathew Gardner; Emmanouil Antonios Platanios; Mitchell Stern; Adam Pauls
- Web page: https://patentgrep.com/patent/US20250156703A1

## CPC

- G06N 3/08: Learning methods
- G06N 5/02: Knowledge representation; Symbolic representation
- G06N 20/00: Machine learning
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A system providing a state-driven automated agent. The state machine can include multiple nested state machines to receive, process, and generate responses to a user inquiry received through a chat application. The state machine has a plurality of states, and navigates between states based on one or more machine learning (ML) models. In some instances, each state is associated with a machine learning model that can predict what state the state machine should transition to from its current state. The machine learning model(s) can be implemented using one or more large language models (LLM). The state-driven automated agent includes an auditing state that analyzes a predicted response to a user inquiry and identifies errors with the response. The errors may be identified and automatically self-corrected.

## Claims

### Claim 1

A method for providing a state-machine driven automated agent, comprising:
receiving user inquiry data by a server from a remote device associated with a user;
predicting a response at a first state in a set of nested state machines, the response generated based on the user inquiry data;
automatically performing an audit of the predicted response at a second state in the set of nested state machines; and
transmitting the audited predicted response to the remote device if the automatically performed audit does not incur an error.

### Claim 2 (depends on 1)

The method of claim 1, wherein the user inquiry is part of a communication session between an automated agent provided at least in part by the server and a user interactive client application on the remote device.

### Claim 3 (depends on 1)

The method of claim 1, wherein a decision to transition from at least one state to another state in the set of nested state machines is based on an output of a machine learning model.

### Claim 4 (depends on 3)

The method of claim 3, wherein the machine learning model includes a large language model, wherein a current state outputs a prompt that is provided to the large language model to determine which state the state machine should transition to next.

### Claim 5 (depends on 4)

The method of claim 4, wherein at least a portion of the prompt is received by a current state from a previous state.

### Claim 6 (depends on 1)

The method of claim 1, wherein the set of nested state machines includes:
a second state for predicting a function; and
a first nested state machine nested in the second state, the first nested state machine including one or more states to predict a program for execution and execute the predicted program.

### Claim 7 (depends on 1)

The method of claim 1, wherein the set of nested state machines includes:
a third state for automatically auditing a predicted response; and
a second nested state machine nested in the third state, the second nested state machine including one or more states to audit each of one or more instructions determined to be relevant to processing the user inquiry data.

### Claim 8 (depends on 1)

The method of claim 1, wherein further comprising:
detecting, by the audit, an error in the predicted response; and
transitioning to a fourth state that resolves errors detected by the audit.

### Claim 9 (depends on 8)

The method of claim 8, wherein the fourth state includes a nested state machine within the fourth state that encapsulates state machine activity data related to generating the predicted response and generates instructions related to an error detected by the audit of the predicted response.

### Claim 10

A non-transitory computer readable storage medium having embodied thereon a program, the program being executable by a processor to providing a state-machine driven automated agent, the method comprising:
receiving user inquiry data by a server from a remote device associated with a user;
predicting a response at a first state in a set of nested state machines, the response generated based on the user inquiry data;
automatically performing an audit of the predicted response at a second state in the set of nested state machines; and
transmitting the audited predicted response to the remote device if the automatically performed audit does not incur an error.

### Claim 11 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein the user inquiry is part of a communication session between an automated agent provided at least in part by the server and a user interactive client application on the remote device.

### Claim 12 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein a decision to transition from at least one state to another state in the set of nested state machines is based on an output of a machine learning model.

### Claim 13 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the machine learning model includes a large language model, wherein a current state outputs a prompt that is provided to the large language model to determine which state the state machine should transition to next.

### Claim 14 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein at least a portion of the prompt is received by a current state from a previous state.

### Claim 15 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein the set of nested state machines includes:
a second state for predicting a function; and
a first nested state machine nested in the second state, the first nested state machine including one or more states to predict a program for execution and execute the predicted program.

### Claim 16 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein the set of nested state machines includes:
a third state for automatically auditing a predicted response; and
a second nested state machine nested in the third state, the second nested state machine including one or more states to audit each of one or more instructions determined to be relevant to processing the user inquiry data.

### Claim 17 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein further comprising:
detecting, by the audit, an error in the predicted response; and
transitioning to a fourth state that resolves errors detected by the audit.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the fourth state includes a nested state machine within the fourth state that encapsulates state machine activity data related to generating the predicted response and generates instructions related to an error detected by the audit of the predicted response.

### Claim 19

A system for providing an automated agent, comprising:
one or more servers, wherein each server includes a memory and a processor; and
one or more modules stored in the memory and executed by at least one of the one or more processors to receive user inquiry data by a server from a remote device associated with a user, predict a response at a first state in a set of nested state machines, the response generated based on the user inquiry data, automatically perform an audit of the predicted response at a second state in the set of nested state machines, and automatically transmit the audited predicted response to the remote device if the automatically performed audit does not incur an error.

### Claim 20 (depends on 15)

The system of claim 15, wherein a decision to transition from at least one state to another state in the set of nested state machines is based on an output of a machine learning model.
