# agents-ui

## Run Locally

1. `yarn install`
2. Go to studio app (app, not code) on the desired environment
    1. Go to agents
    2. Create a new agent if none exist for your account
    3. Hover the card -> 3 dots -> Embed
    4. Fill out the menu (add url, etc) and grab the values in `data-client-key` and `data-agent-id`
3. Create a `.env` file in the root directory
4. Add `VITE_CLIENT_KEY` and `VITE_AGENT_ID` with the values grabbed from the studio
5. `yarn run dev`

## Deploy

- copy aws credentials to cli
- publish to npm registry
    - git pull && yarn (main)
    - check version in package.json is the current version
    - (prod, no staging)from embedded folder: yarn deploy:prod
    - post deploy to npm registry: create a pr back to main to update package.json version and yarn.lock if needed

## Error solving

    - sls deploy fails: remove yarn.lock file and yarn again
    - otp failure: add always-auth=true for 2FA from npm
