Monitoring

Phidata comes with built-in monitoring. You can set monitoring=True on any agent to track sessions or set PHI_MONITORING=true in your environment.

Run phi auth first to authenticate your local account.
agent_monitor.py
from phi.agent import Agent

agent = Agent(markdown=True, monitoring=True)
agent.print_response("Share a 2 sentence horror story")

Run the agent and monitor the results on phidata.app/sessions

# You can also set the environment variable
# export PHI_MONITORING=true

python agent_monitor.py

View the agent session on phidata.app/sessions

Debugging

Phidata also includes a built-in debugger that will show debug logs in the terminal. You can set debug_mode=True on any agent to track sessions or set PHI_DEBUG=true in your environment.

debugging.py
from phi.agent import Agent

agent = Agent(markdown=True, debug_mode=True)
agent.print_response("Share a 2 sentence horror story")

Run the agent to view debug logs in the terminal:

# You can also set the environment variable
# export PHI_DEBUG=true

python debugging.py