Prompt file imported from microsoft/fsi-agentic-wealth-transfer (
.github/prompts/new-foundry-agent.prompt.md). Fill in{{agent}}before use. Copyright stays with the author.
Scaffold a Foundry agent (Track B)
Build a real Foundry agent per foundry-agents.instructions.md and ../../docs/foundry-agent-architecture.md (SRD §5). The deployed Transfer Agent is reused, not rebuilt.
Input
Agent: {{agent}}. If omitted, ask which and its tools/grounding.
Steps
- Read
agents/transfer_agent/(the existing hosted-agent pattern:main.py,runtime.py,_shared/audit.py,_shared/foundry.py) andazure.yaml(how the hosted agent is declared). - Realization:
- Risk → hosted agent (MAF, containerized, own Entra identity). Inputs
ClientProfile+ extractions; MCP tools for AML/OFAC/PEP (gated on Q2/Q3, start with a governed fake); outputKYCResult{status: Approved|Review|Rejected, riskScore, reasonCodes, rationale, auditRef};Reviewgates on a human; deterministic precedence/merge for conflicting sources. - Exception → prompt agent (
FoundryChatClient) that classifies the reject code into a route label only; the deterministic routing executors live in the workflow (/build-agent-workflow).
- Risk → hosted agent (MAF, containerized, own Entra identity). Inputs
- Governance: per-agent Entra identity; immutable WORM audit of every decision, fail closed;
OTel
gen_aitracing; Content Safety/Prompt Shields; model via router (no hard-coded version); Foundry Evaluations set. Never auto-clear a human gate or fabricate a control number. - Ground the Exception classifier on Foundry IQ / Azure AI Search over the FINRA taxonomy (documents, not Fabric data).
- Deploy/declare: add the hosted agent to
azure.yaml/infra following the Transfer Agent; keepagent-framework-core. - Tests/evals: unit-test deterministic parts; add an eval set for the classifier;
python -m pytest tests -q,ruff check agents ... tests,python -m evals.run_local. - Docs: update the RTM (
/rtm-sync) and the agent architecture doc if realization changed.
Guardrails
- Deterministic work is code/tools, not prompt logic. Reuse the Transfer Agent by reference.
- Governed MCP tools behind APIM — no direct agent-to-endpoint calls. Human gates stay human-owned.