opensearch-project / ml-commons

ml-commons provides a set of common machine learning algorithms, e.g. k-means, or linear regression, to help developers build ML related features within OpenSearch.
Apache License 2.0
89 stars 126 forks source link

[FEATURE] Need API Support for updating the Agent. Currently there is no API available #2172

Open ramda1234786 opened 6 months ago

ramda1234786 commented 6 months ago

Need API Support for updating the Agent. Currently there is no API available.

There are multiple cases, where user needs to update the agent with new model ID, or add new Tool in the workflow or make changes in k and size of response in neural search.

For all this every time we need to generate a new agent.

The existing agents of no use and unfortunately we need to delete them. This can be avoided by having a update agent API

Proposed API format

PUT https://{{hostname}}:{{port}}/_plugins/_ml/agents/{{agent_id}}

{
  "name": "population data analysis agent",
  "type": "conversational_flow",
  "description": "This is a demo agent for population data analysis",
  "app_type": "rag",
  "memory": {
    "type": "conversation_index"
..........................
....................
.....................

}

This will be very helpful to update the agents.

rbhavna commented 5 months ago

Update Agent API needs to be prioritized for 2.14 as experimental if this has to go through security review. So that we can have it by 2.15 as GA.