Auto-bootstrap prompt agents in empty Foundry projects#188
Merged
Conversation
Adds an optional `prompt_agent_bootstrap` block to `agentops.yaml` that lets the prompt-agent deploy workflow create the first version of an agent in a dev / qa / prod Foundry project that does not yet contain one. When the stage step looks up the seed agent and gets a 404, it reads the model deployment (required) plus optional description, model_parameters, and tools from prompt_agent_bootstrap, combines them with prompt_file, and creates the first version automatically. The deployment artifact records the new `action: bootstrapped` for that first run; subsequent deploys follow the normal reuse / next-version flow. This eliminates the previous per-environment manual seeding step that forced users to recreate the same prompt agent in every Foundry project before CI could promote prompts to it. The first PR / deploy into an empty dev project now succeeds out of the box; only the sandbox project needs a manual seed (so authors still have a playground to iterate in). Authentication (401 / 403) and other non-404 errors continue to propagate — the bootstrap path only triggers on a genuine `agent does not exist` 404 via a strict _is_not_found_error helper. `agentops workflow analyze` now emits a warning when a prompt-agent workspace is missing prompt_agent_bootstrap to surface the recommended configuration before operators hit it in CI. Documentation: - tutorial-prompt-agent-quickstart.md: rewrote section 4 (sandbox-only seed), section 9 (yaml example + bootstrap callout + project_endpoint warning), section 11 (stage-on-empty flow), and section 13 (action: bootstrapped on first deploy artifact). - tutorial-end-to-end.md: added a multi-env bootstrap callout pointing at the prompt-agent quickstart for the full journey. - agentops-config skill: documented the new optional block. - agentops-workflow skill: documented the bootstrap-on-empty branch. - CHANGELOG Unreleased: Added entry under Added. Tests: 16 new unit tests across test_prompt_deploy.py (bootstrap path, missing config raises, auth errors propagate, ignores bootstrap when seed exists), test_agentops_config.py (schema validation), and test_workflow_analysis.py (missing-bootstrap warning, silent when present). Full suite: 784 passed, 3 skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds an optional prompt_agent_bootstrap block to �gentops.yaml. When the prompt-agent deploy workflow runs against a dev / qa / prod Foundry project that does not yet contain the seed agent, it reads that block plus prompt_file and creates the first version automatically (recorded as
action: ""bootstrapped""in oundry-agent.json).This eliminates the previous per-environment manual seeding step that forced operators to recreate the same prompt agent in every Foundry project before CI could promote prompts to it.
Why
The current prompt-agent quickstart asked the user to manually create
travel-agent:1in two Foundry projects (sandbox + dev). PO feedback:Não faz sentido. Eu deveria criar apenas no sandbox; o dev deve sempre atualizar com pipeline de continuous deployment.This change makes sandbox-only seeding the supported path.Scope
Code:
_bootstrap_prompt_agentand strict_is_not_found_errorhelpers. Newaction: ""bootstrapped"".Docs:
action: bootstrappedfirst-deploy artifact (section 13).Tests (16 new):
_is_not_found_error.Full suite: 784 passed, 3 skipped.
Safety
agent does not exist404. Testtest_stage_prompt_agent_propagates_auth_errorsconfirms.prompt_agent_bootstrapis optional. Existing configs that don't set it keep the old behavior: the stage step raises on 404 with the original error.agentops.yaml.Rubber-duck review
Pre-implementation critique surfaced several blind spots that shaped the final design:
prompt_agent_bootstrapoverprompt_agent_defaults) to communicate one-time semantics.project_endpointprecedence warning in the tutorial (yaml wins over env, breaks multi-env).descriptionforworkflow analyzewarning so users learn about the block before hitting CI.