Running an Agency
How to run an Agency.
When it comes to running your agency, you have 3 options:
- Gradio Interface: The most convenient way to get started.
- Get Completion: For backend or custom integrations.
- Terminal Version: Best for quick debugging and testing.
Gradio Interface
To open a convenient Gradio interface in your browser, use the demo_gradio
method:
Simply follow the localhost
link from the terminal to start using your agency.
Get Completion
To get a response from your agency directly in code, use the get_completion
method:
Parameters:
message
: The message to send to the agency.additional_instructions
(optional): Additional instructions that will be appended at the end of instructions for the recipient agent.tool_choice
(optional): Force the recipient agent to use a specific tool.attachments
(optional): A list of attachments to be sent with the message, following OpenAI format.recipient_agent
(optional): The agent to which the message should be sent.
Terminal Version
To run the agency directly from your terminal, use the run_demo
method:
When using the terminal to run the agency, you can send messages directly to any top-level agent by using the “mentions” feature. To do this, start your message with the agent’s name preceded by an @ symbol (for example, @Developer I want you to build me a website
). This directs your message to the specified agent instead of the CEO. You can also press the tab key to autocomplete the agent’s name.
Deleting Agency
If you would like to delete the agency and all associated files, vector stores, and assistants on OpenAI, you can use the delete
method: