An agent needs to call internal REST APIs and also retrieve from an indexed document store.
Register the APIs as agent tools (function/OpenAPI) and attach the AI Search index as a knowledge source on the Foundry agent.
Why: Tools give the agent action capability; knowledge sources give grounded retrieval. They are distinct integration surfaces, not the same connector.
Several teams need isolated agent configs, connections, and deployments under shared governance.
Use a Foundry hub with per-team Foundry projects; each project scopes its own connections, deployments, and access.
Why: The hub centralizes networking, policy, and shared resources; the project is the workspace unit for an app or team. Don't share one project across teams.
A production app needs predictable data residency and reserved throughput for a model deployment.
Use a Standard (regional) or Provisioned Throughput (PTU) deployment rather than a Global deployment for residency-sensitive, high-throughput workloads.
Why: Global deployments route to any region for capacity; Standard pins the region, and PTU reserves capacity for stable latency. Pick by residency and SLA needs.
Prompt and agent definitions must move from dev to prod with review and rollback.
Store prompt flow / agent definitions as code in a repo and promote them through environments with Azure DevOps or GitHub Actions pipelines.
Why: Treat prompts and agent config as versioned artifacts; manual portal edits in prod have no audit trail or rollback path.
A burst of traffic triggers 429 errors against a model deployment.
Raise the deployment's TPM/RPM quota where available, add client-side retry with exponential backoff, and consider a PTU deployment for guaranteed capacity.
Why: Quota is the tokens-per-minute ceiling; backoff smooths transient throttling. Spinning up duplicate resources without quota planning just moves the bottleneck.
Spend is unpredictable and dominated by long RAG prompts.
Cap max output tokens, trim retrieved context to top-k, cache reusable system context, and track token usage per deployment in Azure Monitor.
Why: Cost scales with input plus output tokens; shrinking context and outputs is the direct lever. Switching region or SKU rarely changes per-token price meaningfully.
Over weeks, answer quality and grounding fidelity appear to degrade in production.
Run continuous online evaluations in Foundry for groundedness, relevance, and coherence on sampled live traffic and alert on score drops.
Why: Scheduled evaluators detect drift you can't see in raw latency metrics; CPU/latency dashboards alone never reveal a grounding regression.
A workflow needs a planner, a researcher, and a writer collaborating with shared state.
Orchestrate them with a multi-agent framework (Semantic Kernel / AutoGen on Foundry) using a defined orchestration pattern and shared context.
Why: Frameworks manage turn-taking, state, and termination; ad-hoc string passing between agents has no coordination or stop condition.
An agent runs unattended overnight and must not take risky actions alone.
Bound it with allow-listed tools, per-action budgets, content filters, and a checkpoint that escalates high-impact steps for approval.
Why: Layered safeguards keep autonomy safe; an autonomous loop with full tool access and no approval gate can cause irreversible damage.
An agent intermittently fails mid-task and you must find the failing step.
Inspect the run's traced steps and tool-call inputs/outputs in Foundry to locate the failing tool or malformed argument.
Why: Step-level traces pinpoint where a run broke; a single final error message hides which tool call or reasoning step actually failed.
Outputs are inconsistent and ignore formatting instructions.
Use a clear system message, few-shot examples, and explicit output constraints; for strict shape, enable structured outputs / JSON schema.
Why: Structured prompting and schema-enforced outputs make results reliable; raising temperature or retrying blindly doesn't fix instruction-following.
A multimodal agent reads user images that may contain hidden instruction text.
Enable prompt shields / indirect-injection detection and treat text inside images as untrusted data, not as instructions.
Why: Embedded image text is a classic indirect prompt-injection vector; passing OCR'd text straight into the system prompt lets attackers hijack the agent.