A: You can specify the directory where files are stored by setting the --appdir
argument when running the application. For example, ag2studio ui --appdir /path/to/folder
. This will store the database (default) and other files in the specified directory e.g. /path/to/folder/database.sqlite
.
A: You can modify agent configurations directly from the UI or by editing the init_db_samples
function in the ag2studio/database/utils.py
file which is used to initialize the database.
A: To reset your conversation history, you can delete the database.sqlite
file in the --appdir
directory. This will reset the entire conversation history. To delete user files, you can delete the files
directory in the --appdir
directory.
A: Yes, you can view the generated messages in the debug console of the web UI, providing insights into the agent interactions. Alternatively, you can inspect the database.sqlite
file for a comprehensive record of messages.
Yes. AG2 standardizes on the openai model api format, and you can use any api server that offers an openai compliant endpoint. In the AG2 Studio UI, each agent has an llm_config
field where you can input your model endpoint details including model
, api key
, base url
, model type
and api version
. For Azure OpenAI models, you can find these details in the Azure portal. Note that for Azure OpenAI, the model name
is the deployment id or engine, and the model type
is "azure".
For other OSS models, we recommend using a server such as vllm, LMStudio, Ollama, to instantiate an openai compliant endpoint.
A: If you are running the server on a remote machine (or a local machine that fails to resolve localhost correctly), you may need to specify the host address. By default, the host address is set to localhost
. You can specify the host address using the --host <host>
argument. For example, to start the server on port 8081 and local address such that it is accessible from other machines on the network, you can run the following command:
ag2studio ui --port 8081 --host 0.0.0.0
Yes. In the Build view, you can click the export button to save your agent workflow as a JSON file. This file can be imported in a python application using the WorkflowManager
class. For example:
from ag2studio import WorkflowManager
# load workflow from exported json workflow file.
workflow_manager = WorkflowManager(workflow="path/to/your/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."
workflow_manager.run(message=task_query)
Yes. You can launch the workflow as an API endpoint from the command line using the ag2studio
commandline tool. For example:
ag2studio serve --workflow=workflow.json --port=5000
Similarly, the workflow launch command above can be wrapped into a Dockerfile that can be deployed on cloud services like Azure Container Apps or Azure Web Apps.