Example
The following agent will use the Phi toolkit to create and manage phidata workspaces. It can create new applications from templates like llm-app, api-app, django-app, and streamlit-app. It can also start existing workspaces and validate that Phi is ready to run commands.
cookbook/tools/phi_tools.py
from phi.agent import Agent
from phi.tools.phi import PhiTools
# Create an Agent with the Phi tool
agent = Agent(tools=[PhiTools()], name="Phi Workspace Manager")
# Example 1: Create a new agent app
agent.print_response("Create a new agent-app called agent-app-turing", markdown=True)
# Example 3: Start a workspace
agent.print_response("Start the workspace agent-app-turing", markdown=True)
Parameter | Type | Default | Description |
---|
name | str | "phi_tools" | The name of the tool |
Function | Description |
---|
validate_phi_is_ready | Validates that Phi is ready to run commands |
create_new_app | Creates a new phidata workspace for a given application template |
start_user_workspace | Starts the workspace for a user |
Responses are generated using AI and may contain mistakes.