# US 2026/0086891 A1 · Managing messaging between artificial intelligence agents

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

- Number: US 2026/0086891 A1
- Document ID: US20260086891A1
- Status: Published application
- Kind: A1
- Application number: 18/892,152
- Filed: 2024-09-20
- Published: 2026-03-26
- Earliest claimed: 2024-09-20
- Assignees: Maplebear Inc.
- Applicants: Maplebear Inc.
- Inventors: Tilman Drerup; Sharath Rao Karikurve; Haixun Wang
- Web page: https://patentgrep.com/patent/US20260086891A1

## CPC

- G06N 3/0475: Generative networks
- G06Q 30/0631: {Recommending goods or services}
- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06N 3/006: based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 20/00: Machine learning
- G06F 2209/547: Messaging middleware
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An online system is configured to manage messaging between artificial intelligence (AI) agents. A service request (such as a request to order items) is received at an online system from a user client device. A system AI agent and a user AI agent are instantiated with inputs that include a set of objectives or constraints that guides each of the system AI agent and the user AI agent during messaging with the other. The online system manages rounds of messaging between the system AI agent and the user AI agent, and at some point, a proposed agreement between the user and online system is extracted from the messaging. The proposed agreement may then be presented to the user or online system for approval.

## Claims

### Claim 1

A method, performed at a computer system comprising a processor and a computer-readable medium of an online system, comprising:
creating an instance of a user artificial intelligence (AI) agent, the user AI agent comprising a large language model, wherein creating the instance of the user AI agent comprises tuning the user AI agent with one or more of a set of user objectives or a set of user constraints;
creating an instance of a system AI agent, the system AI agent comprising a large language model, wherein creating the instance of the system AI agent comprises tuning the system AI agent with one or more of a set of system objectives or a set of system constraints;
receiving, from a user client device associated with a user, a service request;
prompting the user AI agent to generate a message to an online system based on the received service request;
managing a plurality of rounds of messaging between the user AI agent and the system AI agent, wherein managing at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent comprises:
receiving, from the user AI agent, an output message,
prompting the system AI agent based on the output message from the user AI agent,
receiving, from the system AI agent, an output message, and
prompting the user AI agent based on the output message from the system AI agent;
extracting, from the messaging between the user AI agent and the system AI agent, a proposed agreement between the user and the online system responsive to the service request; and
outputting the proposed agreement to one or more of the user client device or the online system.

### Claim 2 (depends on 1)

The method of claim 1, wherein tuning the system AI agent comprises:
accessing a set of training examples, each training example comprising including training user data, training messaging data, and training item data;
applying the system AI agent to the set of training examples to generate a training output;
generating an error term using a loss function, the error term based in part on evaluating the training output against the set of system objectives or the set of system constraints; and
back-propagating the error term to update a set of parameters of the large language model associated with the system AI agent.

### Claim 3 (depends on 1)

The method of claim 1, wherein tuning the system AI agent comprises:
prompting the system AI agent, during at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent, with a description of the set of system objectives or the set of system constraints.

### Claim 4 (depends on 1)

The method of claim 1, wherein tuning the user AI agent with one or more of the set of user objectives or the set of user constraints comprises:
retrieving, from a user database maintained by the online system, information about previous orders by the user; and
generating the set of user objectives or the set of user constraints based at least in part on the retrieved information about previous orders by the user.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
generating additional training examples based on a plurality of previous service requests from users, each training example including the plurality of rounds of messaging associated with the previous service request;
labeling each training example based on a comparison of the proposed agreement extracted from the messaging to a metric associated with the online system; and
retraining the system AI agent using the additional training examples.

### Claim 6 (depends on 1)

The method of claim 1, wherein prompting the system AI agent based on the output message from the user AI agent comprises:
using retrieval-augmented generation to access a portion of a database maintained by the online system based on the output message from the user AI agent; and
prompting the system AI agent using information from the accessed portion of the database.

### Claim 7 (depends on 1)

The method of claim 1, wherein receiving the service request comprises receiving a request by the user to order a set of items from the online system.

### Claim 8 (depends on 7)

The method of claim 7, extracting, from the messaging between the user AI agent and the system AI agent, the proposed agreement between the user and the online system responsive to the service request comprises:
identifying, based on the messaging between the user AI agent and the system AI agent, a source for the set of items; and
identifying, based on the messaging between the user AI agent and the system AI agent, a set of products from a catalog associated with the source for fulfilling the request to order the set of items from the online system.

### Claim 9 (depends on 7)

The method of claim 7, wherein managing at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent comprises:
receiving, from the system AI agent, a rejection of an item of a proposed list of one or more items, the rejection including a reason for the rejection; and
prompting the user AI agent to respond to the reason for the rejection based on the set of user objectives or the set of user constraints.

### Claim 10 (depends on 7)

The method of claim 7, wherein managing at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent comprises:
receiving, from the user AI agent, a request for a discount on the set of items; and
prompting the system AI agent to consider the requested discount based on the set of system objectives or the set of system constraints.

### Claim 11

A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a processor of a computer system, cause the computer system to perform steps comprising:
creating an instance of a user artificial intelligence (AI) agent, the user AI agent comprising a large language model, wherein creating the instance of the user AI agent comprises tuning the user AI agent with one or more of a set of user objectives or a set of user constraints;
creating an instance of a system AI agent, the system AI agent comprising a large language model, wherein creating the instance of the system AI agent comprises tuning the system AI agent with one or more of a set of system objectives or a set of system constraints;
receiving, from a user client device associated with a user, a service request;
prompting the user AI agent to generate a message to an online system based on the received service request;
managing a plurality of rounds of messaging between the user AI agent and the system AI agent, wherein managing at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent comprises:
receiving, from the user AI agent, an output message,
prompting the system AI agent based on the output message from the user AI agent,
receiving, from the system AI agent, an output message, and
prompting the user AI agent based on the output message from the system AI agent;
extracting, from the messaging between the user AI agent and the system AI agent, a proposed agreement between the user and the online system responsive to the service request; and
outputting the proposed agreement to one or more of the user client device or the online system.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein the encoded instructions for tuning the system AI agent cause the computer system to perform steps comprising:
accessing a set of training examples, each training example comprising including training user data, training messaging data, and training item data;
applying the system AI agent to the set of training examples to generate a training output;
generating an error term using a loss function, the error term based in part on evaluating the training output against the set of system objectives or the set of system constraints; and
back-propagating the error term to update a set of parameters of the large language model associated with the system AI agent.

### Claim 13 (depends on 11)

The computer program product of claim 11, wherein the encoded instructions for tuning the system AI agent cause the computer system to perform steps comprising:
prompting the system AI agent, during at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent, with a description of the set of system objectives or the set of system constraints.

### Claim 14 (depends on 11)

The computer program product of claim 11, wherein the encoded instructions for tuning the user AI agent with one or more of the set of user objectives or the set of user constraints cause the computer system to perform steps comprising:
retrieving, from a user database maintained by the online system, information about previous orders by the user; and
generating the set of user objectives or the set of user constraints based at least in part on the retrieved information about previous orders by the user.

### Claim 15 (depends on 11)

The computer program product of claim 11, further comprising encoded instructions that when executed cause the computer system to perform steps comprising:
generating additional training examples based on a plurality of previous service requests from users, each training example including the plurality of rounds of messaging associated with the previous service request;
labeling each training example based on a comparison of the proposed agreement extracted from the messaging to a metric associated with the online system; and
retraining the system AI agent using the additional training examples.

### Claim 16 (depends on 11)

The computer program product of claim 11, wherein the encoded instructions for prompting the system AI agent based on the output message from the user AI agent cause the computer system to perform steps comprising:
using retrieval-augmented generation to access a portion of a database maintained by the online system based on the output message from the user AI agent; and
prompting the system AI agent using information from the accessed portion of the database.

### Claim 17 (depends on 11)

The computer program product of claim 11, wherein the encoded instructions for receiving the service request cause the computer system to perform steps comprising:
receiving a request by the user to order a set of items from the online system.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the encoded instructions for extracting, from the messaging between the user AI agent and the system AI agent, the proposed agreement between the user and the online system responsive to the service request cause the computer system to perform steps comprising:
identifying, based on the messaging between the user AI agent and the system AI agent, a source for the set of items; and
identifying, based on the messaging between the user AI agent and the system AI agent, a set of products from a catalog associated with the source for fulfilling the request to order the set of items from the online system.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein the encoded instructions for managing at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent cause the computer system to perform steps comprising:
receiving, from the system AI agent, a rejection of an item of a proposed list of one or more items, the rejection including a reason for the rejection; and
prompting the user AI agent to respond to the reason for the rejection based on the set of user objectives or the set of user constraints.

### Claim 20

A computer system comprising:
a processor; and
a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by the processor, cause the computer system to perform steps comprising:
creating an instance of a user artificial intelligence (AI) agent, the user AI agent comprising a large language model, wherein creating the instance of the user AI agent comprises tuning the user AI agent with one or more of a set of user objectives or a set of user constraints;
creating an instance of a system AI agent, the system AI agent comprising a large language model, wherein creating the instance of the system AI agent comprises tuning the system AI agent with one or more of a set of system objectives or a set of system constraints;
receiving, from a user client device associated with a user, a service request;
prompting the user AI agent to generate a message to an online system based on the received service request;
managing a plurality of rounds of messaging between the user AI agent and the system AI agent, wherein managing at least one round of the plurality of rounds of messaging between the user AI agent and the system AI agent comprises:
receiving, from the user AI agent, an output message,
prompting the system AI agent based on the output message from the user AI agent,
receiving, from the system AI agent, an output message, and
prompting the user AI agent based on the output message from the system AI agent;
extracting, from the messaging between the user AI agent and the system AI agent, a proposed agreement between the user and the online system responsive to the service request; and
outputting the proposed agreement to one or more of the user client device or the online system.
