feat(agents): add microsoft.foundry service target for a single hosted agent#8629
Draft
huimiu wants to merge 1 commit into
Draft
feat(agents): add microsoft.foundry service target for a single hosted agent#8629huimiu wants to merge 1 commit into
huimiu wants to merge 1 commit into
Conversation
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.
What
Wires the new
host: microsoft.foundryservice target in theazure.ai.agentsextension — the foundation of design spec #8590 (§2.1, §2.2, §2.6). A singlemicrosoft.foundryservice represents a whole Foundry project, with agents declared inline as top-level service properties delivered onServiceConfig.AdditionalProperties(not underconfig:).This foundation makes a single hosted agent deployable end-to-end by mapping the inline agent definition onto the existing agent deploy machinery.
Changes
microsoft.foundryinlisten.go(WithServiceTarget) and declare the provider inextension.yaml.foundry_config.go) — typedFoundryProjectConfig/FoundryAgentaligned withAgent.json/microsoft.foundry.jsonfrom feat(agents): add microsoft.foundry azure.yaml schema #8603; bound fromAdditionalProperties. Includes validation (single hosted agent, exactly one deploy mode, project requirement) and conversion toagent_yaml.ContainerAgent.service_target_foundry.go) — implements the fullServiceTargetProviderinterface:Initialize: bind + validate + resolve project root + shared auth setup.Package/Publish/Deployfor one hosted agent: prebuiltimage:→CreateAgentVersion; code-deployruntime:(python/dotnet) → ZIP package + create/update version.${VAR}resolved /${{...}}preserved via the sharedExpandEnv(feat(agents): support Foundry ${{...}} server-side expressions in env expansion #8602).Endpoints/GetTargetResourcedelegate to the shared implementation.service_target_agent.go— extractsetupAuth(shared env/credential setup) andzipSourceDir(shared code packaging) so both hosts reuse them;azure.ai.agentbehavior is unchanged.foundry_config_test.go) — table-driven coverage for binding fromAdditionalProperties, validation cases, runtime/entry-point mapping, and${VAR}/${{...}}env resolution.Out of scope (follow-ups)
docker:) builds for the new host (core does not drive a per-agent container build yet — rejected with an actionable error).$refinclude resolution wiring (feat(agents): resolve $ref file includes with overlay overrides in Foundry config #8627) andinstructionsprompt-file loading.initrework and old-file deprecation.Notes
startupCommand(the agent schema models entry viastartupCommand, not an explicit field); documented as the seam if the schema later adds one.azure.ai.agentlifecycle hooks inlisten.go(they are gated on the old host), so the foundation correctly does not inherit their data-plane reconcile.Testing
Extension module (
azureaiagent):go build ./...,go vet ./...,gofmt,golangci-lint run(0 issues), fullgo test ./..., andcspell— all clean.Fixes #8628