USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll BooksAzure Cloud Book
HomeAzure BookAI-Native Azure
PreviousAzure AI Services: Document Intelligence, Speech, Vision, Language, and Content ProcessingNextAI Evaluation, Tracing, Responsible AI, Safety, and Red Teaming
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

10 sections

Progress0%
1 / 10

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Agentic Applications: Tools, Memory, Workflows, and Human Approval

An AI agent combines a model with instructions, state, tools, and a control loop. Production agents must be bounded by authorization, tool schemas, budgets, timeouts, approval policy, observability, and durable recovery. The model can propose an action; trusted application code decides whether the action is allowed and executes it.

What is the safe agent control loop?

Rendering diagram...

The loop needs maximum steps, wall-clock time, token/tool budget, and cancellation. “Continue until done” without bounds is not an enterprise control.

How should tools be designed?

A tool should have one purpose, a strict input schema, server-side validation, narrow identity, timeout, idempotency key where relevant, and structured output. Prefer domain tools like create_support_draft over raw shell, SQL, or arbitrary HTTP.

Separate tools into risk classes:

  • Read-only discovery.
  • Reversible low-impact changes.
  • Consequential actions requiring approval.
  • Prohibited actions.

Never trust model-generated parameters. Re-check tenant, object ownership, allowed ranges, and target resource in code.

What kinds of memory exist?

  • Working memory: current request and tool results.
  • Conversation state: approved summary and user preferences.
  • Episodic memory: selected past events.
  • Semantic memory: retrievable facts/documents.
  • Workflow state: durable step/status/approval record.

Memory is data storage and must obey authorization, retention, deletion, residency, and purpose limits. Do not store a whole conversation forever because the SDK makes it easy.

How does Microsoft Foundry help?

Current Microsoft Foundry agent capabilities can provide model/tool integration, hosted agents, workflows, memory, tracing, evaluation, and governance. Feature names, availability, and APIs change. Build around your own identity, policy, audit, and business state so the system is not dependent on a playground configuration.

Create the same read-only test agent through the Portal or the SDK. In either method, use an approved model deployment, one narrow read-only tool, synthetic data, fixed step/token/time budgets, and a non-production project.

Ways to build

Choose the Azure tool you want to use. The underlying resource stays the same.

Microsoft Foundry portal

Open the Foundry project → Agents → Create agent. Name it northstar-readonly, select the approved model deployment, add bounded instructions, and allow only the approved read-only knowledge/tool connection. Configure current safety and tracing options, test an allowed and denied request with synthetic data, inspect the trace, then save/version it for a controlled release.

SDK

Install and pin the packages from the current Microsoft Foundry agents quickstart, authenticate with DefaultAzureCredential, and construct the project client from FOUNDRY_PROJECT_ENDPOINT. Use the SDK's current create-agent or create-version operation to set:

  1. Name northstar-readonly and the approved deployment from MODEL_DEPLOYMENT_NAME.
  2. The same bounded instructions used in the Portal.
  3. Only the reviewed read-only tool/knowledge connection by its project connection ID.
  4. The supported safety, tracing, and maximum-step settings.

Create a thread/run with a synthetic allowed request, poll with a bounded timeout, inspect tool calls and the final response, then repeat with a request the tool must reject. Record the agent/version identifier with the evaluation result and delete the test agent after the lab. SDK method names can change, so compile the current Microsoft quickstart unchanged before wrapping it in application code.

SDK/CLI options should follow the current Foundry agent quickstart. Pin API/package versions and record agent version with every trace.

What does human approval require?

The approval screen must show:

  • Exact action and target.
  • Key parameters and expected effect.
  • Evidence/source used.
  • Cost or risk where relevant.
  • Expiry and one-time approval token.
  • Approver identity and decision.

Approval is not “the agent asked are you sure in chat.” Trusted backend code must cryptographically bind approval to the exact proposed action and reject changed parameters.

What is the MCP security model?

Model Context Protocol can standardize discovery and invocation of tools/resources. Treat every MCP server as code with authority. Allowlist servers and tools, authenticate connections, validate outputs as untrusted data, restrict network/file access, log invocations, and isolate high-risk servers. A tool description is not a security boundary.

How do agents fail?

  • Prompt injection changes tool intent.
  • Tool output injects new instructions.
  • The loop repeats or multiplies work.
  • Stale memory overrides current facts.
  • A tool succeeds but the acknowledgement is lost, causing duplicate action.
  • Partial failure leaves inconsistent state.
  • A model/version change alters tool selection.

Use durable workflow state, idempotency keys, compensating actions, circuit breakers, and replay-safe steps. Escalate when the state is ambiguous.

Production readiness checklist

  • Tool inventory and risk classification.
  • Least-privilege workload identities.
  • Input/output schemas and validation.
  • Approval matrix for consequential actions.
  • Step/token/time/cost budgets.
  • Prompt-injection and exfiltration tests.
  • Durable state and idempotency.
  • End-to-end traces with sensitive-data controls.
  • Offline and online evaluation.
  • Kill switch, incident response, and rollback.

Official references

  • Microsoft Foundry agents
  • Foundry observability
  • Model Context Protocol
  • Azure Well-Architected AI workloads