-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - Condense configurations into conventions for Database (Metadatastore) Adapters #1460
WIP - Condense configurations into conventions for Database (Metadatastore) Adapters #1460
Conversation
@yoaquim this is the working PR we were talking about |
K - thinking through where the complication that prevents us using the orm directly, it's really only the archive. So if we add accessors on the related objects, the adapter can probably obfuscate that complication.
In this case the adapter interface duck types as an orm - so with the pgvector adapter |
@cpacker @sarahwooders do you know if the I'd like to create the test db in the docker db init, ideally, I'd like to not add a second init file and switch them around, so that's why I'm trying to track down what it is used for at the moment |
For the moment I dumped into that init, overriding it without disturbing it is a bit of work. Can revisit before we start merging. |
393f982
to
eb50aff
Compare
OK. So the shortest path I can see from here is:
|
7cafef7
to
c159afc
Compare
name:Mapped[Optional[str]] = mapped_column(String, nullable=True, doc="a human-readable identifier for an agent, non-unique.") | ||
persona: Mapped[str] = mapped_column(doc="the persona text for the agent, current state.") | ||
# TODO: reconcile this with persona,human etc AND make this structured via pydantic! | ||
# TODO: these are vague and need to be more specific and explained. WTF is state vs _metadata? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state is the in-process state of the agent (e.g. the memory, in-context message IDs) while metadata is arbitrary info the user might want to attach to the agent
is working. Next up: - isolate the test_server failing tests - move the settings mock into a conftest fixture - add a test hook for SyncServer so you can do the same thing there. - propigate.
for default persona, human, and preset. Now all derived from settings (which is in turn derived from envars). Still need to square away with the config file hierarchy, so once we resolve the value there is only one definitive source of truth across the rest of the code.
hit by a bus the next person doesn't need to spend a week getting up to speed. This helps clarify the goal in this PR: one config hierarchy assembled once, with one mega hook.
TODO: - mount the test sqlite/chroma somewhere that doesn't clutter up the repo
…le stripping out extraneous elements. The memory thing needs to be abstracted in a later time, never clear if these are strings or templates or references to a related object
…le entrypoint to be good to go
…to be helpers like palm to do migrations and such
…scheme. the settings.backend object is self-contained, so no more external double-setting
… stub everything over to ORM models.
1. the metadata.py file is being updated to use the ORM 2. conflicting models are being sunset and/or quarantined for this PR 3. CRUD accessors stay in metadatastore but are now managed behind the scenes by the ORM This is going to break a lot of things (which is goodTo get unbroken: 1. update the tests to no longer be aware of the backend configs 2. update the code to same 3. remove all the SQLModel and deprecated backend code 4. document (loom) how the ORM works, how to create migrations, how to traverse the ORM tree etc etc. Strategy here should be to merge this into a long-running branch and start CI against it, then keep pulling main into it until we're ready for a major release (this will be a major). Configs will be extremely thin after this PR. We should be set up to move docker dev to a single stack and docker quickstart to a single image.
…sses still a mess, but I think we can get around that to get things working
stop spinning up servers in tests! But... 1. need to move the db_session all the way up to the request (where it belongs). 2. dep inject that thing at request time! 3. dep override it in conftest!
94ce074
to
7f4711e
Compare
WIP
this may be a long-running branch since cutting the tests over to use httpx app + FastAPI dependency injection is gonna be a bit of work.
Preamble
The Database(s) that support the application state, agent memory (including vector lookup) and the application itself (user/org management, permissions, settings config etc) interface with the rest of the codebase via a MetadataStore object.
Goals here