Provide support of rest-api [Fast-API] #257
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Description
Added REST API support using FastAPI to enable browser automation via API calls. This allows integration with an external UI, as I prefer not to use the built-in Streamlit interface.
Quickstart
Type of Change
Testing
Screenshots
Additional Notes
Tested using curl request:
curl -s -X POST http://localhost:8888/chat
-H "Content-Type: application/json"
-d '{"user_message":
"Open https://en.wikipedia.org/wiki/Ada_Lovelace and tell me the first sentence of the article."
}' | jq
{
"session_id": "91a0232a2e71472ca539b10f74c28603",
"assistant_message": "I'll help you access the Wikipedia page about Ada Lovelace and read the first sentence. Let me do this step by step:\n\n1. First, let me take a screenshot to see the current state of the desktop\n2. Then open Firefox and navigate to the page\n3. Take another screenshot to read the contentNow I'll click on Firefox and navigate to the Wikipedia page:Now I'll click on the address bar and enter the Wikipedia URL:The first sentence of the Ada Lovelace Wikipedia article reads:\n\n"Augusta Ada King, Countess of Lovelace (née Byron; 10 December 1815 – 27 November 1852), also known as Ada Lovelace, was an English mathematician and writer chiefly known for her work on Charles Babbage's proposed mechanical general-purpose computer, the Analytical Engine.""
}