Skip to content

Conversation

rcho93
Copy link

@rcho93 rcho93 commented Jun 19, 2025

Description

Plan_Execute_Reflect agent goes through planning, executing, and reflecting phases, which requires multiple prompts.

Example PER agent execution below:

POST _plugins/_ml/agents/your_agent_id/_execute?async=true
{
  "parameters": {
    "question": "How many flights from Beijing to Seattle?",
    "planner_prompt_template": "your_planner_prompt_template",
    "planner_prompt": "your_planner_prompt",
    "reflect_prompt_template": "your_reflect_prompt_template",
    "reflect_prompt": "your_reflect_prompt",
    "planner_with_history_template": "your_planner_with_history_template",
    "system_prompt": "your_planner_system_prompt",
    "executor_system_prompt": "your_executor_system_prompt"
  }
}

With this integration, user can simply store group of prompts into one prompt object:

POST _plugins/_ml/prompts/_create
{
   "name": "promptGroup",
   "prompt": 
   {
       "planner": <your-planner-prompt>, 
       "system": <your-planner-prompt>, 
       "reflect": <your-planner-prompt>, 
       "executor_system": <your-planner-prompt>, 
   }
}

And access this prompt during execution time using following pull_prompt syntax:

POST _plugins/_ml/agents/your_agent_id/_execute?async=true
{
  "parameters": {
    "question": "How many flights from Beijing to Seattle?",
    "prompt_group": "pull_prompt(prompt_id)
  }
}

You can also filter out usable prompts from this group of prompts by:

POST _plugins/_ml/agents/your_agent_id/_execute?async=true
{
  "parameters": {
    "question": "How many flights from Beijing to Seattle?",
    "prompt_group": "pull_prompt(prompt_id, [planner, system])
  }
}

Related Issues

Resolves #[Issue number to be closed when this PR is merged]
#3711

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:03 — with GitHub Actions Failure
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:03 — with GitHub Actions Failure
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:03 — with GitHub Actions Failure
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:03 — with GitHub Actions Failure
rcho93 added 3 commits June 19, 2025 09:06
Signed-off-by: seungwon cho <[email protected]>
Signed-off-by: seungwon cho <[email protected]>
Signed-off-by: seungwon cho <[email protected]>
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:07 — with GitHub Actions Error
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:07 — with GitHub Actions Error
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:07 — with GitHub Actions Failure
@rcho93 rcho93 had a problem deploying to ml-commons-cicd-env-require-approval June 19, 2025 16:07 — with GitHub Actions Failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant