HTTP Server
This folder contains the elements for hosting the Trae agent as an HTTP server using FastAPI. It is still under construction and should not be used in production yet.
Expected Features of the HTTP Server
- The server should be able to perform stateless operations.
- The server should be able to handle concurrent requests.
- The server should always respond in JSON format, even if the response is streaming.
Additional Features Expected
- The server should be able to reproduce or repeat actions based on a specific JSON file. For example, given a trajectory, it could reproduce specific steps and follow new steps produced by another model.
- To ensure requests are dynamic, the server should support different models, different requests, and different output formats based on the request JSON file.
Roadmap
- To build a fully functional HTTP Trae agent, we need to gradually split the
trae_agentinto more component-based modules and add more features to make it more dynamic. A specific task is to see if therunfunction can accept an additional parameter calledmodel. - Besides the
runfunction, other functions should be callable not only via CLI but also through the HTTP server to meet the second requirement. - To handle concurrent requests, it is also necessary to ensure the HTTP server is stateless — at least when handling the
runfunction operating in different folders.