# US 2026/0064377 A1 · Context-aware code generation and modification

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

- Number: US 2026/0064377 A1
- Document ID: US20260064377A1
- Status: Published application
- Kind: A1
- Application number: 19/309,841
- Filed: 2025-08-26
- Published: 2026-03-05
- Earliest claimed: 2024-09-03
- Assignees: For Good Al Inc.
- Applicants: For Good Al Inc.
- Inventors: Andrey Filev; Dmitrii Krasnov
- Web page: https://patentgrep.com/patent/US20260064377A1

## CPC

- G06F 8/36: Software reuse
- G06F 8/30: Creation or generation of source code
- G06F 8/311: {Functional or applicative languages; Rewrite languages}
- G06F 8/33: Intelligent editors
- G06F 8/34: Graphical or visual programming
- G06F 8/35: model driven
- G06F 8/427: {Parsing}
- G06F 8/72: Code refactoring
- G06F 8/75: Structural analysis for program understanding
- G06F 8/77: Software metrics
- G06F 11/362: Debugging of software
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3688: {for test execution, e.g. scheduling of test suites}
- G06F 11/3692: {for test results analysis}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F 16/137: {Hash-based (content-based indexing of textual data G06F16/31)}
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/24575: {using context}
- G06F 16/3347: {using vector based model}
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for generating computer code are provided. The system receives data indicating a trigger event to initiate code generation and selects a code generation agent based on attributes of the trigger event. The selected agent requests indexed context information from a context indexing component. The context indexing component generates indexed context information including project data associated with a user account, such as existing code, text data, file structure data, open file information, and project documentation. First embeddings are generated from the processed project data and stored in a vector database configured to be queried by the code generation agent. The system can further generate environmental data, hierarchical file structure summarizations, and indexed external data, creating additional embeddings stored in the vector database to provide comprehensive context for code generation.

## Claims

### Claim 1

A system comprising:
one or more processors; and
non-transitory computer-readable media storing computer-executable instructions that, when executed by the one or more processors, cause the system to perform operations comprising:
generating, by a context indexing component, indexed context information including project data associated with a user account, the project data comprising at least existing computer code associated with a user account;
storing the indexed context information in a database, the database configured to be queried by code generation agents during computer code generation sessions;
receiving a query to initiate generation of computer code in a computer code generation session, the computer code corresponding to elements included in a representation of a graphical user interface (GUI);
selecting, based at least in part on attributes of the query, a code generation agent to generate the computer code corresponding to the elements included in the representation of the GUI;
retrieving, by the code generation agent that was selected, the indexed context information from the database;
generating a first mapping between individual ones of the elements included in the representation of the GUI and individual user interface components stored in a user interface library; and
generating, utilizing a large language model (LLM) and based at least in part on the indexed context information, the representation of the GUI, and the first mapping, the computer code corresponding to the elements included in the representation of the GUI.

### Claim 2 (depends on 1)

The system of claim 1, the operations further comprising determining, based at least in part on attributes of the query, properties associated with the representation of the GUI, the properties including:
a first property indicating at least a first element to be included in the representation of the GUI;
a second property indicating an appearance of at least the first element of the representation of the GUI;
a third property indicating functionality of at least the first element of the representation of the GUI;
a fourth property indicating an organization of at least the first element of the representation of the GUI with respect to at least a second element of the representation of the GUI;
a fifth property indicating an error associated with at least the first element of the representation of the GUI; or
a sixth property indicating a design associated with the representation of the GUI;
wherein generating at least one of the first mapping or the computer code is further based at least in part on the properties associated with the representation of the GUI.

### Claim 3 (depends on 1)

The system of claim 1, wherein the representation of the GUI comprises at least one of:
a wireframe;
a blueprint;
a screenshot;
an image; or
a drawing.

### Claim 4 (depends on 1)

The system of claim 1, the operations further comprising:
generating the computer code corresponding to the elements included in the representation of the GUI further based at least in part on the selected code generation agent querying the database for the indexed context information; and
sending, by the code generation agent that was selected, the computer code that was generated to a device from which the query was received.

### Claim 5 (depends on 1)

The system of claim 1, the operations further comprising:
generating, by the context indexing component, additional contextual data indicating at least one of:
environmental data associated with the computer code generation session, the environmental data comprising at least library information indicating one or more libraries installed on a user device associated with the user account, operating system information indicating details of an operating system utilized by the user account, and database information indicating details of one or more databases utilized by the user account;
synthetic information associated with the project data, the synthetic information being based at least in part on information extracted from the existing computer code; or
indexed external data including at least external documents that are not specific to the user account, languages and frameworks specifications, security vulnerability database information, and related public documents; and
storing the additional contextual data in the database;
wherein generating the computer code is further based at least in part on the additional contextual data.

### Claim 6 (depends on 1)

The system of claim 1, the operations further comprising:
generating script representing a custom computer code generation agent based at least in part on the computer code generation session;
determining, based at least in part on attributes of the query, a trigger event to associate with the custom computer code generation agent, the trigger event being configured to initiate the script representing the custom computer code generation agent; and
storing the custom computer code agent in a library of computer code generation agents associated with the user account.

### Claim 7 (depends on 1)

The system of claim 1, wherein the query is a first query, and the operations further comprising:
generating, based at least in part on attributes of the query, a prompt configured to be input into the LLM, the prompt comprising information associated with the project data and a second query for information to facilitate generation of a response to the first query; and
receiving, from the LLM and based at least in part on inputting the prompt input the LLM, output data representing the information to facilitate the generation of the response to the first query;
wherein retrieving the indexed context information from the database is based at least in part on the information indicating the indexed context information from additional indexed context information.

### Claim 8

A method comprising:
generating, by a context indexing component, indexed context information including project data associated with a user account, the project data comprising at least existing computer code associated with a user account;
storing the indexed context information in a database, the database configured to be queried by code generation agents during computer code generation sessions;
receiving a query to initiate generation of computer code in a computer code generation session, the computer code corresponding to elements included in a representation of a graphical user interface (GUI);
selecting, based at least in part on attributes of the query, a code generation agent to generate the computer code corresponding to the elements included in the representation of the GUI;
retrieving, by the code generation agent that was selected, the indexed context information from the database;
generating a first mapping between individual ones of the elements included in the representation of the GUI and individual user interface components stored in a user interface library; and
generating, utilizing a large language model (LLM) and based at least in part on the indexed context information, the representation of the GUI, and the first mapping, the computer code corresponding to the elements included in the representation of the GUI.

### Claim 9 (depends on 8)

The method of claim 8, further comprising determining, based at least in part on attributes of the query, properties associated with the representation of the GUI, the properties including:
a first property indicating at least a first element to be included in the representation of the GUI;
a second property indicating an appearance of at least the first element of the representation of the GUI;
a third property indicating functionality of at least the first element of the representation of the GUI;
a fourth property indicating an organization of at least the first element of the representation of the GUI with respect to at least a second element of the representation of the GUI;
a fifth property indicating an error associated with at least the first element of the representation of the GUI; or
a sixth property indicating a design associated with the representation of the GUI;
wherein generating at least one of the first mapping or the computer code is further based at least in part on the properties associated with the representation of the GUI.

### Claim 10 (depends on 8)

The method of claim 8, wherein the representation of the GUI comprises at least one of:
a wireframe;
a blueprint;
a screenshot;
an image; or
a drawing.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
generating the computer code corresponding to the elements included in the representation of the GUI further based at least in part on the selected code generation agent querying the database for the indexed context information; and
sending, by the code generation agent that was selected, the computer code that was generated to a device from which the query was received.

### Claim 12 (depends on 8)

The method of claim 8, further comprising:
generating, by the context indexing component, additional contextual data indicating at least one of:
environmental data associated with the computer code generation session, the environmental data comprising at least library information indicating one or more libraries installed on a user device associated with the user account, operating system information indicating details of an operating system utilized by the user account, and database information indicating details of one or more databases utilized by the user account;
synthetic information associated with the project data, the synthetic information being based at least in part on information extracted from the existing computer code; or
indexed external data including at least external documents that are not specific to the user account, languages and frameworks specifications, security vulnerability database information, and related public documents; and
storing the additional contextual data in the database;
wherein generating the computer code is further based at least in part on the additional contextual data.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
generating script representing a custom computer code generation agent based at least in part on the computer code generation session;
determining, based at least in part on attributes of the query, a trigger event to associate with the custom computer code generation agent, the trigger event being configured to initiate the script representing the custom computer code generation agent; and
storing the custom computer code agent in a library of computer code generation agents associated with the user account.

### Claim 14 (depends on 8)

The method of claim 8, wherein the query is a first query, and the method further comprising:
generating, based at least in part on attributes of the query, a prompt configured to be input into the LLM, the prompt comprising information associated with the project data and a second query for information to facilitate generation of a response to the first query; and
receiving, from the LLM and based at least in part on inputting the prompt input the LLM, output data representing the information to facilitate the generation of the response to the first query;
wherein retrieving the indexed context information from the database is based at least in part on the information indicating the indexed context information from additional indexed context information.

### Claim 15

One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
generating, by a context indexing component, indexed context information including project data associated with a user account, the project data comprising at least existing computer code associated with a user account;
storing the indexed context information in a database, the database configured to be queried by code generation agents during computer code generation sessions;
receiving a query to initiate generation of computer code in a computer code generation session, the computer code corresponding to elements included in a representation of a graphical user interface (GUI);
selecting, based at least in part on attributes of the query, a code generation agent to generate the computer code corresponding to the elements included in the representation of the GUI;
retrieving, by the code generation agent that was selected, the indexed context information from the database;
generating a first mapping between individual ones of the elements included in the representation of the GUI and individual user interface components stored in a user interface library; and
generating, utilizing a large language model (LLM) and based at least in part on the indexed context information, the representation of the GUI, and the first mapping, the computer code corresponding to the elements included in the representation of the GUI.

### Claim 16 (depends on 15)

The one or more computer-readable media of claim 15, the operations further comprising determining, based at least in part on attributes of the query, properties associated with the representation of the GUI, the properties including:
a first property indicating at least a first element to be included in the representation of the GUI;
a second property indicating an appearance of at least the first element of the representation of the GUI;
a third property indicating functionality of at least the first element of the representation of the GUI;
a fourth property indicating an organization of at least the first element of the representation of the GUI with respect to at least a second element of the representation of the GUI;
a fifth property indicating an error associated with at least the first element of the representation of the GUI; or
a sixth property indicating a design associated with the representation of the GUI;
wherein generating at least one of the first mapping or the computer code is further based at least in part on the properties associated with the representation of the GUI.

### Claim 17 (depends on 15)

The one or more computer-readable media of claim 15, wherein the representation of the GUI comprises at least one of:
a wireframe;
a blueprint;
a screenshot;
an image; or
a drawing.

### Claim 18 (depends on 15)

The one or more computer-readable media of claim 15, the operations further comprising:
generating the computer code corresponding to the elements included in the representation of the GUI further based at least in part on the selected code generation agent querying the database for the indexed context information; and
sending, by the code generation agent that was selected, the computer code that was generated to a device from which the query was received.

### Claim 19 (depends on 15)

The one or more computer-readable media of claim 15, the operations further comprising:
generating, by the context indexing component, additional contextual data indicating at least one of:
environmental data associated with the computer code generation session, the environmental data comprising at least library information indicating one or more libraries installed on a user device associated with the user account, operating system information indicating details of an operating system utilized by the user account, and database information indicating details of one or more databases utilized by the user account;
synthetic information associated with the project data, the synthetic information being based at least in part on information extracted from the existing computer code; or
indexed external data including at least external documents that are not specific to the user account, languages and frameworks specifications, security vulnerability database information, and related public documents; and
storing the additional contextual data in the database;
wherein generating the computer code is further based at least in part on the additional contextual data.

### Claim 20 (depends on 15)

The one or more computer-readable media of claim 15, the operations further comprising:
generating script representing a custom computer code generation agent based at least in part on the computer code generation session;
determining, based at least in part on attributes of the query, a trigger event to associate with the custom computer code generation agent, the trigger event being configured to initiate the script representing the custom computer code generation agent; and
storing the custom computer code agent in a library of computer code generation agents associated with the user account.
