Skip to content

phidatahq/api-ws-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Api Workspace Template

This repo contains the code for running an agent-api and supports 2 environments:

  1. dev: A development environment running locally on docker
  2. prd: A production environment running on AWS ECS

Setup Workspace

  1. Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh

from the api-ws-template dir:

  1. Install workspace and activate the virtual env:
./scripts/install.sh
source .venv/bin/activate
  1. Setup workspace:
ag ws setup
  1. Copy workspace/example_secrets to workspace/secrets:
cp -r workspace/example_secrets workspace/secrets
  1. Optional: Create .env file:
cp example.env .env

Run Api Workspace Template locally

  1. Install docker desktop

  2. Set OpenAI Key

Set the OPENAI_API_KEY environment variable using

export OPENAI_API_KEY=sk-***

OR set in the .env file

  1. Start the workspace using:
ag ws up

Open localhost:8000/docs to view the FastAPI docs.

  1. Stop the workspace using:
as ws down

Next Steps:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published