feat: enable tool selection via agent creation POST #1137
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Misc. fixes to get the create agent route to play nice and allow tool selection to work.
Note: this PR is pretty hacky and is meant to get the chat UI working ASAP - ideally, a follow-up PR should:
preset
with overridable fields, basically how the current CLI flow worksExample REST call passing tool names via the config (https://memgpt.readme.io/reference/create_agent_api_agents_post):
Notice how the returned newly created agent only has a few functions (less than normal) because we provided the field
function_names
in the payload with only three functions:core_memory_append,core_memory_replace,send_message
.TODO in follow-up PR: scrap this patch and replace it with create-via-preset (#1138) + add a "create preset" field to UI