Skip to content

Foundry Hosted Agents

In Azure Logic Apps Automation, a Foundry Hosted Agent is an agent that runs in a hosted container in Microsoft Foundry. You create and manage the agent from an automation app, and then select the agent in one or more workflows in that app.

Use a Foundry Hosted Agent when your workflow needs:

  • A container-based agent hosted by Microsoft Foundry.
  • A model deployment from your Foundry project.
  • System instructions and user prompts that can change for each workflow run.
  • Files or skills uploaded before the agent starts.
  • Workflow actions that the agent can call as tools.
  • Generated files that later workflow actions can use.

Azure Logic Apps Automation separates agent setup from workflow authoring:

  1. In your app, create a Foundry Hosted Agent by selecting a subscription, AI account, Foundry project, and model deployment.
  2. Azure Logic Apps Automation creates the hosted agent and completes its identity, permission, and readiness setup.
  3. In the workflow designer, add a Foundry Hosted agent action and select the hosted agent.
  4. For each run, the workflow sends the system message, user message, input files, and available tools to the hosted agent.
  5. The hosted agent runs in Microsoft Foundry and returns its final response and generated files to the workflow.

The workflow app uses its system-assigned managed identity when it invokes the hosted agent. The agent uses its own identity when it accesses the selected model deployment.

Foundry Hosted Agents are different from Foundry prompt agents:

Foundry Hosted AgentFoundry prompt agent
Runs in a hosted container.Uses a declarative agent configured through prompts, a model, and tools.
Supports input files, skills, workflow tools, and generated file outputs.Uses the capabilities configured on the Foundry agent.
Requires agent provisioning and readiness setup before use.Uses a Foundry Agent Service connection.
Appears on the app’s Agents page for management and diagnostics.Is configured directly in the workflow designer.

The app’s Agents page shows the Foundry Hosted Agents that belong to the app. An agent can have one of the following states:

StateMeaning
ConnectedSetup completed and the agent is ready for workflow runs.
ProvisioningThe agent container or its identity and permissions are still being prepared.
Authentication failedA required identity doesn’t have access to the Foundry resources.
Agent errorThe hosted agent reported an error.
Update availableThe hosted container version doesn’t match the expected version.
UnreachableAzure Logic Apps Automation couldn’t reach the hosted agent.
Status unknownThe current status couldn’t be determined.

Open an agent to review its setup progress, configuration, identities, and diagnostics. The setup process performs the following checks:

  1. Verifies that the hosted agent is active.
  2. Discovers the hosted agent identities.
  3. Assigns the required permissions.
  4. Verifies that the container is ready.

If a step fails, you can retry from that step, rerun all setup steps, or recreate the agent.

A Foundry Hosted Agent action accepts:

  • A system message that defines the agent’s role and constraints.
  • A user message that describes the task for the current run.
  • Input files from the trigger or earlier workflow actions.
  • Files marked as skills for GitHub Copilot skill discovery.
  • Workflow actions that the agent can call as tools.

The action returns:

OutputDescription
lastAssistantMessageThe agent’s final response.
fileOutputsFiles generated during the hosted agent session. Each item includes path, content, and size.

For setup instructions and output expressions, see Create and use a Foundry Hosted Agent.