Multi-file application development with agents

A hierarchical file system with a tree structure and agent-executed program code addresses inefficiencies in context and data retrieval for long-running agents, enhancing performance in dynamic environments by reducing unnecessary context consumption and preserving relevant information.

US12817591B1Active Publication Date: 2026-12-01MISTRAL AI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
US19/641994
Authority / Receiving Office
US · United States
Patent Type
Patents(United States)
Current Assignee / Owner
Filing Date
2026-04-08
Publication Date
2026-12-01
Estimated Expiration
2046-04-16

AI Technical Summary

Technical Problem

Existing agentic systems face inefficiencies in managing context and data retrieval for long-running agents, particularly due to excessive context consumption and loss of relevant information, and static Retrieval-Augmented Generation systems are inadequate for dynamic environments.

Method used

A hierarchical file system is implemented, comprising directories and tool files, with a tree structure used to generate inference requests, allowing selective retrieval and processing of tool results, and agents automatically execute program code to generate outputs based on tool definitions.

Benefits of technology

This approach enhances efficient management of context and data retrieval by reducing unnecessary context consumption and preserving relevant information, improving the performance of long-running agents in dynamic environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US12817591-D00000_ABST
    Figure US12817591-D00000_ABST
Patent Text Reader

Abstract

Provided are systems, methods, and computer program products for multi-file application development with agents. The system includes at least one computing device configured to generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code, store, with the at least one agent, the first file in a file system, generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request, store, with the at least one agent, the second file in the file system, and generate, with the at least one agent, the application based on the first file and the second file.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND1. Field

[0001] This disclosure relates generally to machine-learning and, in some non-limiting embodiments or aspects, systems, methods, and computer program products for multi-file application development with agents.2. Technical Considerations

[0002] In existing agentic systems, several technical challenges negatively affect the efficient management of context and data retrieval, particularly for long-running agents. For example, defining many tools in an inference request may consume tens of thousands of tokens in the context window, despite the model typically requiring only a subset of the tools. Additionally, tool results can be voluminous, as long-running agents may perform multiple searches, each returning a substantial volume data. Current systems lack the capability for models to selectively read these results, leading to inefficient use of context.

[0003] Static Retrieval-Augmented Generation (RAG) systems may not be suitable for dynamic, long-running agentic environments. RAG systems inject entries into a system prompt and / or context window, but the relevance of context evolves as the trajectory and tasks of an agent change based on tool results. Compacting historical context can result in information loss. For example, when a context limit is reached, a system may summarize or compress the context, resulting in the permanent loss of potentially relevant information.SUMMARY

[0004] According to non-limiting embodiments or aspects, provided is a method comprising: creating a hierarchical file system comprising a plurality of directories and a plurality of tool files, each directory of the plurality of directories including at least one tool file of the plurality of tool files, each tool file of the plurality of tool files comprising at least one tool definition; receiving, with at least one computing device, a request to generate an output; and generating, with the at least one computing device, an inference request for a machine-learning model based on the request, the inference request comprising a tree structure representing the hierarchical file system. In non-limiting embodiments or aspects, the method includes: searching, with the machine-learning model, the hierarchical file system based on the inference request by processing tool definitions within the plurality of tool files based on the tree structure to identify at least one tool. In non-limiting embodiments or aspects, the method includes: executing, with the machine-learning model, the at least one tool to generate a tool result; and generating, with the machine-learning model, the output based on the inference request and the tool result. In non-limiting embodiments or aspects, wherein executing the tool comprises: automatically generating program code based on at least one tool definition for the at least one tool and the inference request, wherein an agent running on the at least one computing device automatically executes the program code to generate the tool result. In non-limiting embodiments or aspects, the at least one tool is identified based at least partially on a name of a directory including at least one tool file corresponding to the at least one tool. In non-limiting embodiments or aspects, the machine-learning model searches the hierarchical file system by generating program code configured to search the hierarchical file system, and the at least one computing device is further configured to conduct the search by executing the program code with an agent. In non-limiting embodiments or aspects, the tree structure is inserted into a context window of the inference request. In non-limiting embodiments or aspects, the at least one computing device comprises a model context server in communication with the machine-learning model. In non-limiting embodiments or aspects, wherein each directory of the plurality of directories corresponds to a different application or application programming interface. In non-limiting embodiments or aspects, the method includes: receiving a response to the inference request or a subsequent inference request from the machine-learning model, the response including program code comprising a tool call based on a tool definition of the plurality of tool definitions; executing, by an agent running on the at least one computing device, the program code to generate a tool result; and generating a next inference request based on the tool result.

[0005] According to non-limiting embodiments or aspects, provided is a system comprising: at least one computing device comprising at least one processor, the at least one computing device configured to: create a hierarchical file system comprising a plurality of directories and a plurality of tool files, each directory of the plurality of directories including at least one tool file of the plurality of tool files, each tool file of the plurality of tool files comprising at least one tool definition; receive a request to generate an output; and generate an inference request for a machine-learning model based on the request, the inference request comprising a tree structure representing the hierarchical file system. In non-limiting embodiments or aspects, the at least one computing device further configured to: search, with the machine-learning model, the hierarchical file system based on the inference request by processing tool definitions within the plurality of tool files based on the tree structure to identify at least one tool. In non-limiting embodiments or aspects, the at least one computing device further configured to: execute, with the machine-learning model, the at least one tool to generate a tool result; and generating, with the machine-learning model, the output based on the inference request and the tool result. In non-limiting embodiments or aspects, wherein executing the tool comprises: automatically generating program code based on at least one tool definition for the at least one tool and the inference request, wherein an agent running on the at least one computing device automatically executes the program code to generate the tool result. In non-limiting embodiments or aspects, the at least one tool is identified based at least partially on a name of a directory including at least one tool file corresponding to the at least one tool. In non-limiting embodiments or aspects, the machine-learning model searches the hierarchical file system by generating program code configured to search the hierarchical file system, and the at least one computing device is further configured to conduct the search by executing the program code with an agent. In non-limiting embodiments or aspects, the tree structure is inserted into a context window of the inference request. In non-limiting embodiments or aspects, the at least one computing device comprises a model context server in communication with the machine-learning model. In non-limiting embodiments or aspects, wherein each directory of the plurality of directories corresponds to a different application or application programming interface. In non-limiting embodiments or aspects, the at least one computing device further configured to: receive a response to the inference request or a subsequent inference request from the machine-learning model, the response including a script comprising a tool call based on a tool definition of the plurality of tool definitions; execute, by an agent running on the at least one computing device, the script to generate a tool result; and generate a next inference request based on the tool result.

[0006] According to non-limiting embodiments or aspects, provided is a computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: create a hierarchical file system comprising a plurality of directories and a plurality of tool files, each directory of the plurality of directories including at least one tool file of the plurality of tool files, each tool file of the plurality of tool files comprising at least one tool definition; receive a request to generate an output; and generate an inference request for a machine-learning model based on the request, the inference request comprising a tree structure representing the hierarchical file system.

[0007] According to non-limiting embodiments or aspects, provided is a method comprising: automatically executing, with at least one agent running on at least one computing device, at least one tool to produce a tool result based on a request for an output; automatically storing, with the at least one agent, the tool result in a file system; maintaining, with the at least one agent, a reference to the tool result in the file system as context; and generating, with the at least one agent, the output based on accessing the tool result in the file system using the reference. In non-limiting embodiments or aspects, wherein accessing the tool result in the file system comprises: generating, with the at least one agent, program code configured to process the tool result from the file system; and executing the program code to generate context data from the tool result, the output is generated based on the context data. In non-limiting embodiments or aspects, wherein accessing the tool result in the file system comprises: querying the tool result based on the reference and at least one file system command to obtain context data, the output is generated based on the context data. In non-limiting embodiments or aspects, the at least one file system command comprises at least one of the following: a command to search text for a keyword or regular expression, a command to return a predetermined amount of text, or any combination thereof. In non-limiting embodiments or aspects, the reference to the tool result comprises a file system path identifying a location of the tool result in the file system and a textual description of the tool result. In non-limiting embodiments or aspects, the at least one agent is in communication with at least one machine-learning model, and wherein generating the output comprises: accessing, with the at least one agent, the tool result in the file system based on an output of a machine-learning model; generating, with the at least one agent, at least one inference request based on the tool result; and inputting the at least one inference request to the at least one machine-learning model. In non-limiting embodiments or aspects, wherein generating the at least one inference request based on the tool result comprises: retrieving at least a portion of the tool result; and inserting the portion of the tool result into a context window of the at least one inference request. In non-limiting embodiments or aspects, wherein maintaining the reference to the tool result in the file system comprises: inputting the reference into a context window of an inference request generated by at least one agent without including the tool result in the context window. In non-limiting embodiments or aspects, the method includes: training the at least one agent based on the output. In non-limiting embodiments or aspects, the method includes: determining that a size of the tool result satisfies a threshold, the tool result is automatically stored in the file system in response to determining that the size of the tool result satisfies the threshold.

[0008] According to non-limiting embodiments or aspects, provided is a system comprising at least one computing device configured to: automatically execute, with at least one agent, at least one tool to produce a tool result based on a request for an output; automatically store, with the at least one agent, the tool result in a file system; maintain, with the at least one agent, a reference to the tool result in the file system as context; and generate, with the at least one agent, the output based on accessing the tool result in the file system using the reference. In non-limiting embodiments or aspects, wherein accessing the tool result in the file system comprises: generate, with the at least one agent, program code configured to process the tool result from the file system; and execute the program code to generate context data from the tool result, the output is generated based on the context data. In non-limiting embodiments or aspects, wherein accessing the tool result in the file system comprises: query the tool result based on the reference and at least one file system command to obtain context data, the output is generated based on the context data. In non-limiting embodiments or aspects, the at least one file system command comprises at least one of the following: a command to search text for a keyword or regular expression, a command to return a predetermined amount of text, or any combination thereof. In non-limiting embodiments or aspects, the reference to the tool result comprises a file system path identifying a location of the tool result in the file system and a textual description of the tool result. In non-limiting embodiments or aspects, the at least one agent is in communication with at least one machine-learning model, and wherein generating the output comprises: access, with the at least one agent, the tool result in the file system based on an output of a machine-learning model; generate, with the at least one agent, at least one inference request based on the tool result; and input the at least one inference request to the at least one machine-learning model. In non-limiting embodiments or aspects, wherein generating the at least one inference request based on the tool result comprises: retrieve at least a portion of the tool result; and insert the portion of the tool result into a context window of the at least one inference request. In non-limiting embodiments or aspects, wherein maintaining the reference to the tool result in the file system comprises: input the reference into a context window of an inference request generated by at least one agent without including the tool result in the context window. In non-limiting embodiments or aspects, the at least one computing device is further configured to: train the at least one agent based on the output. In non-limiting embodiments or aspects, the at least one computing device is further configured to: determine that a size of the tool result satisfies a threshold, the tool result is automatically stored in the file system in response to determining that the size of the tool result satisfies the threshold.

[0009] According to non-limiting embodiments or aspects, provided is a computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: automatically execute, with at least one agent, at least one tool to produce a tool result based on a request for an output; automatically store, with the at least one agent, the tool result in a file system; maintain, with the at least one agent, a reference to the tool result in the file system as context; and generate, with the at least one agent, the output based on accessing the tool result in the file system using the reference.

[0010] According to non-limiting embodiments or aspects, provided is a method comprising: generating, with at least one agent executing on at least one computing device, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code; storing, with the at least one agent, the first file in a file system; generating, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request; storing, with the at least one agent, the second file in the file system; and generating, with the at least one agent, the application based on the first file and the second file. In non-limiting embodiments or aspects, wherein generating the second file comprises: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; and processing the inference request with the at least one machine-learning model. In non-limiting embodiments or aspects, the program code of the second file comprises a pointer to the first file. In non-limiting embodiments or aspects, the method includes: generating, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, the application is generated based on the plurality of additional files. In non-limiting embodiments or aspects, the method includes: automatically modifying, with the at least one agent, the program code of the first file based on the program code of the second file. In non-limiting embodiments or aspects, the method includes: generating, with the at least one agent, a third file comprising program code based on the at least one machine-learning model by: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file and at least a portion of the second file; and processing the inference request with the at least one machine-learning model; and storing, with the at least one agent, the third file in the file system, the application is generated based on the third file. In non-limiting embodiments or aspects, the file system comprises a plurality of directories, each directory of the plurality of directories comprising at least one file including program code, and the application comprises the plurality of directories. In non-limiting embodiments or aspects, the method includes: executing, with the at least one agent, the application in a runtime environment; and debugging the application by modifying, with the at least one agent, at least one file in the file system based on executing the application.

[0011] According to non-limiting embodiments or aspects, provided is a system comprising at least one computing device configured to: generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code; store, with the at least one agent, the first file in a file system; generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request; store, with the at least one agent, the second file in the file system; and generate, with the at least one agent, the application based on the first file and the second file. In non-limiting embodiments or aspects, wherein generating the second file comprises: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; and processing the inference request with the at least one machine-learning model. In non-limiting embodiments or aspects, the program code of the second file comprises a pointer to the first file. In non-limiting embodiments or aspects, the method includes: generating, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, the application is generated based on the plurality of additional files. In non-limiting embodiments or aspects, the method includes: automatically modifying, with the at least one agent, the program code of the first file based on the program code of the second file. In non-limiting embodiments or aspects, the method includes: generating, with the at least one agent, a third file comprising program code based on the at least one machine-learning model by: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file and at least a portion of the second file; and processing the inference request with the at least one machine-learning model; and storing, with the at least one agent, the third file in the file system, the application is generated based on the third file. In non-limiting embodiments or aspects, the file system comprises a plurality of directories, each directory of the plurality of directories comprising at least one file including program code, and the application comprises the plurality of directories. In non-limiting embodiments or aspects, the method includes: executing, with the at least one agent, the application in a runtime environment; and debugging the application by modifying, with the at least one agent, at least one file in the file system based on executing the application.

[0012] According to non-limiting embodiments or aspects, provided is a computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code; store, with the at least one agent, the first file in a file system; generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request; store, with the at least one agent, the second file in the file system; and generate, with the at least one agent, the application based on the first file and the second file.

[0013] According to non-limiting embodiments or aspects, provided is a method comprising: determining, with at least one agent executing on at least one computing device, an agent skill for generating an output in response to a request, the agent skill determined based on a file system comprising a plurality of directories corresponding to a plurality of different agent skills, each directory comprising one or more agent skill files; automatically executing, with the at least one agent, the agent skill based on at least one agent skill file to generate a result; and generating, with the at least one agent, the output based on the result and at least one machine-learning model. In non-limiting embodiments or aspects, the at least one agent skill file comprises a description of the agent skill and a plurality of tasks configured to perform the agent skill. In non-limiting embodiments or aspects, wherein automatically executing the agent skill comprises: (a) generating, with the at least one agent, at least one inference request for at least one task of the plurality of tasks based on the at least one agent skill file; (b) processing the at least one inference request with the at least one machine-learning model to generate an initial result; and (c) repeating steps (a)-(b) until at least a subset of tasks of the plurality of tasks are executed. In non-limiting embodiments or aspects, the at least one agent skill file comprises at least one script configured to execute one or more tasks of the plurality of tasks. In non-limiting embodiments or aspects, wherein determining the agent skill comprises: searching, with the at least one agent, descriptions of agent skills stored in agent skill files in the file system based on the request. In non-limiting embodiments or aspects, wherein determining the agent skill comprises: inserting a file data structure representing the file system into a context window of an inference request; and processing the inference request with the at least one machine-learning model. In non-limiting embodiments or aspects, the agent skill is determined based on directory names of the plurality of directories. In non-limiting embodiments or aspects, the method includes: storing the result in the file system; retrieving a portion of the result based on the request; and inserting the portion of the result into a context window of an inference request, the output is generated by processing the inference request with the at least one machine-learning model.

[0014] According to non-limiting embodiments or aspects, provided is a system comprising at least one computing device configured to: determine, with at least one agent, an agent skill for generate an output in response to a request, the agent skill determined based on a file system comprising a plurality of directories corresponding to a plurality of different agent skills, each directory comprising one or more agent skill files; automatically execute, with the at least one agent, the agent skill based on at least one agent skill file to generate a result; and generate, with the at least one agent, the output based on the result and at least one machine-learning model. In non-limiting embodiments or aspects, the at least one agent skill file comprises a description of the agent skill and a plurality of tasks configured to perform the agent skill. In non-limiting embodiments or aspects, wherein automatically executing the agent skill comprises: (a) generating, with the at least one agent, at least one inference request for at least one task of the plurality of tasks based on the at least one agent skill file; (b) processing the at least one inference request with the at least one machine-learning model to generate an initial result; and (c) repeating steps (a)-(b) until at least a subset of tasks of the plurality of tasks are executed. In non-limiting embodiments or aspects, the at least one agent skill file comprises at least one script configured to execute one or more tasks of the plurality of tasks. In non-limiting embodiments or aspects, wherein determining the agent skill comprises: searching, with the at least one agent, descriptions of agent skills stored in agent skill files in the file system based on the request. In non-limiting embodiments or aspects, wherein determining the agent skill comprises: inserting a file data structure representing the file system into a context window of an inference request; and processing the inference request with the at least one machine-learning model. In non-limiting embodiments or aspects, the agent skill is determined based on directory names of the plurality of directories. In non-limiting embodiments or aspects, the at least one processor is further programmed or configured to: store the result in the file system; retrieve a portion of the result based on the request; and insert the portion of the result into a context window of an inference request, the output is generated by processing the inference request with the at least one machine-learning model.

[0015] According to non-limiting embodiments or aspects, provided is a computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: determine, with at least one agent, an agent skill for generate an output in response to a request, the agent skill determined based on a file system comprising a plurality of directories corresponding to a plurality of different agent skills, each directory comprising one or more agent skill files; automatically execute, with the at least one agent, the agent skill based on at least one agent skill file to generate a result; and generate, with the at least one agent, the output based on the result and at least one machine-learning model.

[0016] According to non-limiting embodiments or aspects, provided is a method comprising: storing chatbot data from a plurality of chatbot interactions in a file system, the chatbot data arranged in one or more files in at least one directory of the file system; in response to receiving a request to generate an output, searching, with at least one agent executing on at least one computing device, the file system based on the request to identify at least one file from the file system; and generating, with the at least one agent, an inference request for a machine-learning model to generate the output, the inference request comprising content from the at least one file. In non-limiting embodiments or aspects, wherein generating the inference request comprises inserting the content from the at least one file into a context window of the inference request. In non-limiting embodiments or aspects, the chatbot data comprises user preference data, the at least one file comprises the user preference data, and wherein generating the inference request is based on the user preference data. In non-limiting embodiments or aspects, the at least one file comprises a first file including user preference data and a second file including a portion of the chatbot session data, and wherein generating the inference request comprises: inserting the portion of the chatbot session data into a context window of the inference request; and generating a prompt based on the user preference data. In non-limiting embodiments or aspects, wherein storing the chatbot data comprises: capturing a plurality of messages from a chatbot interaction; determining at least one user preference from at least one message of the plurality of messages; storing the at least one user preference in a first file in the file system in the at least one directory including user preference data; and storing at least a portion of the plurality of messages in a second file in the file system based on a classification of the messages. In non-limiting embodiments or aspects, wherein searching the file system comprises: determining a search method based on the request; and in response to determining the search method as a keyword search, performing a keyword search in the file system to identify the at least one file. In non-limiting embodiments or aspects, wherein searching the file system comprises: determining a search method based on the request; and in response to determining the search method as a semantic search, performing a semantic search in the file system to identify the at least one file. In non-limiting embodiments or aspects, wherein searching the file system comprises: generating, based on the request, at least one inference request before generating the inference request, resulting in at least one output; determining a search method based on the at least one output; and performing a search in the file system to identify the at least one file using the search method. In non-limiting embodiments or aspects, wherein searching the file system comprises: generating, based on the request, a plurality of inference requests including the inference request, resulting in a plurality of corresponding outputs; and performing a plurality of searches of the file system based on the plurality of corresponding outputs to identify the at least one file. In non-limiting embodiments or aspects, wherein each successive search of the plurality of searches is based on a result of at least one previous search of the plurality of searches.

[0017] According to non-limiting embodiments or aspects, provided is a system comprising at least one computing device configured to: store chatbot data from a plurality of chatbot interactions in a file system, the chatbot data arranged in one or more files in at least one directory of the file system; in response to receive a request to generate an output, search, with at least one agent, the file system based on the request to identify at least one file from the file system; and generate, with the at least one agent, an inference request for a machine-learning model to generate the output, the inference request comprising content from the at least one file. In non-limiting embodiments or aspects, wherein generate the inference request comprises inserting the content from the at least one file into a context window of the inference request. In non-limiting embodiments or aspects, the chatbot data comprises user preference data, the at least one file comprises the user preference data, and wherein generate the inference request is based on the user preference data. In non-limiting embodiments or aspects, the at least one file comprises a first file including user preference data and a second file including a portion of the chatbot session data, and wherein generate the inference request comprises: inserting the portion of the chatbot session data into a context window of the inference request; and generate a prompt based on the user preference data. In non-limiting embodiments or aspects, wherein storing the chatbot data comprises: capturing a plurality of messages from a chatbot interaction; determining at least one user preference from at least one message of the plurality of messages; storing the at least one user preference in a first file in the file system in the at least one directory including user preference data; and storing at least a portion of the plurality of messages in a second file in the file system based on a classification of the messages. In non-limiting embodiments or aspects, wherein searching the file system comprises: determining a search system based on the request; and in response to determine the search system as a keyword search, performing a keyword search in the file system to identify the at least one file. In non-limiting embodiments or aspects, wherein searching the file system comprises: determining a search system based on the request; and in response to determine the search system as a semantic search, performing a semantic search in the file system to identify the at least one file. In non-limiting embodiments or aspects, wherein searching the file system comprises: generating, based on the request, at least one inference request before generate the inference request, resulting in at least one output; determining a search system based on the at least one output; and performing a search in the file system to identify the at least one file using the search system. In non-limiting embodiments or aspects, wherein searching the file system comprises: generating, based on the request, a plurality of inference requests including the inference request, resulting in a plurality of corresponding outputs; and performing a plurality of searches of the file system based on the plurality of corresponding outputs to identify the at least one file. In non-limiting embodiments or aspects, wherein each successive search of the plurality of searches is based on a result of at least one previous search of the plurality of searches.

[0018] According to non-limiting embodiments or aspects, provided is a computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: store chatbot data from a plurality of chatbot interactions in a file system, the chatbot data arranged in one or more files in at least one directory of the file system; in response to receive a request to generate an output, search, with at least one agent, the file system based on the request to identify at least one file from the file system; and generate, with the at least one agent, an inference request for a machine-learning model to generate the output, the inference request comprising content from the at least one file.

[0019] Further non-limiting embodiments and aspects are provided in the following clauses:

[0020] Clause 1: A method comprising: creating a hierarchical file system comprising a plurality of directories and a plurality of tool files, each directory of the plurality of directories including at least one tool file of the plurality of tool files, each tool file of the plurality of tool files comprising at least one tool definition; receiving, with at least one computing device, a request to generate an output; and generating, with the at least one computing device, an inference request for a machine-learning model based on the request, the inference request comprising a tree structure representing the hierarchical file system.

[0021] Clause 2: The method of clause 1, further comprising: searching, with the machine-learning model, the hierarchical file system based on the inference request by processing tool definitions within the plurality of tool files based on the tree structure to identify at least one tool.

[0022] Clause 3: The method of any of clauses 1-2, further comprising: executing, with the machine-learning model, the at least one tool to generate a tool result; and generating, with the machine-learning model, the output based on the inference request and the tool result.

[0023] Clause 4: The method of any of clauses 1-3, wherein executing the tool comprises: automatically generating program code based on at least one tool definition for the at least one tool and the inference request, wherein an agent running on the at least one computing device automatically executes the program code to generate the tool result.

[0024] Clause 5: The method of any of clauses 1-4, wherein the at least one tool is identified based at least partially on a name of a directory including at least one tool file corresponding to the at least one tool.

[0025] Clause 6: The method of any of clauses 1-5, wherein the machine-learning model searches the hierarchical file system by generating program code configured to search the hierarchical file system, and wherein the at least one computing device is further configured to conduct the search by executing the program code with an agent.

[0026] Clause 7: The method of any of clauses 1-6, wherein the tree structure is inserted into a context window of the inference request.

[0027] Clause 8: The method of any of clauses 1-7, wherein the at least one computing device comprises a model context server in communication with the machine-learning model.

[0028] Clause 9: The method of any of clauses 1-8, wherein each directory of the plurality of directories corresponds to a different application or application programming interface.

[0029] Clause 10: The method of any of clauses 1-9, further comprising: receiving a response to the inference request or a subsequent inference request from the machine-learning model, the response including program code comprising a tool call based on a tool definition of the plurality of tool definitions; executing, by an agent running on the at least one computing device, the program code to generate a tool result; and generating a next inference request based on the tool result.

[0030] Clause 11: A system comprising: at least one computing device comprising at least one processor, the at least one computing device configured to: create a hierarchical file system comprising a plurality of directories and a plurality of tool files, each directory of the plurality of directories including at least one tool file of the plurality of tool files, each tool file of the plurality of tool files comprising at least one tool definition; receive a request to generate an output; and generate an inference request for a machine-learning model based on the request, the inference request comprising a tree structure representing the hierarchical file system.

[0031] Clause 12: The system of clause 11, the at least one computing device further configured to: search, with the machine-learning model, the hierarchical file system based on the inference request by processing tool definitions within the plurality of tool files based on the tree structure to identify at least one tool.

[0032] Clause 13: The system of any of clauses 11-12, the at least one computing device further configured to: execute, with the machine-learning model, the at least one tool to generate a tool result; and generating, with the machine-learning model, the output based on the inference request and the tool result.

[0033] Clause 14: The system of any of clauses 11-13, wherein executing the tool comprises: automatically generating program code based on at least one tool definition for the at least one tool and the inference request, wherein an agent running on the at least one computing device automatically executes the program code to generate the tool result.

[0034] Clause 15: The system of any of clauses 11-14, wherein the at least one tool is identified based at least partially on a name of a directory including at least one tool file corresponding to the at least one tool.

[0035] Clause 16: The system of any of clauses 11-15, wherein the machine-learning model searches the hierarchical file system by generating program code configured to search the hierarchical file system, and wherein the at least one computing device is further configured to conduct the search by executing the program code with an agent.

[0036] Clause 17: The system of any of clauses 11-16, wherein the tree structure is inserted into a context window of the inference request.

[0037] Clause 18: The system of any of clauses 11-17, wherein the at least one computing device comprises a model context server in communication with the machine-learning model.

[0038] Clause 19: The system of any of clauses 11-18, wherein each directory of the plurality of directories corresponds to a different application or application programming interface.

[0039] Clause 20: The system of any of clauses 1-19, the at least one computing device further configured to: receive a response to the inference request or a subsequent inference request from the machine-learning model, the response including a script comprising a tool call based on a tool definition of the plurality of tool definitions; execute, by an agent running on the at least one computing device, the script to generate a tool result; and generate a next inference request based on the tool result.

[0040] Clause 21: A computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: create a hierarchical file system comprising a plurality of directories and a plurality of tool files, each directory of the plurality of directories including at least one tool file of the plurality of tool files, each tool file of the plurality of tool files comprising at least one tool definition; receive a request to generate an output; and generate an inference request for a machine-learning model based on the request, the inference request comprising a tree structure representing the hierarchical file system.

[0041] Clause 22: A method comprising: automatically executing, with at least one agent running on at least one computing device, at least one tool to produce a tool result based on a request for an output; automatically storing, with the at least one agent, the tool result in a file system; maintaining, with the at least one agent, a reference to the tool result in the file system as context; and generating, with the at least one agent, the output based on accessing the tool result in the file system using the reference.

[0042] Clause 23: The method of clause 22, wherein accessing the tool result in the file system comprises: generating, with the at least one agent, program code configured to process the tool result from the file system; and executing the program code to generate context data from the tool result, wherein the output is generated based on the context data.

[0043] Clause 24: The method of any of clauses 22-23, wherein accessing the tool result in the file system comprises: querying the tool result based on the reference and at least one file system command to obtain context data, wherein the output is generated based on the context data.

[0044] Clause 25: The method of any of clauses 22-24, wherein the at least one file system command comprises at least one of the following: a command to search text for a keyword or regular expression, a command to return a predetermined amount of text, or any combination thereof.

[0045] Clause 26: The method of any of clauses 22-25, wherein the reference to the tool result comprises a file system path identifying a location of the tool result in the file system and a textual description of the tool result.

[0046] Clause 27: The method of any of clauses 22-26, wherein the at least one agent is in communication with at least one machine-learning model, and wherein generating the output comprises: accessing, with the at least one agent, the tool result in the file system based on an output of a machine-learning model; generating, with the at least one agent, at least one inference request based on the tool result; and inputting the at least one inference request to the at least one machine-learning model.

[0047] Clause 28: The method of any of clauses 22-27, wherein generating the at least one inference request based on the tool result comprises: retrieving at least a portion of the tool result; and inserting the portion of the tool result into a context window of the at least one inference request.

[0048] Clause 29: The method of any of clauses 22-28, wherein maintaining the reference to the tool result in the file system comprises: inputting the reference into a context window of an inference request generated by at least one agent without including the tool result in the context window.

[0049] Clause 30: The method of any of clauses 22-29, further comprising: training the at least one agent based on the output.

[0050] Clause 31: The method of any of clauses 22-30, further comprising: determining that a size of the tool result satisfies a threshold, wherein the tool result is automatically stored in the file system in response to determining that the size of the tool result satisfies the threshold.

[0051] Clause 32: A system comprising at least one computing device configured to: automatically execute, with at least one agent, at least one tool to produce a tool result based on a request for an output; automatically store, with the at least one agent, the tool result in a file system; maintain, with the at least one agent, a reference to the tool result in the file system as context; and generate, with the at least one agent, the output based on accessing the tool result in the file system using the reference.

[0052] Clause 33: The method of clause 32, wherein accessing the tool result in the file system comprises: generate, with the at least one agent, program code configured to process the tool result from the file system; and execute the program code to generate context data from the tool result, wherein the output is generated based on the context data.

[0053] Clause 34: The method of any of clauses 32-33, wherein accessing the tool result in the file system comprises: query the tool result based on the reference and at least one file system command to obtain context data, wherein the output is generated based on the context data.

[0054] Clause 35: The method of any of clauses 32-34, wherein the at least one file system command comprises at least one of the following: a command to search text for a keyword or regular expression, a command to return a predetermined amount of text, or any combination thereof.

[0055] Clause 36: The method of any of clauses 32-35, wherein the reference to the tool result comprises a file system path identifying a location of the tool result in the file system and a textual description of the tool result.

[0056] Clause 37: The method of any of clauses 32-36, wherein the at least one agent is in communication with at least one machine-learning model, and wherein generating the output comprises: access, with the at least one agent, the tool result in the file system based on an output of a machine-learning model; generate, with the at least one agent, at least one inference request based on the tool result; and input the at least one inference request to the at least one machine-learning model.

[0057] Clause 38: The method of any of clauses 32-37, wherein generating the at least one inference request based on the tool result comprises: retrieve at least a portion of the tool result; and insert the portion of the tool result into a context window of the at least one inference request.

[0058] Clause 39: The method of any of clauses 32-38, wherein maintaining the reference to the tool result in the file system comprises: input the reference into a context window of an inference request generated by at least one agent without including the tool result in the context window.

[0059] Clause 40: The method of any of clauses 32-39, further comprising: train the at least one agent based on the output.

[0060] Clause 41: The method of any of clauses 32-40, further comprising: determine that a size of the tool result satisfies a threshold, wherein the tool result is automatically stored in the file system in response to determining that the size of the tool result satisfies the threshold.

[0061] Clause 42: A computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: automatically execute, with at least one agent, at least one tool to produce a tool result based on a request for an output; automatically store, with the at least one agent, the tool result in a file system; maintain, with the at least one agent, a reference to the tool result in the file system as context; and generate, with the at least one agent, the output based on accessing the tool result in the file system using the reference.

[0062] Clause 43: A method comprising: generating, with at least one agent executing on at least one computing device, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code; storing, with the at least one agent, the first file in a file system; generating, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request; storing, with the at least one agent, the second file in the file system; and generating, with the at least one agent, the application based on the first file and the second file.

[0063] Clause 44: The method of clause 43, wherein generating the second file comprises: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; and processing the inference request with the at least one machine-learning model.

[0064] Clause 45: The method of any of clauses 43-44, wherein the program code of the second file comprises a pointer to the first file.

[0065] Clause 46: The method of any of clauses 43-45, further comprising: generating, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, wherein the application is generated based on the plurality of additional files.

[0066] Clause 47: The method of any of clauses 43-46, further comprising: automatically modifying, with the at least one agent, the program code of the first file based on the program code of the second file.

[0067] Clause 48: The method of any of clauses 43-47, further comprising: generating, with the at least one agent, a third file comprising program code based on the at least one machine-learning model by: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file and at least a portion of the second file; and processing the inference request with the at least one machine-learning model; and storing, with the at least one agent, the third file in the file system, wherein the application is generated based on the third file.

[0068] Clause 49: The method of any of clauses 43-48, wherein the file system comprises a plurality of directories, each directory of the plurality of directories comprising at least one file including program code, and wherein the application comprises the plurality of directories.

[0069] Clause 50: The method of any of clauses 43-49, further comprising: executing, with the at least one agent, the application in a runtime environment; and debugging the application by modifying, with the at least one agent, at least one file in the file system based on executing the application.

[0070] Clause 51: A system comprising at least one computing device configured to: generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code; store, with the at least one agent, the first file in a file system; generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request; store, with the at least one agent, the second file in the file system; and generate, with the at least one agent, the application based on the first file and the second file.

[0071] Clause 52: The system of clause 51, wherein generating the second file comprises: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; and processing the inference request with the at least one machine-learning model.

[0072] Clause 53: The system of any of clauses 51-52, wherein the program code of the second file comprises a pointer to the first file.

[0073] Clause 54: The system of any of clauses 52-53, further comprising: generating, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, wherein the application is generated based on the plurality of additional files.

[0074] Clause 55: The system of any of clauses 52-54, further comprising: automatically modifying, with the at least one agent, the program code of the first file based on the program code of the second file.

[0075] Clause 56: The system of any of clauses 52-55, further comprising: generating, with the at least one agent, a third file comprising program code based on the at least one machine-learning model by: generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file and at least a portion of the second file; and processing the inference request with the at least one machine-learning model; and storing, with the at least one agent, the third file in the file system, wherein the application is generated based on the third file.

[0076] Clause 57: The system of any of clauses 51-56, wherein the file system comprises a plurality of directories, each directory of the plurality of directories comprising at least one file including program code, and wherein the application comprises the plurality of directories.

[0077] Clause 58: The system of any of clauses 51-57, further comprising: executing, with the at least one agent, the application in a runtime environment; and debugging the application by modifying, with the at least one agent, at least one file in the file system based on executing the application.

[0078] Clause 59: A computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code; store, with the at least one agent, the first file in a file system; generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request; store, with the at least one agent, the second file in the file system; and generate, with the at least one agent, the application based on the first file and the second file.

[0079] Clause 60: A method comprising: determining, with at least one agent executing on at least one computing device, an agent skill for generating an output in response to a request, the agent skill determined based on a file system comprising a plurality of directories corresponding to a plurality of different agent skills, each directory comprising one or more agent skill files; automatically executing, with the at least one agent, the agent skill based on at least one agent skill file to generate a result; and generating, with the at least one agent, the output based on the result and at least one machine-learning model.

[0080] Clause 61: The method of clause 60, wherein the at least one agent skill file comprises a description of the agent skill and a plurality of tasks configured to perform the agent skill.

[0081] Clause 62: The method of any of clauses 60-61, wherein automatically executing the agent skill comprises: (a) generating, with the at least one agent, at least one inference request for at least one task of the plurality of tasks based on the at least one agent skill file; (b) processing the at least one inference request with the at least one machine-learning model to generate an initial result; and (c) repeating steps (a)-(b) until at least a subset of tasks of the plurality of tasks are executed.

[0082] Clause 63: The method of any of clauses 60-62, wherein the at least one agent skill file comprises at least one script configured to execute one or more tasks of the plurality of tasks.

[0083] Clause 64: The method of any of clauses 60-63, wherein determining the agent skill comprises: searching, with the at least one agent, descriptions of agent skills stored in agent skill files in the file system based on the request.

[0084] Clause 65: The method of any of clauses 60-64, wherein determining the agent skill comprises: inserting a file data structure representing the file system into a context window of an inference request; and processing the inference request with the at least one machine-learning model.

[0085] Clause 66: The method of any of clauses 60-65, wherein the agent skill is determined based on directory names of the plurality of directories.

[0086] Clause 67: The method of any of clauses 60-66, further comprising: storing the result in the file system; retrieving a portion of the result based on the request; and inserting the portion of the result into a context window of an inference request, wherein the output is generated by processing the inference request with the at least one machine-learning model.

[0087] Clause 68: A system comprising at least one computing device configured to: determine, with at least one agent, an agent skill for generate an output in response to a request, the agent skill determined based on a file system comprising a plurality of directories corresponding to a plurality of different agent skills, each directory comprising one or more agent skill files; automatically execute, with the at least one agent, the agent skill based on at least one agent skill file to generate a result; and generate, with the at least one agent, the output based on the result and at least one machine-learning model.

[0088] Clause 69: The system of clause 68, wherein the at least one agent skill file comprises a description of the agent skill and a plurality of tasks configured to perform the agent skill.

[0089] Clause 70: The system of any of clauses 68-69, wherein automatically executing the agent skill comprises: (a) generating, with the at least one agent, at least one inference request for at least one task of the plurality of tasks based on the at least one agent skill file; (b) processing the at least one inference request with the at least one machine-learning model to generate an initial result; and (c) repeating steps (a)-(b) until at least a subset of tasks of the plurality of tasks are executed.

[0090] Clause 71: The system of any of clauses 68-70, wherein the at least one agent skill file comprises at least one script configured to execute one or more tasks of the plurality of tasks.

[0091] Clause 72: The system of any of clauses 68-71, wherein determining the agent skill comprises: searching, with the at least one agent, descriptions of agent skills stored in agent skill files in the file system based on the request.

[0092] Clause 73: The system of any of clauses 68-72, wherein determining the agent skill comprises: inserting a file data structure representing the file system into a context window of an inference request; and processing the inference request with the at least one machine-learning model.

[0093] Clause 74: The system of any of clauses 68-73, wherein the agent skill is determined based on directory names of the plurality of directories.

[0094] Clause 75: The system of any of clauses 68-74, wherein the at least one processor is further programmed or configured to: store the result in the file system; retrieve a portion of the result based on the request; and insert the portion of the result into a context window of an inference request, wherein the output is generated by processing the inference request with the at least one machine-learning model.

[0095] Clause 76: A computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: determine, with at least one agent, an agent skill for generate an output in response to a request, the agent skill determined based on a file system comprising a plurality of directories corresponding to a plurality of different agent skills, each directory comprising one or more agent skill files; automatically execute, with the at least one agent, the agent skill based on at least one agent skill file to generate a result; and generate, with the at least one agent, the output based on the result and at least one machine-learning model.

[0096] Clause 77: A method comprising: storing chatbot data from a plurality of chatbot interactions in a file system, the chatbot data arranged in one or more files in at least one directory of the file system; in response to receiving a request to generate an output, searching, with at least one agent executing on at least one computing device, the file system based on the request to identify at least one file from the file system; and generating, with the at least one agent, an inference request for a machine-learning model to generate the output, the inference request comprising content from the at least one file.

[0097] Clause 78: The method of clause 77, wherein generating the inference request comprises inserting the content from the at least one file into a context window of the inference request.

[0098] Clause 79: The method of any of clauses 76-78, wherein the chatbot data comprises user preference data, wherein the at least one file comprises the user preference data, and wherein generating the inference request is based on the user preference data.

[0099] Clause 80: The method of any of clauses 76-79, wherein the at least one file comprises a first file including user preference data and a second file including a portion of the chatbot session data, and wherein generating the inference request comprises: inserting the portion of the chatbot session data into a context window of the inference request; and generating a prompt based on the user preference data.

[0100] Clause 81: The method of any of clauses 76-80, wherein storing the chatbot data comprises: capturing a plurality of messages from a chatbot interaction; determining at least one user preference from at least one message of the plurality of messages; storing the at least one user preference in a first file in the file system in the at least one directory including user preference data; and storing at least a portion of the plurality of messages in a second file in the file system based on a classification of the messages.

[0101] Clause 82: The method of any of clauses 76-81, wherein searching the file system comprises: determining a search method based on the request; and in response to determining the search method as a keyword search, performing a keyword search in the file system to identify the at least one file.

[0102] Clause 83: The method of any of clauses 76-82, wherein searching the file system comprises: determining a search method based on the request; and in response to determining the search method as a semantic search, performing a semantic search in the file system to identify the at least one file.

[0103] Clause 84: The method of any of clauses 7-837, wherein searching the file system comprises: generating, based on the request, at least one inference request before generating the inference request, resulting in at least one output; determining a search method based on the at least one output; and performing a search in the file system to identify the at least one file using the search method.

[0104] Clause 85: The method of any of clauses 76-84, wherein searching the file system comprises: generating, based on the request, a plurality of inference requests including the inference request, resulting in a plurality of corresponding outputs; and performing a plurality of searches of the file system based on the plurality of corresponding outputs to identify the at least one file.

[0105] Clause 86: The method of any of clauses 76-85, wherein each successive search of the plurality of searches is based on a result of at least one previous search of the plurality of searches.

[0106] Clause 87: A system comprising at least one computing device configured to: store chatbot data from a plurality of chatbot interactions in a file system, the chatbot data arranged in one or more files in at least one directory of the file system; in response to receive a request to generate an output, search, with at least one agent, the file system based on the request to identify at least one file from the file system; and generate, with the at least one agent, an inference request for a machine-learning model to generate the output, the inference request comprising content from the at least one file.

[0107] Clause 88: The system of clause 87, wherein generate the inference request comprises inserting the content from the at least one file into a context window of the inference request.

[0108] Clause 89: The system of any of clauses 87-88, wherein the chatbot data comprises user preference data, wherein the at least one file comprises the user preference data, and wherein generate the inference request is based on the user preference data.

[0109] Clause 90: The system of any of clauses 87-89, wherein the at least one file comprises a first file including user preference data and a second file including a portion of the chatbot session data, and wherein generate the inference request comprises: inserting the portion of the chatbot session data into a context window of the inference request; and generate a prompt based on the user preference data.

[0110] Clause 91: The system of any of clauses 87-90, wherein storing the chatbot data comprises: capturing a plurality of messages from a chatbot interaction; determining at least one user preference from at least one message of the plurality of messages; storing the at least one user preference in a first file in the file system in the at least one directory including user preference data; and storing at least a portion of the plurality of messages in a second file in the file system based on a classification of the messages.

[0111] Clause 92: The system of any of clauses 87-91, wherein searching the file system comprises: determining a search system based on the request; and in response to determine the search system as a keyword search, performing a keyword search in the file system to identify the at least one file.

[0112] Clause 93: The system of any of clauses 87-92, wherein searching the file system comprises: determining a search system based on the request; and in response to determine the search system as a semantic search, performing a semantic search in the file system to identify the at least one file.

[0113] Clause 94: The system of any of clauses 87-93, wherein searching the file system comprises: generating, based on the request, at least one inference request before generate the inference request, resulting in at least one output; determining a search system based on the at least one output; and performing a search in the file system to identify the at least one file using the search system.

[0114] Clause 95: The system of any of clauses 87-94, wherein searching the file system comprises: generating, based on the request, a plurality of inference requests including the inference request, resulting in a plurality of corresponding outputs; and performing a plurality of searches of the file system based on the plurality of corresponding outputs to identify the at least one file.

[0115] Clause 96: The system of any of clauses 87-95, wherein each successive search of the plurality of searches is based on a result of at least one previous search of the plurality of searches.

[0116] Clause 97: A computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to: store chatbot data from a plurality of chatbot interactions in a file system, the chatbot data arranged in one or more files in at least one directory of the file system; in response to receive a request to generate an output, search, with at least one agent, the file system based on the request to identify at least one file from the file system; and generate, with the at least one agent, an inference request for a machine-learning model to generate the output, the inference request comprising content from the at least one file.

[0117] These and other features and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structures and the combination of parts and economies of manufacture, will become more apparent upon consideration of the following description and the appended claims with reference to the accompanying drawings, all of which form a part of this specification, wherein like reference numerals designate corresponding parts in the various figures. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the invention.BRIEF DESCRIPTION OF THE DRAWINGS

[0118] Additional advantages and details are explained in greater detail below with reference to the non-limiting, exemplary embodiments that are illustrated in the accompanying schematic figures, in which:

[0119] FIG. 1 illustrates a schematic diagram of a system for implementing a file system with one or more machine-learning models according to non-limiting embodiments or aspects;

[0120] FIG. 2 illustrates a flow diagram for a method for implementing an agent with machine-learning tools according to non-limiting embodiments or aspects;

[0121] FIG. 3 illustrates a schematic diagram of a system for implementing machine-learning tools with a file system according to non-limiting embodiments or aspects;

[0122] FIG. 4 illustrates a flow diagram for a method for implementing machine-learning tools with a file system according to non-limiting embodiments or aspects;

[0123] FIG. 5 illustrates a flow diagram for a method for implementing machine-learning tools with a file system according to non-limiting embodiments or aspects;

[0124] FIG. 6 illustrates a schematic diagram of a system for implementing agent skills with a file system according to non-limiting embodiments or aspects;

[0125] FIG. 7 illustrates a flow diagram for a method for implementing agent skills with a file system according to non-limiting embodiments or aspects;

[0126] FIG. 8 illustrates a flow diagram for a method for iteratively searching a file system according to non-limiting embodiments or aspects;

[0127] FIG. 9 illustrates a schematic diagram of a system for developing an application with a file system according to non-limiting embodiments or aspects;

[0128] FIG. 10 illustrates a flow diagram for a method for developing an application with a file system according to non-limiting embodiments or aspects; and

[0129] FIG. 11 illustrates example components of a device used in connection with non-limiting embodiments or aspects of systems, methods, and computer program products for implementing machine-learning tools with a file system.DESCRIPTION

[0130] For purposes of the description hereinafter, the terms “end,”“upper,”“lower,”“right,”“left,”“vertical,”“horizontal,”“top,”“bottom,”“lateral,”“longitudinal,” and derivatives thereof shall relate to the embodiments as they are oriented in the drawing figures. However, it is to be understood that the embodiments may assume various alternative variations and step sequences, except where expressly specified to the contrary. It is also to be understood that the specific devices and processes illustrated in the attached drawings, and described in the following specification, are simply exemplary embodiments or aspects of the invention. Hence, specific dimensions and other physical characteristics related to the embodiments or aspects disclosed herein are not to be considered as limiting.

[0131] No aspect, component, element, structure, act, step, function, instruction, and / or the like used herein should be construed as critical or essential unless explicitly described as such. Also, as used herein, the articles “a” and “an” are intended to include one or more items and may be used interchangeably with “one or more” and “at least one.” Furthermore, as used herein, the term “set” is intended to include one or more items (e.g., related items, unrelated items, a combination of related and unrelated items, and / or the like) and may be used interchangeably with “one or more” or “at least one.” Where only one item is intended, the term “one” or similar language is used. Also, as used herein, the terms “has,”“have,”“having,” or the like are intended to be open-ended terms. Further, the phrase “based on” is intended to mean “based at least partially on” unless explicitly stated otherwise.

[0132] As used herein, the term “computing device” may refer to one or more devices configured to process data. A computing device may include one or more processors, such as Central Processing Units (CPUs), Graphics Processing Units (GPUs), microcontrollers, integrated circuits, field-programmable gate arrays (FPGAs), and / or the like. A computing device may, in some examples, include components to receive, process, and output data, such as a processor, a display, a memory, an input device, a network interface, and / or the like. A computing device may be a mobile device. As an example, a mobile device may include a cellular phone (e.g., a smartphone or standard cellular phone), a portable computer, a wearable device (e.g., watches, glasses, lenses, clothing, and / or the like), a personal digital assistant (PDA), and / or other like devices. A computing device may also be a desktop computer, server computer, and / or other form of non-mobile computer. In some non-limiting embodiments, a computing device may include a biological or quantum processing device.

[0133] As used herein, the term “server” may refer to or include one or more computing devices that are operated by or facilitate communication and processing for multiple parties in a network environment, such as the Internet, although it will be appreciated that communication may be facilitated over one or more public or private network environments and that various other arrangements are possible. Further, multiple computing devices (e.g., servers, mobile devices, etc.) directly or indirectly communicating in the network environment may constitute a “system.” Reference to “a server,”“a processor,” or “a computing device,” as used herein, may refer to a previously recited server, processor, and / or computing device that is recited as performing a previous step or function, a different server, processor, or computing device, and / or a combination of computing devices. For example, as used in the specification and the claims, a first computing device, a first server, and / or a first processor that is recited as performing a first step or function may refer to the same or different computing device, server, and / or a processor recited as performing a second step or function.

[0134] As used herein, the term “file system” may refer to a structured arrangement of files and directories used to store, read, write, and / or manage data. A file system may be hierarchical, such that the file system can be represented as a tree structure including directories, subdirectories, and files within the directories. A file system may be navigable through a file path, such as “ / main / user / file.txt”, where “main” is a parent directory, “user” is a subdirectory, and “file.txt” is a file within the “user” subdirectory. It will be appreciated that a file system may include numerous directories and files. In non-limiting embodiments, a file system may be a projection of data stored in different locations such that the file system is composed of pointers to the underlying data represented as a hierarchical file structure.

[0135] As used herein, the term “agent” may refer to one or more software processes and / or applications configured to perform autonomous tasks and to interact with one or more machine-learning models to produce an output (e.g., such as a textual output, a visual output, an audio output, performance of one or more actions, and / or the like). In non-limiting embodiments, agents may include deterministic logic that enable the agents to execute end-to-end tasks without human intervention or with minimal human intervention.

[0136] In non-limiting examples, an agent may include one or more machine-learning models (e.g., an agent may include an agentic model with an internal inference engine) and / or may communicate with one or more external machine-learning models. An agent may communicate with one or more external machine-learning models by generating inference requests and communicating the requests to machine-learning models through APIs and / or other communication interfaces. In non-limiting embodiments, a plurality of agents may be organized in a hierarchical manner (e.g., a tree) with a main agent that receives an initial request for an output and one or more subagents that the main agent orchestrates. A main agent may include orchestration logic configured to control other agents and / or processes and may be referred to as an “orchestrator.”

[0137] In non-limiting embodiments, agents may be configured to verify the accuracy of their outputs with feedback loops from machine-learning models and / or interaction with other agents. Agents may include memory (e.g., memory allocated to an agent) that continues to expand as users embed their knowledge and as outputs are generated over time. In non-limiting embodiments, agents may have individual agentic harnesses. An agentic harness may include a software framework and / or infrastructure to enable the execution of tasks, management of data, and / or orchestration of agents, including but not limited to one or more API definitions and tools.

[0138] In non-limiting embodiments, agents may spawn other agents (e.g., sub-agents) to perform an isolated task and / or multi-step processes, enabling task decomposition, model specialization, parallel execution, custom agentic harnesses per agent, and composability. As an example, building a web application may chain a planning agent, a research agent, a coding agent, and a review agent together in a workflow. In non-limiting embodiments, agents may be provided with sandboxed (e.g., isolated) code execution environments. In non-limiting embodiments, agents may be configured to support client- and server-side tool calls, stream state updates, and maintain isolation, while the underlying agentic harness may provide observability, workflow integration, and gradual migration from legacy systems.

[0139] As used herein, the terms “tool” and “machine-learning tool” may refer to a function, application, and / or resource for performing an action. For example, a tool may include a code generation tool, a retrieval tool, a database search tool, a web search tool, an image generation tool, a calculator tool, and / or the like. Tools may include one or more scripts and / or applications local or remote to the computing device 100 and may be invoked by an agent 101 (e.g., an agent may trigger the execution of a tool by command and / or executing a script). Tools allow for machine-learning models to interact with environments external to the models. In some examples, tools may include interfaces for other machine-learning models.

[0140] As used herein, the term “inference request” refers to a structured input to a machine-learning model. In non-limiting embodiments, an inference request may include a system prompt and a context window. Data added to an inference request may be included in the system prompt and / or context window. The system prompt may include a set of instructions and / or parameters to control and / or influence an output of the model. The context window may include a dynamic data payload containing user-provided input, message history (e.g., from a chatbot interaction), and / or supplementary context data, and may be processed by a machine-learning model in conjunction with the system prompt to generate a model output. An inference request may cause the machine-learning model to perform a computational inference.

[0141] Provided herein are systems, methods, and computer program products for implementing a file system with agents and machine-learning models. Non-limiting embodiments provide for dynamic and efficient context management for model inferences based on exploring a file system and the directories and files therein. Accordingly, through implementing non-limiting embodiments discussed herein, agents and corresponding machine-learning models are less likely to experience context limitations throughout numerous inference requests and tasks. Further, by having the ability to manage context through numerous iterations, non-limiting embodiments provide for a reduced use of computational resources, including processor cycles and memory. Another benefit of non-limiting embodiments is improved accuracy of the results of each turn of an agent based on the use of targeted context data, which may reduce the number of iterations needed to produce a result. By navigating a file system and manipulating the directories and files within a file system with scripts and / or commands generated by machine-learning models, agents are enabled to perform end-to-end tasks in an efficient manner, reducing the context burden on machine-learning models that add to latency and expenditure of resources. Other advantages and improvements will be appreciated by those having skill in the art in view of the description herein.

[0142] Referring now to FIG. 1, a system 1000 for implementing a file system with one or more machine-learning models is shown according to non-limiting embodiments. The system 1000 includes a computing device 100 configured to execute one or more software applications. The computing device 100 may be a server computer, for example, providing software-based services to user devices, such as user computing device 102, via one or more networks. It will be appreciated that the computing device 100 may also be used locally, such that the user computing device 102 is local to and / or includes computing device 100. Various other arrangements are possible. The user computing device 102 may display a GUI 110 that facilitates user interaction with the user computing device 102 and, through the user computing device, the computing device 100.

[0143] With continued reference to FIG. 1, the computing device 100 may include one or more agents 101 configured to automatically execute tasks. In some non-limiting embodiments, multiple agents 101 may be executed in parallel and / or in series to accomplish a sequence of tasks. Agents 101 may communicate with other agents, the file system 104, the computing device 102, and the machine-learning model 114. In non-limiting embodiments, the agent 101 may include an orchestrator that controls other agents. In non-limiting embodiments, an agent 101 may include an agentic harness with one or more tools that enable the agent to communicate with external systems.

[0144] In non-limiting embodiments, the computing device 100 and agent 101 may be in communication with one or more machine-learning models 114. The machine-learning models 114 may include one or more language models (e.g., LLMs, SLMs, text diffusion models, and / or the like), one or more visual models (e.g., image and / or video models), and / or other like machine-learning models. In non-limiting embodiments, the machine-learning model 114 may include one or more generative models, including language models, image models, audio models, and / or the like. The machine-learning model 114 may be local to and hosted by computing device 100. In non-limiting embodiments, the machine-learning model 114 may be hosted by a remote server computer (not shown in FIG. 1) separate from computing device 100 and provided as a service over one or more networks to computer device 100, which in turn provides services to user computing device 102.

[0145] Still referring to FIG. 1, a user may interact with the GUI 110 and / or user computing device 102 to communicate a user query 112 to computing device 100 that may be received by an agent 101. In non-limiting embodiments, the computing device 100 and / or agent 101 may generate a response 120 to the user query 112 and communicate the response to the user computing device 102. For example, the response 120 may be generated by inputting an inference request 116 into a machine-learning model 114 to receive an output 118. In non-limiting embodiments, the agent 101 may pass the user query 112 to the machine-learning model 114 as the inference request 116 or may generate an inference request 116 based on the user query 112 without including the full user query 112. In non-limiting embodiments, the agent 101 may pass the output 118 to the user computing device 102 as the response 120 or may generate a response 120 based on the output 118. In non-limiting embodiments, a chatbot interaction may continue between the user computing device 102 and the agent 101 with additional user queries and responses.

[0146] With continued reference to FIG. 1, in non-limiting embodiments the agent 101 may be in communication with a file system 104. The file system 104 may be stored on one or more data storage devices local and / or remote to the computing device 100. The file system 104 may include a hierarchical file tree structure 106 of directories and folders. In non-limiting embodiments, the file system 104 may be a virtual file system including a projection of data stored in different locations using pointers. The agent 101 may be provided with read and write capabilities in the file system 104, allowing the agent to read files, create files, edit files, store files, delete files, and / or move files. In non-limiting embodiments, one or more rules and / or permissions may control the capabilities of the agent 101, such as allowing or preventing write and / or read access to one or more directories and / or files, allowing or preventing the creation of new files and / or directories, and / or the like. The agent 101 may execute multiple loops of inference requests to the machine-learning model 114 to iteratively generate a response 120 (e.g., output) that is provided to computing device 102.

[0147] In non-limiting embodiments, permissions may prevent an agent 101 from writing to certain files and / or directories (e.g., core agent configuration files, user-defined agent skills, user-specified instructions, tool definitions, and / or the like). The agent 101 may be enabled to write to other files and / or directories (e.g., such as a scratchpad directory for intermediate result storage, a context directory, a user pattern directory, a workspace directory, and / or the like). In non-limiting embodiments, one or more directories and / or files may be accessible by a user such that the user can write to an upload directory (e.g., for provided context), a user preference directory, and / or the like. In non-limiting embodiments, permissions allow for a shared workspace to be used by multiple agents, such that some files and / or directories may be immutable whereas others are mutable. As an example, a scratchpad and / or other collaborative document or data element may be mutable and accessed by multiple agents to communicate with each other and / or share data. Entries in the scratchpad or other shared document may be identified by the agent that created and / or modified the entry, allowing for debugging, auditing, and / or data recovery, as examples. In this manner, versions of the file system and / or shared document may be maintained for the option of reverting back to a prior version. It will be appreciated that permissions may be modified to provide different levels of access to agents, orchestrators, and users.

[0148] In non-limiting embodiments, the agent 101 may use the file system 104 to write intermediate results (e.g., outputs from tools and / or models that may be used in further inference requests) to files, read portions of one or more files relating to a task (e.g., entire files or a certain number of characters, lines, and / or the like), search files (e.g., using keywords or semantics), create directory structures to organize outputs, parse earlier-created files when historic context becomes relevant in a new chatbot session or for another task, create multi-file software applications, and / or other like actions. The agent 101 may perform these actions by executing one or more scripts generated by the machine-learning model 114. In non-limiting embodiments, multiple agents may be executed to collaborate within the same directories and / or files.

[0149] In non-limiting embodiment, through interaction with the file system 104, agents 101 manage the context for inference requests made to the machine-learning model 114 instead of, or in addition to, retrieval-augmented generation (RAG) techniques. For example, non-limiting embodiments may utilize the file system 104 for managing model context instead of, or in addition to, context management systems, such as arrangements of Model Context Protocol (MPC) servers. Further, non-limiting embodiments may work in conjunction with MPC servers and / or other like systems to provide streamlined access to context data and to reduce the number of external calls required to interact with the MPC servers (e.g., by storing query results in the file system 104 for repeated use). In some non-limiting embodiments, the file system 104 may be used as an MPC resource with one or more interfaces, such as APIs, to facilitate context retrieval.

[0150] In non-limiting embodiments, the agent 101 may be programmed to discover and invoke tools as callable functions from code, rather than through static schema injections. For example, an agent 101 may be able to use tools dynamically as if the tools were functions in a programming language, rather than relying on a predefined, static list of tools provided to the agent initially and inserted into the system prompt of every inference request the agent generates. In non-limiting embodiments, tools are exposed to the agents as callable functions in a code environment (e.g., via scripts coded in Python, TypeScript, Bash, and / or the like), such that an agent (e.g., by executing a script and / or command it generates through a machine-learning model) may discover available tools at runtime (e.g., list all tools in a namespace), invoke tools dynamically by passing arguments like a function call, and chain tools together in scripts or workflows. This allows for an agent 101 to generate a script to search for a tool (e.g., find_tool(“database_search”)) and then call that same tool (e.g., database_search(query=“keyword”)) from another generated script to return a tool result (e.g., an output of the search tool). In this manner, the inference request made to the machine-learning model 114 does not need to include all the available tools as context.

[0151] In non-limiting embodiments, the file system 104 may be stored as versions such that previous versions of the file system 104 can be restored to recreate a response and / or the like. Such versioning can be implemented on a commit-based approach, as an example. Maintaining versions over time may be used to debug a project, agent, and / or model, allows for recovery of deleted or overwritten files, allows for branching into alternative approaches without losing work, and provides a full history of model performance for auditing and / or other purposes.

[0152] Referring now to FIG. 2, a flow chart is shown for implementing an agent as discussed in connection with FIG. 1 and according to non-limiting embodiments. The steps shown in FIG. 2 are for example purposes only. It will be appreciated that non-limiting embodiments may involve additional steps, fewer steps, different steps, and / or a different order of steps. In some non-limiting embodiments or aspects, a step may be performed automatically in response to the completion of a previous step (e.g., may be performed without user intervention upon the completion of a previous step). The steps shown in FIG. 2 may be performed by one or more computing devices, such as computing device 100 shown in FIG. 1.

[0153] At step 200, a request for an output is received from a user (e.g., a user input prompt) or from another agent (e.g., such as an orchestrator). At step 201, the request may be processed by the receiving agent. In some examples, the agent that processes the request at step 201 may be an orchestrator, such as a main agent of a plurality of agents. At step 202 the agent (e.g., an orchestrator and / or another agent) may generate an inference request for a machine-learning model based on the request (e.g., including at least part of request and / or derived from the request). Generating an inference request may include adapting a system prompt, adding a main prompt, and / or modifying the content of a context window, as examples. The inference request may include instructions for the machine-learning model to return a particular output, such as an identification of one of more tools that can be used to perform a further task, a script to execute to perform a task, a command (e.g., such as an API request) to execute to retrieve further information, and / or the like. In some examples, the inference request may prompt a machine-learning model to return orchestration logic for a requested output that can be processed by the agent to commence orchestrating tasks with one or more other agents.

[0154] At step 204, the machine-learning model processes the inference request and generates an output that is returned to the agent at step 206. The receiving agent may determine at step 208 if the output received at step 206 satisfies the request received at step 200 (e.g., matches a desired output and can be used as a completed and / or final output). As an example, an additional inference request to a machine-learning model may be used for such a determination. If the output is determined to be a completed output, the method may proceed to step 214 and the output may be provided to the requesting user or system (e.g., directly or after processing the output further).

[0155] At step 210, the agent may process the output and perform an action. As an example, an initial output from the machine-learning model may identify tasks that need to be performed and / or orchestrated and, based on an inference request instructing use of the file system, the output may include instructions for the agent to utilize the file system and / or other agents in specific ways. The agent may execute its own internal deterministic logic and / or may execute one or more scripts and / or commands it receives from the machine-learning model. For example, the output may instruct an agent to search the file system, to store the results in new standalone files with specified names, and to perform a first search in folders to find specified text or similar text.

[0156] In some examples, the agent may execute a script and / or command that already includes the search term(s) as parameters, such that the agent logic recognizes a script is received and automatically executes that script using a code execution tool or the like. In some examples, the agent may parse the output with logic to identify the search term(s) and the storage locations, perform the search (e.g., a keyword or semantic search) by executing a script and / or command, and return the initial result to the machine-learning model in a next turn. In non-limiting embodiments, the agent may determine to parse or search the output to determine if a tool or tool call can be used through one or more additional inference requests. In some non-limiting embodiments, the agent may, based on the output, retrieve information to be used in further inference requests from local data storage and / or remote sources via APIs and / or the like. In such examples, the output from the machine-learning model may be a structured API call and / or script for retrieving the data that can be executed directly by the agent. In non-limiting embodiments, the agent may, based on the output, make a standalone call to a machine-learning model to convert a natural language task into an executable command that can be processed by an agent and / or tool.

[0157] With continued reference to FIG. 2, a single request-response cycle of steps 202, 204, 206, 208, and 210 may be referred to as a “turn.” Each turn may include multiple tool calls and / or other actions performed at step 210. The results of one or more actions from step 210 (e.g., the results of a search performed by a search tool may include a list of named folders in the file system 104) may be added to the growing context window at step 212 that is used to generate a next inference request at step 202. The next inference request may also include the previous prompts and / or messages as context. In response, the machine-learning model generates another output that is returned to the agent, which uses its logic to process the output. Steps 202, 204, 206, 208, 210, and 212 may be repeated until the output is determined to be completed (e.g., determined by the agent and / or machine-learning model to match the requested objective) at step 208.

[0158] Non-limiting embodiments of systems, methods, and computer program products for implementing machine-learning tools with a file system, as described herein, provide for an efficient use of machine-learning tools and corresponding tool results. For example, by searching tool definitions from tool files arranged in a file system, implementations described herein reduce the size of the context window by reducing the number of tokens for a machine-learning model to process. Including all tools in each inference request creates a processing burden for the agent and machine-learning model that is solved through the use of tool descriptions arranged in a file system as described herein. Non-limiting embodiments allow for an agent to customize the tools exposed to the machine-learning model through iterative inference requests that parse, search, and / or extract tool information on a dynamic basis for a given task.

[0159] Moreover, the size of a context window in an inference request may be reduced by storing tool results in a file system and selectively using the tool results in subsequent inference requests. Approaches that continually add successive tool results to a growing context window can create a processing burden for the agent and machine-learning model, and can lead to exceeding context size limitations, thereby losing older context data that may be relevant for an inference request and affecting the accuracy of the outputs. Non-limiting embodiments described herein solve this problem by allowing an agent and / or machine-learning model to dynamically select the context that it uses through iterative inference requests.

[0160] Referring now to FIG. 3, a system 3000 for implementing machine-learning tools with a file system is shown according to non-limiting embodiments. FIG. 3 shows a plurality of tools 300 including tools 122, 124, 126, 128, 130, 132. The tools 300 are shown grouped together in FIG. 3 for ease of reference, but it will be appreciated that the tools 300 may be arranged in different locations local and / or remote to the computing device 100 and / or machine-learning model 114. The tools 300 may be called with one or more tool calls, such as API calls, programmatic function calls, shell commands, and / or the like. The tools 300 may each correspond to tool files stored in the file system as individual files (e.g., tool1.ts, tool1a.ts, tool2.ts, tool3.ts, etc.).

[0161] In non-limiting embodiments, the tree structure 306 of the tool directories and tool files may be used to generate an inference request input into the machine-learning model 114. For example, the tree structure 306 may be inserted into a context window of an inference request. An initial output of the machine-learning model 114 based on such an inference request may identify one or more directories and / or files from the file system 104 to be used and / or searched further to identify relevant tools. For example, if an output identifies the directory of “Tool1” (which may be named, for example, “web_search_tool” to identify a tool function), the agent 101, in response to the output, automatically extracts at least a portion of the content of the files in that directory, tool1.ts and tool1a.ts, and uses the extracted content to generate a next inference request. A next inference request may include tool definitions extracted from the tool files that can be used to generate an inference request with a system prompt that instructs the machine-learning model 114 to generate a tool call using the tool definitions. In some examples, an inference request may identify which tools the model can utilize in the system prompt and the model may then select the tool in a next response by generating a script and / or command to retrieve the tool definitions.

[0162] With continued reference to FIG. 3, in non-limiting embodiments each tool file includes a tool definition that corresponds to a tool 300. As used herein, the term “tool definition” may refer to data representing one or more parameters, descriptions, and / or instructions relating to a tool. For example, a tool definition may include a list of input parameters for a tool, an expected output format, and / or one or more function calls used to interact with the tool. As an example, a tool definition may include parameters for an API schema and / or the like. In non-limiting embodiments, each tool definition also includes a tool description that explains what the tool does in narrative textual language. The tool description may be generated by one or more machine-learning models 114.

[0163] In non-limiting embodiments, tools (e.g., tools 122-132) may include file system tools, such as a read tool to read file contents (e.g., read(path, options)) with or without line ranges, a write tool to write contents to a file (e.g., write(path, content)), a search and replace tool to search for text and to replace it with a string within a file (e.g., search_replace(path, search string, replace string)), a file system listing tool to list directory contents recursively up to a specified depth (e.g., tree(path, depth)), a keyword search tool (e.g., grep(pattern, path)), a semantic search tool (e.g., search(query, path)), a code execution tool (e.g., run_bash(cmd), run_typescript(code), and / or the like), and / or other like tools to read, write, and / or manipulate the file system 104. The tools 122-132 may also include a command tool to run a bash command (e.g., run_bash(cmd)) and / or other type of shell command, a script execution tool that can execute scripts and import from other available tools (e.g., run_typescript(code)), a tool to rename files or directories, a tool to add directories, and / or one or more Model Context Protocol (MCP) tools.

[0164] In non-limiting embodiments, the tool definitions stored in the tool files include information usable to execute each individual tool 122-132. For example, if the tool definitions of tool1.ts and tool1a.ts are used to generate a new inference request, the output of that inference request after being processed by the machine-learning model 114 may include tool calls, such as a function call to Tool1, an API request used by the tool to query an external system (e.g., data storage 302 or the like), a script used to execute the tool with given parameters (e.g., to execute a tool call), and / or the like. In non-limiting embodiments, each directory of the file system 104 (e.g., Tool1, Tool2, Tool3) may correspond to a different tool or set of related tools.

[0165] As an example, a file system may include the following directory structure:

[0166] / tools /

[0167] mcp-servers /

[0168] slack /

[0169] send-message.ts

[0170] list-channels.ts

[0171] search-messages.ts

[0172] github /

[0173] create-pr.ts

[0174] list-issues.ts

[0175] add-comment.ts

[0176] custom-api /

[0177] query-database.ts

[0178] The above example shows tools for MCP servers relating to Slack, Github, and custom APIs, each in an individual subdirectory to be discovered by an agent 101. In non-limiting embodiments, each tool file may include a script, such as a TypeScript file with type definitions as shown in the above example. The directory names may identify a category and / or subcategory of tools, such that “mcp-servers” identifies MCP tools and “slack” identifies tools specific to Slack. The file names may identify a specific tool within a tool category, such as “send-message” in Slack. In this manner, keyword and / or semantic comparisons may be used to identify an appropriate directory and / or tool file for a specified task based on the directory names and / or file names. It will be appreciated that various types of tool categories and tools may be used.

[0179] As an example, a tool for sending a message on a messaging platform may define a channel name parameter as a string type, a message content parameter as a string type, and a thread timestamp parameter as a string type. The tool file may also include a function call that can be executed in a code execution environment. Based on the content of the tool file, a machine-learning model 114 may return an executable command and / or script that uses the expected parameters. In a non-limiting example, a tool file may be stored in the file path of the file structure as / tools / mcp-servers / slack / send-message.ts and with the following content:

[0180] / **

[0181] *Sends a message to a Slack channel or user.

[0182] *

[0183] *@example

[0184] *await sendMessage ({channel: “#engineering”, text: “Deployment complete!”})

[0185] * /

[0186] export async function sendMessage (params: {

[0187] / ** Channel name (e.g., “#general”) or user ID * /

[0188] channel: string;

[0189] / ** Message content. Supports Slack markdown. * /

[0190] text: string;

[0191] ** Optional thread timestamp to reply in thread * / thread_ts?: string;

[0192] }): Promise<{ok: boolean; ts: string}>;

[0193] The above example tool file includes a description of “Sends a message to a Slack channel or user” that can be searched to identify an appropriate tool. The description also includes an example of a tool call using example parameters. The description is commented out in the example tool file so that the description is not interpreted as program code in examples in which the tool file is a script. It will be appreciated that different notation formats and syntax may be used for different types of scripts. In the above example, if a request involves an action on Slack, the machine-learning model 114 may instruct the agent 101 to return the content of the “ / slack” directory (e.g., by generating a script for the agent 101 to execute that reads the contends of the directory), in response to which the machine-learning model 114 may identify “send-message.ts” as the tool file to use based on the description. The agent 101 may then return the full tool definition from the tool file if not already provided (e.g., by executing a script generated by the machine-learning model 114 to read the content of the tool definition), and the machine-learning model 114 may return an executable script that calls the function “sendMessage” with specified parameters. The agent 101 may execute this script and return a confirmation or other result to the machine-learning model 114 and / or store the output of the script (e.g., the tool result) in the file system 104.

[0194] As another example, a request for an output may ask for a report on a research topic. The agent 101 may first execute a turn to discover available tools 300. The agent may then execute a next turn to use a web search tool (e.g., tool 122) to search public webpages for information and to return copies of the information. Such a search may involve generating a script to execute the search tool (e.g., through rules-based logic or through a machine-learning model 114), writing the script to the file system 104 such that it can be used at another time, and executing the script to retrieve the information as a tool result. A third turn of the agent 101 may invoke a summarization tool (e.g., tool 124) to condense the tool result obtained from the search. This may involve, for example, generating and executing a script with a tool call to a summarization tool (e.g., tool 126), which returns a condensed summary of the information obtained from the web search. A fourth turn of the agent 101 may invoke a translation tool (e.g., tool 128) to translate the summary to another language, as an example. If new tools become available, the agent 101 may identify those tools by including the file structure (e.g., tree structure 306) in a next inference request for a next iteration.

[0195] With continued reference to FIG. 3, in non-limiting embodiments the tool results 300 (e.g., an output from execution of the tool, such as search results, a generated script, and / or the like) may be stored to the file system 104. For example, if the agent 101 executes a tool 300 for retrieving external data from an API, the data payload may be stored as a file in the file system 104. In non-limiting embodiments, the file may include a textual description of the tool result. For example, a tool result may be processed with a machine-learning model 114 to generate a summary that is stored in association with the full tool result. As another example, a tool may return metadata and / or other information that can be used for a textual description of the output. The tool results may be stored in a directory for the tool (e.g., Tool1), in a directory for a current task, in a directory for a category of the tool result, and / or the like.

[0196] In non-limiting embodiments, a reference to the file path (e.g., / context / tool-results / search.json) and a textual description (e.g., “web search results for company A”) of the tool result is maintained in the context window used by the agent 101 to generate further inference requests without including the full tool result. In this manner, the context maintains knowledge of the tool result and facilitates the machine-learning model 114 and / or agent 101 to locate the tool result without having to include the entirety of the result in the context. The tool result may be references in context as in the following example format: “[Tool Result: Database query returned 1,247 users matching criteria]→Full results: / context / tool-results / query-database-abcd1234.csv”. In this example, a textual description indicates the type of query and a summary of the content. A reference to full tool result is provided as a file path to the file system 104. This text may be added to a context window used by the agent 101 while the full tool result is maintained in the file system 104 without being added to the context.

[0197] Based on the tool results stored in the file system 104, a search process to identify relevant context data may search the full tool result and / or a summary of the tool result. The file may be stored under a directory for that tool, under a directory for the category of information, under a directory for all tool results, and / or the like. In non-limiting embodiments, the tool result may be stored in a dedicated directory (e.g., / context / tool-results / ) with a file name that reflects the tool that was used (e.g., get-weather-abc123.json, query-database-abcd456.csv, web-search-xyz432.md, and / or the like). In some examples the file name may identify one or more parameters of the tool result, such as a search string. Tool results may be stored in the native file format of the returned data (e.g., a script, structured data such as JSON, CSV, and / or XML, markdown files, and / or the like).

[0198] Still referring to FIG. 3, in non-limiting embodiments the tool result may be stored in the file system 104 in response to satisfying a size-based threshold. For example, tool results that are at least a predetermined length or size (e.g., number of lines, number of characters, number of bytes, and / or the like) may be automatically stored in the file system 104, whereas tool results that do not satisfy the threshold may not be stored in the file system 104 and may persist in the expanding context window used by the agent 101 to make inference requests. In this manner, tool results that exceed a predefined or dynamically determined size limit may be referenced in model context by file path and description, and tool results that do not exceed such a size may be maintained in the model context. It will be appreciated that, in other non-limiting embodiments, all tool results may be stored to the file system 104 regardless of size.

[0199] With continued reference to FIG. 3, after a tool result is stored in the file system 104, it may be accessed for subsequent actions, such as subsequent inference requests. For example, a further turn of the agent 101 may involve executing scripts and / or file system commands to search for and retrieve data. The agent 101 may generate and execute program code, such as a script, to search the file system 104 and retrieve some or all the stored tool result. The tool results stored in the file system 104 may be searched with any technique (e.g., keyword search, semantic search, and / or the like). A command executed by the agent 101 to retrieve a tool result may retrieve the full tool result and / or a portion of the tool result (e.g., a number of lines or characters surrounding a search match). For example, the first 50 lines may be returned as a sample so that the machine-learning model 114 can determine if more content is needed on a next turn.

[0200] Referring now to FIG. 4, a flow chart is shown for implementing machine-learning tools with a file system according to non-limiting embodiments. The steps shown in FIG. 4 are for example purposes only. It will be appreciated that non-limiting embodiments may involve additional steps, fewer steps, different steps, and / or a different order of steps. In some non-limiting embodiments or aspects, a step may be performed automatically in response to the completion of a previous step (e.g., may be performed without user intervention upon the completion of a previous step). The steps shown in FIG. 4 may be performed by one or more computing devices, such as computing device 100 shown in FIG. 1. In some examples, the steps may be performed by one or more agents executed by a computing device, such as agent 101 shown in FIG. 1.

[0201] At step 400 of FIG. 4, a hierarchical file system may be created. This step may be performed over time as the system is utilized or may be performed at once based on a provided workspace. The file system may be unique to a user and / or entity (e.g., such as an organization). At step 402, tool definitions are generated for each tool. Tool definitions may be generated automatically (e.g., using a machine-learning model) and / or manually based on each tool of a plurality of different tools. The tool definitions may be stored in the file system created at step 400. As an example, at least one file for each tool may be created and one or more parameters and / or function calls for the tool may be stored in the file. The tool definitions may include program code and / or code templates, as examples. Each file may also include a textual description of the tool functionality and / or tags or keywords to identify the tool.

[0202] At step 404, an inference request is generated based on the file system. For example, the file system structure of the file system may be input into a machine-learning model with a prompt by an agent. The file system structure may be included in a context window of an inference request. The file system structure may include a tree of directories and / or files in directories. The tree may identify the elements of the file system as directory names and / or file names. A machine-learning model processes the inference request and returns an identification of one or more tools to the agent at step 406. For example, a machine-learning model may identify one or more tools from directory names and / or file names from the file system structure. At step 408 the agent searches the tool definitions by parsing the content of one or more files and / or directories identified by the machine-learning model. The search may extract tool definitions from each identified file to return to the model in a next turn. In non-limiting embodiments, tool descriptions for all available tools and corresponding file system paths for related tool files may be included in a context window of an inference request.

[0203] At step 410, the tool definitions may be used to generate program code, such as a script and / or command, to execute the tool. For example, the tool definitions may be input into a machine-learning model with a prompt by an agent, and the machine-learning model may return a script for the agent to execute. The program code may include a script and / or command to search a database, to search part of the file system for previous tool results, to search the web or other resource, to read or write to the file system, and / or the like. At step 412 the program code is executed to produce a tool result, which is stored at step 414. The tool result may be stored in the file system. For example, the tool result may include the return payload from an API request, a search query, a code generation tool, and / or the like. A file path to the tool result, along with a description of the tool result, may be maintained in a context window.

[0204] Referring now to FIG. 5, a flow chart is shown for implementing machine-learning tools with a file system according to non-limiting embodiments. The steps shown in FIG. 5 are for example purposes only. It will be appreciated that non-limiting embodiments may involve additional steps, fewer steps, different steps, and / or a different order of steps. In some non-limiting embodiments or aspects, a step may be performed automatically in response to the completion of a previous step (e.g., may be performed without user intervention upon the completion of a previous step). The steps shown in FIG. 5 may be performed by one or more computing devices, such as computing device 100 shown in FIG. 1. In some examples, the steps may be performed by one or more agents executed by a computing device, such as agent 101 shown in FIG. 1.

[0205] At step 500, a tool result is received as a result of executing a tool. For example, the tool result may include the return payload from an API request, a search query, a code generation tool, and / or the like. At step 502 it is determined whether the tool result satisfies a size threshold. For example, a threshold may include a number of lines and / or a file size (e.g., 50 MB). If the size of the tool result is not large enough to satisfy the threshold, the process may continue to step 504 and the entire tool result may be maintained as model context. For example, the tool result may be added to a growing context window used for iterative inference requests made by an agent.

[0206] If, at step 502, the size of the tool result satisfies a threshold, the method may proceed to step 506. In non-limiting embodiments, step 502 may be omitted, and the method may proceed from step 500 to step 506 directly. At step 506, a description of the tool result may be generated. For example, a machine-learning model may be used to generate a summary of the tool result to effectively compress the tool result. At step 508, the tool result may be stored in the file system. For example, a new file may be created in a directory for tool results and / or a current task, and the tool result may be written to the new file. In some examples, the tool result may be stored in an existing file with other related tool results by the agent writing the results to the file (e.g., concatenating the results to the file contents and / or the like). The description of the tool result generated at step 506 may also be stored in the file with the full tool result. At step 508, a reference (e.g., a pointer, such as a file system path) and the tool result description may be maintained as model context. For example, the reference to the tool result and the description may be added to a context window used for iterative inference requests made by an agent.

[0207] At step 510, tool results stored in the file system may be searched. In non-limiting embodiments, step 510 may be performed at a later time, such as a task performed by an agent in a subsequent turn or task, and not immediately after step 508. However, step 510 may be performed immediately after step 508 as a next turn. Step 510 may be performed in response to an output from a machine-learning model that identifies relevant tool results from one or more tool result descriptions provided as context. For example, a machine-learning model may output a script and / or command to be executed by an agent that searches one or more tool results at a specified file path. The agent may retrieve the tool result at step 512, which may include an entire tool result, a sample of the tool result (e.g., a first number of lines or pages), or a selection of the tool result (e.g., a number of lines before and after an identified keyword). The retrieved tool result may then be used to generate a subsequent inference request at step 514. In this manner, the context of the inference request may only include the tool results relevant to a task rather than irrelevant tool results from each previous execution of a tool. The method may proceed with a repetition of inference requests, one or more of which may include additional searches of the tool results and / or execution of one or more tools to produce additional tool results.

[0208] Agent skills may facilitate the performance of a task that includes several different subtasks and / or processes. However, agent skills may not be known to an agent and / or machine-learning model, leading to less efficient loops of inference request iterations to complete a task that may be accomplished in a more efficient way (e.g., using fewer processing cycles, tokens, and / or inference requests). Accordingly, in non-limiting embodiments, implementing agent skills with a file system allows for agents and / or machine-learning models to explore and access predefined agent skills by searching a file system. In this manner, all available agent skills do not need to be included in all inference requests, reducing the context size. Through iterations of multiple inference requests, agent skills may be identified and executed, avoiding unnecessary and achieving accurate results that are consistent across multiple uses.

[0209] Referring now to FIG. 6, a system 6000 for implementing agent skills with a file system is shown according to non-limiting embodiments. In the system 6000, files stored in the file system 104 may correspond to one or more agent skills. As used herein, the term “agent skill” may refer to instructions, scripts, templates, executable applications, context data, tools, and / or resources to perform a task that can be repeated numerous times to automate workflows. Each agent skill may be purposed for a specialized task composed of a plurality of different subtasks performed by one or more agents. In some examples an agent skill may include a sequence of tasks that are performed in order and / or in parallel. An agent skill may include one or more directories in a file system 104. An agent skill file may include a description of the agent skill and a series of instructions to enable an agent 101 to orchestrate the steps. In some non-limiting embodiments, the agent skill files may include one or more scripts configured to execute one or more tasks of the agent skill. Agent skills may be predefined and / or created by a user. In some examples, a library of agent skills may be made available to users, and users may modify the agent skills and / or create their own agent skills.

[0210] In non-limiting embodiments, agent skills may include document generation and management processes, such as multi-step PDF processing, slide deck manipulation and / or generation, text document manipulation and / or generation, video manipulation and / or generation, audio manipulation and / or generation, and / or the like. Agent skills may include specific types of document processes, such as sales report generation, academic article drafting, patent application drafting, pitch deck creation, and / or the like. Agent skills may include coding skills, such as program code review, debugging, frontend design, program code optimization, and / or the like. Agent skills may include business skills, such as lead generation or customer relationship management (CRM), employee training, and / or the like. Each agent skill corresponds to one or more agent skill files including instructions, scripts, templates, context data, tools, and / or resources related to the agent skill.

[0211] With continued reference to FIG. 6, in non-limiting embodiments the agent 101 may search the descriptions of agent skills stored in each agent skill file with a command and / or script generated by the machine-learning model 114. In some examples, agent skill descriptions for all available agent skills and corresponding file system paths for related agent skill files may be included in a context window of an inference request. In other examples, in response to a request for an output, the agent 101 may search the agent skill files to identify one or more agent skills that can be used to perform a process to produce the output. A data structure representing the file system 104, such as a tree, may be included as context in an inference request to a machine-learning model 114 to identify one or more directories and / or agent skill files. The file names and / or directory names may be used to identify one or more agent skill files in some examples. On a next turn, the agent 101 may then retrieve the agent skill descriptions and / or scripts for the identified agent skill files and use the content for a next inference request.

[0212] As an example, the file system may include the following file structure under a “skills” directory:

[0213] git-commit /

[0214] instructions.md

[0215] commit-template.sh

[0216] code-review /

[0217] instructions.md

[0218] review-checklist.md

[0219] deploy-to-staging /

[0220] instructions.md

[0221] deploy.sh

[0222] In the above example, the directory names “git-commit”, “code-review”, and “deploy-to-staging” refer to different agent skills that may be discovered by the machine-learning model 114 based on the file system 104. The agent skills may be discovered by the agent 101 reading agent skill descriptions that may be included in the “instructions.md” markdown file and / or in any other file in the corresponding agent skill directory. An agent skill file may also include a script (e.g., such as a shell script like “deploy.sh”) that can be executed based on the instructions. An agent skill file, such as “instructions.md”, may identify one or more tools that are used to perform the agent skill, such as one or more file system paths to tool definitions stored in the file system 104.

[0223] Referring now to FIG. 7, a flow chart is shown for implementing agent skills with a file system according to non-limiting embodiments. The steps shown in FIG. 7 are for example purposes only. It will be appreciated that non-limiting embodiments may involve additional steps, fewer steps, different steps, and / or a different order of steps. In some non-limiting embodiments or aspects, a step may be performed automatically in response to the completion of a previous step (e.g., may be performed without user intervention upon the completion of a previous step). The steps shown in FIG. 7 may be performed by one or more computing devices, such as computing device 100 shown in FIG. 1. In some examples, the steps may be performed by one or more agents executed by a computing device, such as agent 101 shown in FIG. 1.

[0224] At step 700, a request for an output is received from a user (e.g., a user input prompt) or from another agent (e.g., such as an orchestrator). At step 702, the request may be processed by the receiving agent to generate an inference request. In some examples, the agent that processes the request may be an orchestrator, such as a main agent of a plurality of agents. The inference request may be generated based on a file tree structure. For example, the file tree structure representing a file system may be input into a context window of an inference request. At step 704 the inference request may be processed by a machine-learning model. For example, the inference request may provide the request from step 700 and the file tree structure, and the machine-learning model may return an output indicating if there are any agent skills available to complete the request. The machine-learning model may determine whether there are agent skills available by parsing the tree structure and comparing directory names and / or file names from the tree structure to the request. At step 706, if there are available agent skills, the method may proceed to step 710. If no agent skills are available at step 706, the method may proceed to step 708 the output of the machine-learning model may be returned to the agent and / or user.

[0225] With continued reference to FIG. 7, if agent skills are available at step 706, the directories and / or files may be searched for agent skill descriptions at step 710. For example, step 710 may involve extracting agent skill descriptions from one or more agent skill files identified at step 706. This extraction may be performed by executing a script generated by the machine-learning model and returned at step 704. The extracted agent skill descriptions may then be used to generate another inference request by including it as context and / or in a system prompt. That inference request may be processed by the machine-learning model to determine what agent skill(s) should be used out of a plurality of agent skills identified at step 706. If agent skills are not applicable based on the description, the method may proceed to step 708. If agent skills are applicable at step 712, the method may proceed to step 714, and another inference request may be generated based on the identified agent skill files. In some examples, one or more commands and / or scripts in the agent skill file(s) may be executed by the agent following step 712. At step 716, an orchestrator may be configured to perform the agent skill.

[0226] In non-limiting embodiments, intermediate results of an agent and / or machine-learning model (e.g., outputs occurring within multiple iterations of an agent loop) may be stored as memories within a file system to enable efficient searching and dynamic context. Messages and final results may also be stored in the same manner within a file system. Such an arrangement avoids lossy compression that may be used to manage context from previous outputs in a growing context window. By including a description and file path in the context window, non-limiting embodiments provide the machine-learning model with information that can be used to dynamically retrieve context data on an as-needed basis. This allows for inference requests to be generated with the entirety of context data that may be needed, allowing for relevant context to be prioritized over irrelevant context.

[0227] Referring again to FIG. 3, in non-limiting embodiments, messages from chatbot interactions and intermediate steps taken by an agent, including requests, prompts, outputs, and / or the like, may be stored to the file system 104 and a reference (e.g., a description and file path) may be maintained in the context of successive inference requests. For example, the context may include: “[Turns 1-50: User explored options for authentication. Decided on OAuth2. Key decisions: (1) use passport.js, (2) store sessions in Redis, (3) implement refresh tokens]→Full transcript: / context / conversation / turn-001-to-050.md”. This context provides a description of the previous interaction and a file path to the file storing the full context. Such an approach improves upon lossy compression by using only summaries without maintaining the full context.

[0228] In non-limiting embodiments, the messages may be identified based on the turn of the agent 101. A file system 104 directory (e.g., / context / conversation / ) may include messages and outputs from turns 1 through 50 in a markdown file “turn-001-to-050.md” that is identified as “#Early exploration phase” within the file. This file path (e.g., / context / conversation / turn-001-to-050.md) may be maintained as context in successive inference requests such that the full messages and outputs do not need to be maintained. Such an arrangement allows for the messages and outputs to be compressed for reference and facilitates searching by a machine-learning model and the retrieval of the full content if requested by the model. These stored memories may be used to debug the reasoning behind a decision or action. The turns may be grouped by agent task (e.g., turn-051-to-100.md for “#Requirements gathering” and turn-101-to-150.md for “#Implementation discussion.” The grouping may be based on a predefined number of turns (e.g., every 50 turns, every 100 turns, and / or the like), a change in category of the task being performed, and / or other parameters.

[0229] Still referring to FIG. 3, in non-limiting embodiments an inference request to the machine-learning model 114 may include a system prompt that identifies one or more tools that the machine-learning model 114 can utilize (e.g., cause the agent to execute) with its output. In this manner, all or a subset of tools 300 may be identified to the machine-learning model 114 in an inference request to control and / or restrain the output of the machine-learning model 114. As an example, an inference request may identify one or more specific search tools to allow the agent 101 to control what type of search tool calls are used. By dynamically adapting system prompts, an agent 101 is enabled to search previously stored tool results and / or messages (e.g., such as previous chatbot interactions). As an example, a system prompt may specify: “only_allowed_tools=bash & grep & semantic search tool”, which instructs the machine-learning model 114 to generate a script and / or command using the identified methods of search.

[0230] The machine-learning model 114 chooses which tool(s) to search with based on other context and / or prompts. For example, if a request and / or message in a chatbot interaction mentions explicit filenames, the machine-learning model 114 may select a keyword search tool (e.g., a grep search) and generate a tool call for that specific filename. As another example, if a request and / or message in a chatbot interaction is discussing ambiguous and / or vague concepts, or uses varying or shifting terminology, the machine-learning model 114 may determine to use a semantic search tool. In this manner, the machine-learning model 114 may dynamically determine a search tool to use for each successive turn. The agent 101 may execute multiple turns to iteratively search for context to include in an inference request, and such iterations may use one or multiple different search tools.

[0231] In non-limiting embodiments, searching past chatbot interactions may include identifying user preference data, which may include one or more user preference parameters for controlling the output of the machine-learning model, such as the format, style, and / or content of the output. User preference data may include a preferred coding language or syntax style, a preferred debugging approach, a preferred conversational tone, a preferred writing style, and / or the like. The user preference data may be identified from stored messages and / or patterns. In some examples, the machine-learning model 114 may be prompted by the agent to analyze user preferences from a chatbot interaction and to store the preferences in a directory in the file system 104. The identification and storage of user preference data may be performed throughout a chatbot interaction and / or when a chatbot interaction terminates with a final output, changes topics, and / or the like. The user preference data may pertain to a specific user or all users of an entity, such as an enterprise. As an example, a file structure of the file system 104 may include:

[0232] / memories /

[0233] user-preferences /

[0234] coding-style.md

[0235] communication-preferences.md

[0236] project-knowledge /

[0237] architecture-decisions.md

[0238] team-members.md

[0239] learned-patterns /

[0240] how-user-likes-commits.md

[0241] preferred-testing-approach.md

[0242] In the above example, memories of chatbot interactions are categorized as user preferences, project knowledge, and learned patterns. Rather than retrieving numerous stored messages and chatbot interactions regardless of relevancy (e.g., based on a time period or token limit), non-limiting embodiments may search the stored memories of chatbot interactions to retrieve only relevant context data. For example, referring to the above example, during a chatbot interaction a user may mention a “CTO” of their organization. The machine-learning model 114 may return a command and / or script to search the directory (e.g., / memories) for “CTO” using a keyword-based search (e.g., grep -r “CTO” / memories / ). This may return the file team-members.md and / or the extracted content of the file. In this manner, rather than include the content of all six (6) files stored in memories of chatbot interactions, the agent 101 can prepare an inference request with only the relevant content for discussing the CTO. As another example, if the user requests for program code to be generated, the machine-learning model 114 may return a command and / or script to retrieve files and / or directories having names that semantically match with “preferences” or the like. This may return the directory “ / user preferences” and the files within that directory so that, on a next turn, the agent 101 may communicate user preferences to the machine-learning model 114 for generating the requested program code.

[0243] Referring now to FIG. 8, a flow chart is shown for searching past chatbot interactions with a file system according to non-limiting embodiments. The steps shown in FIG. 8 are for example purposes only. It will be appreciated that non-limiting embodiments may involve additional steps, fewer steps, different steps, and / or a different order of steps. In some non-limiting embodiments or aspects, a step may be performed automatically in response to the completion of a previous step (e.g., may be performed without user intervention upon the completion of a previous step). The steps shown in FIG. 8 may be performed by one or more computing devices, such as computing device 100 shown in FIG. 1. In some examples, the steps may be performed by one or more agents executed by a computing device, such as agent 101 shown in FIG. 1.

[0244] At step 800, a request for an output is received from a user (e.g., a user input prompt) or from another agent (e.g., such as an orchestrator). At step 802, the request may be processed by the receiving agent to generate an inference request. In some examples, the agent that processes the request may be an orchestrator, such as a main agent of a plurality of agents. For example, a request received at step 800 that mentions a “music recording app” may trigger the agent (e.g., such as an orchestrator) to initiate an iterative search process to explore stored memories of past chatbot messages and / or context data. The search results may be successively added to each inference request to inform the next iteration of search. For example, a first inference request at step 802 may include a system prompt that restricts the machine-learning model 114 to bash, grep, and semantic search tools (e.g., allowed_tools=(bash_search, grep_search, semantic_search)). At step 804, the machine-learning model 114 may return a script and / or command that is received by the agent to execute a tool call, such as {tool_call: “[grep search for music OR recording]”}.

[0245] At step 806, the agent (e.g., orchestrator) may determine if further searching is instructed based on whether the response received at 804 as the output of the machine-learning model includes a tool call and / or indication of completion. If the response includes a tool call, the method may proceed to step 808 and the agent may execute the search tool. The tool call may return a portion of a tree structure of the file system 104, such as a directory for “music.” This result is added to the context used for the next inference request at step 810 and the method may loop back to step 802, where the agent generates another inference request that prompts the machine-learning model to search the “music” directory for relevant context data. This inference request may include in the prompt and / or context a result of the search such as, for example, “the grep search tool returned potentially relevant directory / music”.

[0246] At step 804, in a next iteration the next output response of the machine-learning model may return a script and / or command for the agent 101 to execute a further tool call, such as {tool_call: “[bash list subfolders of music]”}. The tool call may be executed at step 808 to identify all subdirectories of the “music” directory and to return the listing of subdirectories in a next inference request. The agent may then generate another inference request at steps 810 and 802 that identifies the subdirectories for potentially relevant context data and again specifies one or more search tools that can be used. This inference request may include in the prompt and / or context a result of the search appended onto the previous result such as, for example, “the grep search tool returned potentially relevant directory / music; the subdirectories are “subfolder1” and “subfolder2.” The next output response of the machine-learning model (e.g., received at step 804) may include a script and / or command for the agent to execute a further tool call at step 808, such as {tool_cal1: “[open subfolder1]”}. This may return a listing of each file in the subdirectory, such as “music_chat_123.txt” and “music_chat_345.txt”. In the next loop, the agent may then generate another inference request that identifies the files for potentially relevant context data and again specify one or more search tools that can be used. This inference request may include in the prompt and / or context a result of the search appended onto the previous result such as “the content of subfolder1 is: music_chat 123.txt and music chat 345.txt.

[0247] The next output response of the machine-learning model (e.g., received at step 804) may include a script and / or command for the agent to execute a further tool call, such as {tool_call: “[open “music_chat_123.txt]”}. This may return the content of the file, such as “The user discussed recording keyboard synthesizer music and expressed difficulties with frequency ranges.” The agent 101 may then generate another inference request that includes the search result, such as “the memories relevant to music are that the user discussed recording keyboard synthesizer music and expressed difficulties with frequency ranges.” The agent may similarly explore each additional subdirectory and file in each subdirectory, appending the results of each successive inference request to the next by looping from step 810 back to step 802 for each iteration. The loop between steps 802 and 810 may be separate and / or independent from a primary chatbot interaction such that the context of the ongoing chatbot interaction does not get affected by (e.g., polluted by) the various prompt-completion pairs that are iterated through for the search process.

[0248] When the agent (e.g., orchestrator) determines there are no further tool calls in the most recent output of the machine-learning model at step 806, the iterative searching may end at step 812 and an output may be generated. At step 812, the last output at step 806 may be added to the original prompt from the initial request. For example, the message that first mentioned a “music recording app” may be accompanied by relevant memories as context (e.g., “the memories relevant to music are that the user discussed recording keyboard synthesizer music and expressed difficulties with frequency ranges”). This may result in a next output of the machine-learning model to refer to the memory (e.g., “You recently discussed a music recording app and used it to record a keyboard synthesizer but had trouble capturing all frequencies”).

[0249] Although FIG. 8 refers to an iterative use of search tools, it will be appreciated that any combination of tools may be used to conduct successive iterations of tool calls for completing a task or subtask. For example, instead of and / or in addition to search tool calls, one or more tools may be used to retrieve external data, manipulate existing contextual data, and / or the like.

[0250] Non-limiting embodiments described herein provide a system and method for application development with a file system that improves upon agent-based application development systems and methods. For example, developers often need to build multi-file projects with separate components, stylesheets, scripts, and / or the like. However, single-file environments may restrict the complexity and scalability of applications that agents can develop or modify. Further, creating a multi-file application with machine-learning models may be inefficient and / or ineffective, since each successive file relies on one or more static files generated previously. By using a file system as a collaborative workspace for agents, multiple agents may create files for an application and the inference requests generated by the agents may dynamically include context from other files in the file system. This allows for existing files to be modified based on subsequently generated files, providing agents with the flexibility to build and iterate on projects as a cohesive, multi-file system. This enhances the capability of agents and improves collaboration and scalability in agent-driven application development workflows.

[0251] Referring now to FIG. 9, a system 9000 for application development with a file system is shown according to non-limiting embodiments. In the system 9000, files stored in the file system 104 may correspond to files of a multi-file application 920 being developed with agent 101 and machine-learning model 114. The file structure 922 of the file system 104 may be used in inference requests generated by the agent 101 to inform the machine-learning model of the structure and dependencies. In this manner, the agent 101 may retrieve the file and / or file content that is needed to generate a next file and / or component of an application. Iterative inference requests for generating an application 920 may include the previously generated files, descriptions of the files, and the file structure 922. In non-limiting embodiments, multiple agents may be executed to collaborate within the same file structure 922 of the file system 104.

[0252] Referring now to FIG. 10, a flow chart is shown for a method of application development with a file system according to non-limiting embodiments. The steps shown in FIG. 10 are for example purposes only. It will be appreciated that non-limiting embodiments may involve additional steps, fewer steps, different steps, and / or a different order of steps. In some non-limiting embodiments or aspects, a step may be performed automatically in response to the completion of a previous step (e.g., may be performed without user intervention upon the completion of a previous step). The steps shown in FIG. 10 may be performed by one or more computing devices, such as computing device 100 shown in FIG. 1. In some examples, the steps may be performed by one or more agents executed by a computing device, such as agent 101 shown in FIG. 1.

[0253] At step 1100, a request for an output is received from a user (e.g., a user input prompt) or from another agent (e.g., such as an orchestrator). For example, the request may include a request to develop a software application. At step 1102, the request may be processed by the receiving agent to generate an inference request. In some examples, the agent that processes the request may be an orchestrator, such as a main agent of a plurality of agents. For example, a request received at step 1100 that mentions “generate an app to edit audio files in JavaScript” may trigger the agent (e.g., such as an orchestrator) to initiate an iterative application development process to generate a multi-file application that includes a front-end, libraries, and the like. The inference request generated at step 1102 may include the tools that the machine-learning model can use via the agent, such as one or more coding tools, compilation tools, file system tools, and / or the like.

[0254] For example, on a first turn the agent may generate an interference request that returns a script for creating an initial directory (e.g., / workspace / my-react-app / ) in the file system. A next turn may execute the script, create the directories, and return the file structure to the machine-learning model in a next inference request. In some non-limiting embodiments, the agent may create the initial directory in the file system with its own logic. On a next turn, the output of the machine-learning model may include program code for a first file (e.g., index.html) and a script to store the program code in the previously created directory. At step 1106, a next turn may be used to determine whether the file should be debugged. An inference request for determining if debugging is needed may include all previously generated files. The file(s) may be modified at step 1114 based on an output of the debugging determination in a further turn. In some non-limiting embodiments, step 1106 may be skipped.

[0255] With continued reference to FIG. 10, if debugging is not needed at step 1106 or if step 1106 is skipped, the agent may execute the script and write the file to the file system at step 1108. At step 1110 the agent, on its own or in a next turn with the machine-learning model, determines whether further development is needed to generate the requested application. This may include executing the program code in the created directory. If the application is not completed, the agent may add the file and / or a reference to the file within the file structure to the next inference request generated at step 1102. The next output of the machine-learning model in the next iteration of step 1104 may include program code for a second file (e.g., styles.css) and a script to store the program code in the previously created directory. This process may continue iteratively, such that the next inference request includes both the first file and the second file, and / or references thereto, to generate a next file of program code until the application is complete at step 1110 and the agent generates the final output 1116 (e.g., an indication to a user that the application is complete, an executable file, the creation of a repository, and / or the like).

[0256] Referring now to FIG. 11, shown is a diagram of example components of a computing device 900 for implementing and performing the systems and methods described herein according to non-limiting embodiments. In some non-limiting embodiments, device 900 may include additional components, fewer components, different components, or differently arranged components than those shown. Device 900 may correspond to the computing device 100 shown in FIG. 1. Device 900 may include a bus 902, a processor 904, memory 906, a storage component 908, an input component 910, an output component 912, and a communication interface 914. Bus 902 may include a component that permits communication among the components of device 900. In some non-limiting embodiments, processor 904 may be implemented in hardware, firmware, or a combination of hardware and software. For example, processor 904 may include a processor (e.g., a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), etc.), a microprocessor, a digital signal processor (DSP), and / or any processing component (e.g., a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc.) that can be programmed or configured to perform a function. Memory 906 may include random access memory (RAM), read only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, optical memory, etc.) that stores information and / or instructions for use by processor 904.

[0257] With continued reference to FIG. 11, storage component 908 may store information and / or software related to the operation and use of device 900. For example, storage component 908 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optic disk, a solid-state disk, etc.) and / or another type of computer-readable medium. Input component 910 may include a component that permits device 900 to receive information, such as via user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, a microphone, etc.). Additionally, or alternatively, input component 910 may include a sensor for sensing information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, an actuator, etc.). Output component 912 may include a component that provides output information from device 900 (e.g., a display, a speaker, one or more light-emitting diodes (LEDs), etc.). Communication interface 914 may include a transceiver-like component (e.g., a transceiver, a separate receiver and transmitter, etc.) that enables device 900 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. Communication interface 914 may permit device 900 to receive information from another device and / or provide information to another device. For example, communication interface 914 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi® interface, a cellular network interface, and / or the like.

[0258] Device 900 may perform one or more processes described herein. Device 900 may perform these processes based on processor 904 executing software instructions stored by a computer-readable medium, such as memory 906 and / or storage component 908. A computer-readable medium may include any non-transitory memory device. A memory device includes memory space located inside of a single physical storage device or memory space spread across multiple physical storage devices. Software instructions may be read into memory 906 and / or storage component 908 from another computer-readable medium or from another device via communication interface 914. When executed, software instructions stored in memory 906 and / or storage component 908 may cause processor 904 to perform one or more processes described herein. Additionally, or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, embodiments described herein are not limited to any specific combination of hardware circuitry and software. The term “programmed or configured,” as used herein, refers to an arrangement of software, hardware circuitry, or any combination thereof on one or more devices.

[0259] Although embodiments have been described in detail for the purpose of illustration, it is to be understood that such detail is solely for that purpose and that the disclosure is not limited to the disclosed embodiments or aspects, but, on the contrary, is intended to cover modifications and equivalent arrangements that are within the spirit and scope of the appended claims. For example, it is to be understood that the present disclosure contemplates that, to the extent possible, one or more features of any embodiment or aspect can be combined with one or more features of any other embodiment or aspect.

Claims

1. A method comprising:generating, with at least one agent executing on at least one computing device, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code;storing, with the at least one agent, the first file in a file system;generating, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request;storing, with the at least one agent, the second file in the file system; andgenerating, with the at least one agent, the application based on the first file and the second file.

2. The method of claim 1, wherein generating the second file comprises:generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; andprocessing the inference request with the at least one machine-learning model.

3. The method of claim 1, wherein the program code of the second file comprises a pointer to the first file.

4. The method of claim 1, further comprising:generating, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, wherein the application is generated based on the plurality of additional files.

5. The method of claim 1, further comprising:automatically modifying, with the at least one agent, the program code of the first file based on the program code of the second file.

6. The method of claim 1, further comprising:generating, with the at least one agent, a third file comprising program code based on the at least one machine-learning model by:generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file and at least a portion of the second file; andprocessing the inference request with the at least one machine-learning model; andstoring, with the at least one agent, the third file in the file system, wherein the application is generated based on the third file.

7. The method of claim 1, wherein the file system comprises a plurality of directories, each directory of the plurality of directories comprising at least one file including program code, and wherein the application comprises the plurality of directories.

8. The method of claim 1, further comprising:executing, with the at least one agent, the application in a runtime environment; anddebugging the application by modifying, with the at least one agent, at least one file in the file system based on executing the application.

9. A system comprising:at least one computing device comprising at least one processor, the at least one computing device configured to:generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code;store, with the at least one agent, the first file in a file system;generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request;store, with the at least one agent, the second file in the file system; andgenerate, with the at least one agent, the application based on the first file and the second file.

10. The system of claim 9, wherein generating the second file comprises:generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; andprocessing the inference request with the at least one machine-learning model.

11. The system of claim 9, wherein the program code of the second file comprises a pointer to the first file.

12. The system of claim 9, wherein the at least one computing device is further configured to:generate, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, wherein the application is generated based on the plurality of additional files.

13. The system of claim 9, wherein the at least one computing device is further configured to:automatically modify, with the at least one agent, the program code of the first file based on the program code of the second file.

14. The system of claim 9, wherein the at least one computing device is further configured to:generate, with the at least one agent, a third file comprising program code based on the at least one machine-learning model by:generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file and at least a portion of the second file; andprocessing the inference request with the at least one machine-learning model; andstoring, with the at least one agent, the third file in the file system, wherein the application is generated based on the third file.

15. The system of claim 9, wherein the file system comprises a plurality of directories, each directory of the plurality of directories comprising at least one file including program code, and wherein the application comprises the plurality of directories.

16. The system of claim 9, wherein the at least one computing device is further configured to:execute, with the at least one agent, the application in a runtime environment; anddebug the application by modifying, with the at least one agent, at least one file in the file system based on executing the application.

17. A computer program product comprising at least one non-transitory computer-readable medium including program instructions that, when executed by at least one computing device, cause the at least one computing device to:generate, with at least one agent, a first file comprising program code based on at least one machine-learning model and a request to generate an application comprising program code;store, with the at least one agent, the first file in a file system;generate, with the at least one agent, a second file comprising program code based on the at least one machine-learning model, the first file, and the request;store, with the at least one agent, the second file in the file system; andgenerate, with the at least one agent, the application based on the first file and the second file.

18. The computer program product of claim 17, wherein generating the second file comprises:generating an inference request based on the request, the inference request comprising a context window including at least a portion of the first file; andprocessing the inference request with the at least one machine-learning model.

19. The computer program product of claim 17, wherein the program code of the second file comprises a pointer to the first file.

20. The computer program product of claim 17, wherein the at least one computing device is further caused to:generate, with the at least one agent, a plurality of additional files comprising program code in the file system based on at least one of the first file and the second file, wherein the application is generated based on the plurality of additional files.

Citation Information

Patent Citations

  • Centrally managed and distributed applications

    US20040268344A1

  • Technologies for self-learning actions for an automated co-browse session

    US20240037418A1

  • Adapting prompts selected from prompt task collections

    US20240202466A1