The Foundry Agent Run job type invokes an Azure AI Foundry Project agent (an OpenAI-style assistant) by creating a thread, posting a user message, and starting a run. The agent is identified by its agent ID — Polysync stores that in the External Id.
This job type is supported on the Azure AI Foundry Project platform.
id (e.g., asst_…).Foundry Agent Run (set automatically on import).GET /api/projects/{project}/assistants?api-version=v1
(scope: https://ai.azure.com/.default). Each agent's id, name,
and model becomes a Polysync Job.
Two well-known parameter names drive the interaction:
| Polysync parameter | Direction | Role |
|---|---|---|
user_message |
Input |
Body of the user message posted to the thread. |
thread_id |
Input&Output |
If supplied → reuse that thread. After run → set to the thread id actually used. |
response |
Output |
Populated with the latest assistant message after the run completes. |
The request sequence:
POST /threads — create a thread (skipped if thread_id was
supplied).POST /threads/{threadId}/messages with
{ "role": "user", "content": <user_message> }.POST /threads/{threadId}/runs with { "assistant_id": "<external-id>" }.The composite RunId is "agent#{threadId}#{runId}".
On run completion, Polysync fetches the latest assistant message via
GET /threads/{threadId}/messages?order=desc&limit=1 and writes
content[0].text.value to the response parameter (and the
thread_id parameter to the thread used).
Submit the user message + start the run as described above.
Status is polled via GET /threads/{threadId}/runs/{agentRunId}
and status is decoded:
| Foundry agent run status | Polysync status |
|---|---|
queued / in_progress / requires_action / cancelling |
Running |
completed |
Success |
failed / expired |
Failed |
cancelled |
Cancelled |
Cancel is supported via
POST /threads/{threadId}/runs/{agentRunId}/cancel.
https://portal.azure.com/#@/resource/subscriptions/{subId}/resourceGroups/{rg}
/providers/Microsoft.CognitiveServices/accounts/{accountName}/overview
(Foundry has no per-run deep-link; this is the generic account overview.)
thread_id as an Input&Output parameter and binding the
downstream Task's thread_id input to the upstream Task's output.requires_action), implement the tool
inside the agent itself — Polysync does not currently submit tool
outputs.requires_action — the agent expects a tool-output
submission Polysync cannot provide. Wrap the tool inside the agent
definition so it runs server-side./threads/* operations. Use Service Principal,
Certificate, or Polysync SPN.