# US 2025/0370809 A1 · Ai agent-driven interaction model for applications

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

- Number: US 2025/0370809 A1
- Document ID: US20250370809A1
- Status: Published application
- Kind: A1
- Application number: 19/219,859
- Filed: 2025-05-27
- Published: 2025-12-04
- Earliest claimed: 2024-05-28
- Assignees: Maplebear Inc.
- Applicants: Maplebear Inc.
- Inventors: Tilman Drerup; Haixun Wang; Sharath Rao Karikurve
- Web page: https://patentgrep.com/patent/US20250370809A1

## CPC

- G06F 9/5027: {the resource being a machine, e.g. CPUs, Servers, Terminals}
- G06N 3/006: based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
- G06N 3/045: Combinations of networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 5/02: Knowledge representation; Symbolic representation
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N 5/043: Distributed expert systems; Blackboards
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An online system configures one or more system AI agent instances that interact with user AI agents and performs one or more tasks on behalf of the online system. Thus, responsive to detecting the presence of a user AI agent representing a particular user, the online system directs the session for the user to communicate and interact with a system AI agent.

## Claims

### Claim 1

A computer-implemented method, comprising:
creating an instance of a system artificial intelligence (AI) agent for an online system, wherein the system AI agent is configured to access a machine-learning language model;
detecting an instance of a user AI agent representing a user of the online system;
for one or more iterations:
receiving a message from the user AI agent,
providing one or more prompts for input to the machine-learning language model to request actions to execute for a current iteration based on the received message from the user AI agent,
parsing responses from the machine-learning language model to extract a set of selected actions and action inputs for the set of selected actions,
triggering, via an agent executor instance that is a compute process, execution of a set of respective tools corresponding to the selected actions with the action inputs,
generating a message for the user AI agent for the current iteration based at least on results of executing the set of respective tools, and
providing the generated message for the current iteration to the user AI agent;
extracting, from an interaction of the messages between the system AI agent and the user AI agent, a proposed agreement between the user and the online system; and
performing one or more actions to execute the proposed agreement.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
configuring one or more tools on an interface system, wherein the one or more tools include one or a combination of:
a first tool configured to access resources via an application programming interface (API), and
a second tool exposing functionalities of one or more task-based machine-learning models.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising:
obtaining one or more records of previous or simulated interactions, wherein a record includes messages exchanged for a respective interaction between the system AI agent and another instance of a user AI agent, and tools executed for the interaction; and
training parameters of the machine-learning language model based on the one or more records of the previous or simulated interactions.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein training the parameters of the machine-learning language model further comprises:
computing a loss function including one or a combination of a first loss depending on a quality of user experience or a second loss depending on expected profits; and
backpropagating terms obtained from the loss function to update the parameters of the machine-learning language model.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
providing an offer to purchase or one or more items through the online system to the user AI agent,
wherein the message from the user AI agent for at least one iteration in the one or more iterations is a counter-offer to an offer message, and wherein the message generated for the user AI agent indicates a decision whether to accept the counter-offer or reject the counter-offer.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
obtaining one or more records of previous or simulated interactions, wherein a record includes messages exchanged for a respective interaction between the system AI agent and another instance of a user AI agent and tools executed for the interaction; and
assigning a performance evaluation to each record, wherein the performance evaluation for each record indicates a degree of performance obtained by the system AI agent with respect to one or more criteria.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, further comprising:
providing the one or more records and performance evaluations for the one or more records in the prompts to the machine-learning language model for at least one iteration in the one or more iterations.

### Claim 8 (depends on 1)

The computer-implemented method of claim 1, wherein the set of respective tools includes at least one of: an item description application programming interface (API) for retrieving details of an item, a delivery status API for retrieving details of a delivery status of an order, a machine-learning model for detecting fraud, or a machine-learning model for computing a likelihood a respective user will purchase an item.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein the one or more actions is one or a combination of invoking an application programming interface (API) to retrieve or change a compute resource, triggering a search query, or executing one or more machine-learning models.

### Claim 10

A non-transitory computer readable storage medium storing instructions that when executed by one or more computer processors cause the one or more computer processors to perform steps comprising:
creating an instance of a system artificial intelligence (AI) agent for an online system, wherein the system AI agent is configured to access a machine-learning language model;
detecting an instance of a user AI agent representing a user of the online system;
for one or more iterations:
receiving a message from the user AI agent,
providing one or more prompts for input to the machine-learning language model to request actions to execute for a current iteration based on the received message from the user AI agent,
parsing responses from the machine-learning language model to extract a set of selected actions and action inputs for the set of selected actions,
triggering, via an agent executor instance that is a compute process, execution of a set of respective tools corresponding to the selected actions with the action inputs,
generating a message for the user AI agent for the current iteration based at least on results of executing the set of respective tools, and
providing the generated message for the current iteration to the user AI agent;
extracting, from an interaction of the messages between the system AI agent and the user AI agent, a proposed agreement between the user and the online system; and
performing one or more actions to execute the proposed agreement.

### Claim 11 (depends on 10)

The non-transitory computer readable storage medium of claim 10, the instructions further causing the one or more computer processors to perform steps comprising:
configuring one or more tools on an interface system, wherein the one or more tools include one or a combination of:
a first tool configured to access resources via an application programming interface (API), and
a second tool exposing functionalities of one or more task-based machine-learning models.

### Claim 12 (depends on 10)

The non-transitory computer readable storage medium of claim 10, the instructions further causing the one or more computer processors to perform steps comprising:
obtaining one or more records of previous or simulated interactions, wherein a record includes messages exchanged for a respective interaction between the system AI agent and another instance of a user AI agent and tools executed for the interaction; and
training parameters of the machine-learning language model based on the one or more records of the previous or simulated interactions.

### Claim 13 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein training the parameters of the machine-learning language model further comprises:
computing a loss function including one or a combination of a first loss depending on a quality of user experience or a second loss depending on expected profits; and
backpropagating terms obtained from the loss function to update the parameters of the machine-learning language model.

### Claim 14 (depends on 10)

The non-transitory computer readable storage medium of claim 10, the instructions further causing the one or more computer processors to perform steps comprising:
providing an offer to purchase or one or more items through the online system to the user AI agent,
wherein the message from the user AI agent for at least one iteration in the one or more iterations is a counter-offer to an offer message, and wherein the message generated for the user AI agent indicates a decision whether to accept the counter-offer or reject the counter-offer.

### Claim 15 (depends on 10)

The non-transitory computer readable storage medium of claim 10, the instructions further causing the one or more computer processors to perform steps comprising:
obtaining one or more records of previous or simulated interactions, wherein a record includes messages exchanged for a respective interaction between the system AI agent and another instance of a user AI agent and tools executed for the interaction; and
assigning a performance evaluation to each record, wherein the performance evaluation for each record indicates a degree of performance obtained by the system AI agent with respect to one or more criteria.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15, the instructions further causing the one or more computer processors to perform steps comprising:
providing the one or more records and performance evaluations for the one or more records in the prompts to the machine-learning language model for at least one iteration in the one or more iterations.

### Claim 17 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein the set of respective tools includes at least one of an item description application programming interface (API) for retrieving details of an item, a delivery status API for retrieving details of a delivery status of an order, a machine-learning model for detecting fraud, or a machine-learning model for computing a likelihood a respective user will purchase an item.

### Claim 18 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein the one or more actions is one or a combination of invoking an application programming interface (API) to retrieve or change a compute resource, triggering a search query, or executing one or more machine-learning models.

### Claim 19

A computer system, comprising:
one or more computer processors; and
a non-transitory computer readable storage medium storing instructions that when executed by the one or more computer processors cause the one or more computer processors to perform steps comprising:
creating an instance of a system artificial intelligence (AI) agent for an online system, wherein the system AI agent is configured to access a machine-learning language model;
detecting an instance of a user AI agent representing a user of the online system;
for one or more iterations:
receiving a message from the user AI agent,
providing one or more prompts for input to the machine-learning language model to request actions to execute for a current iteration based on the received message from the user AI agent,
parsing responses from the machine-learning language model to extract a set of selected actions and action inputs for the set of selected actions,
triggering, via an agent executor instance that is a compute process, execution of a set of respective tools corresponding to the selected actions with the action inputs,
generating a message for the user AI agent for the current iteration based at least on results of executing the set of respective tools, and
providing the generated message for the current iteration to the user AI agent;
extracting, from an interaction of the messages between the system AI agent and the user AI agent, a proposed agreement between the user and the online system; and
performing one or more actions to execute the proposed agreement.

### Claim 20 (depends on 19)

The computer system of claim 19, the instructions further causing the one or more computer processors to perform steps comprising:
configuring one or more tools and on an interface system, wherein the one or more tools include one or a combination of:
a first tool configured to access resources via an application programming interface (API), and
a second tool exposing functionalities of one or more task-based machine-learning models.
