-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Whether autogen-studio supports exposing the workflow API for external applications #3080
Comments
Good question! @victordibia and @JingyaChen do we have this plan? It sounds like a very useful feature to have! |
Hi @shanmu-raoyunfei , Great question.
The workflow can be launched as an API endpoint from the command line using the autogenstudio commandline tool. autogenstudio serve --workflow=workflow.json --port=5000 @shanmu-raoyunfei , does this address the needs you are describing? |
This will solve some of my problems. It would be nice to have direct access to workflow as an API endpoint. Running this workflow from the command line or from a separate application is cumbersome. Thank you very much for your reply |
I am having trouble as well with using workflow API in a python code. There are two things here:
from autogenstudio import WorkflowManager
# load workflow from json file
workflow_manager = WorkflowManager(workflow="Spelling-bee-Workflow.json")
# run the workflow on a task
task_query = "What is the height of the Eiffel Tower?. Dont write code, just respond to the question."
result = workflow_manager.run(message=task_query)
print(result)
history = workflow_manager.agent_history
print(history) Spelling-bee-Workflow.json {"user_id":"guestuser@gmail.com","version":"0.0.1","name":"Hacker News Workflow","description":"Hacker News Workflow","type":"sequential","summary_method":"none","sample_tasks":[]} A Snapshot from Spelling-bee playground session
Hoping to get some help from the community or maintainers. Thank you for all for your hard work. |
Thats a good point. AutoGen Studio actually exposes the API end point that is used by the UI. autogenstudio ui --port 8081 --docs Then go to http://localhost:8081/api/docs ![]() In AGS, tasks are run within sessions and the endpoint for this is /sessions/{session_id}/workflow/{workflow_id}/run . ![]() |
Thanks for mentioning this. The behavior here is still being improved. There are currently two ways to download a workflow (which should be merged into one). The download button on the card has only the workflow definition. However, if you click export (see documentation here), there a download button that exports the entire workflow (with agents, skills, models etc). That is the workflow that can be integrated with code or command line etc. The serve command uses a relatively simple FastAPI implementation (code here) and if you go to the url of the app :5000/docs this should describe the api endpoint. |
Is your feature request related to a problem? Please describe.
Whether autogen-studio supports exposing the workflow API for external applications?This will be very useful
Describe the solution you'd like
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: