cpacker / MemGPT

Create LLM agents with long-term memory and custom tools πŸ“šπŸ¦™
https://memgpt.readme.io
Apache License 2.0
11.33k stars 1.23k forks source link

[Chat UI] Beta release TODO list #826

Open cpacker opened 7 months ago

cpacker commented 7 months ago

Project board: https://github.com/users/cpacker/projects/3


To use:

  1. (cd chatui) pnpm install - Install deps via npm
  2. (cd chatui) pnpm dev - Start the chat UI web server (should default to http://localhost:3000/)
  3. memgpt server - In a separate tab/terminal start the backend server

Starting server from memgpt

% memgpt server
INFO:     Started server process [57128]
INFO:     Waiting for application startup.
Writing out openapi.json file
INFO:     Application startup complete.
INFO:     Uvicorn running on http://localhost:8283 (Press CTRL+C to quit)

Starting frontend from memgpt/chatui

chatui % npx nx serve
> nx run memgpt:serve:development

  ➜  Local:   http://localhost:4200/

Browser at http://localhost:4200:

image

Chat UI TODOs

Highest priority marked with ⚠️

πŸŽ„ Pending

βœ… Done

🎁 Pushed to later PR? (might not be worth trying to include for a shippable v1)

- [ ] **[UI + backend]** Allow viewing custom function files in the GUI (`~/.memgpt/functions`)
- [ ] **[UI + backend]** Allow viewing custom prompt settings in the GUI (`~/.memgpt/settings`)

πŸ“¦ Final tasks (cleanup)

- [ ] General stability w/ expected single-user usage (users should not see locking errors etc)
- [ ] Make sure all underlying MemGPT errors (eg `LLMJsonError`) are being propagated to the UI (no silent errors)
- [ ] Test on Windows + Linux + MacOS via pypi test package
- [ ] Clean, pleasant, delightful UI (agent-centric)
cpacker commented 7 months ago

@goetzrobin moved the TODOs from the old fork (now old) to here, can split this out into separate issues organized under a project if you think it makes more sense

arduenify commented 7 months ago

I was going to help out with this since I have experience with React.

I noticed upon running the server and the chatui that I receive 404 errors when attempting to retrieve the agents (GET /api/agents), but I have not been successful in finding which files contain the api code or any more information on these routes. Is there any way you could point me in the right direction? :) @cpacker

goetzrobin commented 7 months ago

@arduenify the code is here: https://github.com/cpacker/MemGPT/tree/main/memgpt/server/rest_api

There's also a /docs endpoint that shows you all the existing endpoints for the rest api.

Finally, there's this PR with my latest fixes that put the chat ui in a working state again: https://github.com/cpacker/MemGPT/pull/847

Let me know if there's anything else I can do to help you get up and running πŸ‘

arduenify commented 7 months ago

I have made a small commit to check one item off the list ([Pure UI] Display current agent name somewhere in the chat view (probably top middle?)): https://github.com/cpacker/MemGPT/pull/864

I promise larger commits in the future ;)

arduenify commented 7 months ago

I think it would be helpful if agents, personas, and humans were dropdowns. I am waiting for @goetzrobin PR #847 to be merged before I continue working on this.

goetzrobin commented 7 months ago

@arduenify my code was merged to main, which means you are good to start working on improving the agent creation.

When you say you want agents, personas, and humans to be dropdowns what exactly do you mean? We could probably create an endpoint that returns all the available options for config from the backend, e.g. persona, model, etc. What do you think @cpacker?

I think if we have more people contribute to the REST/UI effort it would make sense to split the TODOs out in their own issues under a single project.

Last thing @cpacker. You can mark the first 3 UI only points as resolved πŸ‘ I am working on syntax highlighting for function calls rn and of course retrieving the last messages in the chat ui!

arduenify commented 7 months ago

@goetzrobin, I was thinking that instead of manually typing out the human, persona, model, etc., we could retrieve that information from the API and display dropdown menus instead of textboxes for each input. We could still allow the user to manually enter these values if they prefer. However, I believe dropdowns are more intuitive and UX-friendly.

I agree with you regarding splitting the TODOs. I am working on a plan to break up the UI project board and separate things into much smaller components. This approach will prevent duplicate code and make the PRs smaller and easier to manage/merge. What do you think?

arduenify commented 7 months ago

I have created a new issue for the agent creation inputs: #897

cpacker commented 7 months ago

When you say you want agents, personas, and humans to be dropdowns what exactly do you mean? We could probably create an endpoint that returns all the available options for config from the backend, e.g. persona, model, etc. What do you think @cpacker?

I think this makes sense! Will take a bit of work to implement on the server.py / SyncServer side, but for certain fields it definitely makes sense (eg available personas, system prompts, users/humans).

cpacker commented 7 months ago

FYI @goetzrobin @arduenify I'm planning on adding auth to the FastAPI server via some middleware to support an auth and no-auth mode #898 , lmk if you have any strong opinions on how this should be done (probably will start on it early next week).

goetzrobin commented 7 months ago

Something along the lines of this: https://github.com/roy-pstr/simple-auth0-fastapi-react-app

Doesn’t have to be Auth0 but a JWT solution would be the best with the React frontend.

arduenify commented 7 months ago

I agree, JWT is the way to go.