The Agent App let’s us serve agents using a FastApi server, test them using a Streamlit UI and store memory and knowledge in a Postgres database. Run it locally using docker or deploy to production on AWS.Documentation Index
Fetch the complete documentation index at: https://docs.phidata.com/llms.txt
Use this file to discover all available pages before exploring further.
Setup
Install docker
Install docker desktop to run your app locally
Create your codebase
Create your codebase using theagent-app template
agent-app with the following structure:
Test your Agents using Streamlit
Streamlit allows us to build micro front-ends for testing our Agents. Start theapp using:
- Open localhost:8501 to view your AI Agent.
- The streamlit apps are defined in the
appfolder - The
Agentsare defined in theagentsfolder.
Serve your Agents using FastApi
Streamlit is great for building micro front-ends but any production application will be built using a front-end framework like next.js backed by a RestApi built using FastApi. Your Agent App comes ready-to-use with FastApi endpoints. Start theapi using:
- Open localhost:8000/docs to view the API Endpoints.
- Test the
/v1/playground/agent/runendpoint with
Building your AI Product
Theagent-app comes with common endpoints that you can use to build your AI product. This API is developed in close collaboration with real AI Apps and are a great starting point.
The general workflow is:
- Your front-end/product will call the
/v1/playground/agent/runto run Agents. - Using the
session_idreturned, your product can continue and serve chats to its users.
Delete local resources
Play around and stop the workspace using:Next
Congratulations on running your AI App locally. Next Steps:- Run your Agent App on AWS
- Read how to update workspace settings
- Read how to create a git repository for your workspace
- Read how to manage the development application
- Read how to format and validate your code
- Read how to add python libraries
- Chat with us on discord