Create a new directory for your project
Create a `requirements.txt` file and add the required dependencies:
Create a new Python file, e.g., `main.py`, and add the following code to create a minimal FastAPI app with an Agno agent:
Create and activate a virtual environment:
Install the required dependencies by running:
Set your OPENAI_API_KEY environment variable:
Run the FastAPI app with `uvicorn main:app --reload`.
In the same directory, create a new file named `Dockerfile` with the following content:
Build the Docker image by running:
Run the Docker container with:
Access your app
http://localhost:8000.Update your `main.py` file to include knowledge and memory storage using PostgreSQL:
Create a `docker-compose.yml` file in the same directory with the following content:
Run the Docker Compose setup with:
http://localhost:8000 and interact with your agent that has knowledge and memory capabilities.You can test the agent by running curl http://localhost:8000/ask?query="What is the recipe for pad thai?".