An agent in three lines — and what happens next

Foundry Hosted Agent deploys an agent in three lines of C#. We examine why deployment is not production readiness and what actually closes the gap.

  • Three Lines Versus Four Areas of Work
  • Deployment reduces time to the first response
  • The Harness: Engineering That Does Not Make the Demo
  • The agent must go where the business operates

Three Lines Versus Four Areas of Work

Microsoft demonstrated an agent built on Microsoft Agent Framework that runs as a Foundry Hosted Agent with three lines of C#—without a Dockerfile, web server, manual authorization, or scaling configuration. The same blog series also covered bringing a personal finance agent to production, and the count there is different: at least four separate areas of engineering work. The gap between these two articles shows where businesses are losing money on AI agents in 2026.

Deployment reduces time to the first response

  1. Foundry Hosted Agent eliminates the traditional task list: containers, web servers, session storage, scaling rules, and telemetry.

  2. Previously, this required a separate project as large as the agent itself.

  3. Now a console application built on Agent Framework becomes a managed cloud service in minutes.

  4. This is a real saving—but it reduces the time to the agent's first response.

  5. This saving does not reduce the time to the result the business actually pays for.

The Harness: Engineering That Does Not Make the Demo

  1. In a companion article, the authors prepare a personal finance agent for use by external users across four dimensions.

  2. First is observability through OpenTelemetry: without it, it is unclear why the agent made a particular decision, and investigating an incident becomes guesswork based on chat logs.

  3. Second is action confirmation: the agent asks for permission before a transaction because an error in a financial scenario costs the client real money.

  4. Third is memory: the agent remembers what matters instead of rebuilding the context every time and wasting tokens and the user's time.

  5. Fourth is capability management: loading skills on demand, working with files through the shell, performing computations through CodeAct, and delegating research tasks to background agents.

  6. None of these points is visible in a demo with a satisfied client.

  7. Each one addresses a specific risk that would otherwise surface a month after launch.

Assess where AI can deliver impact in your process

The agent must go where the business operates

Microsoft has also released channels for agents and workflows: the same agent can be exposed as an OpenAI Responses-compatible service, connected to Telegram, handed off to another agent via A2A, or served through an MCP client. A compact shared hosting core plus modular integrations for each channel turns the communication protocol into configuration. For integrators, this removes a common headache: instead of writing a separate adapter for each channel, they now change the package.

Tests must verify what actually runs

If the agent is published as a Native AOT application—the standard path for cold starts in the cloud—ahead-of-time compilation removes unused code and requires reflection alternatives. In this situation, managed tests do not test what will reach production: a green CI run says nothing about the compiled binary's behavior. MSTest 4.4 closes the gap by generating the test list at build time, before trimming, without rewriting test classes.

A small detail, but details like this are what separate “works for us” from “works for the client.”

TTU is measured across the entire system

For an agent, TTU is the time until the business can trust it to take an action without an engineer watching. The first console response is unrelated to this milestone: three lines of code produce it almost immediately, while trust requires observability, confirmations, memory, honest tests, and the right channels.

In KT.Team projects, this means MCP as a unified protocol for tool access; LLM & Security Gateway as a confirmation and control layer before an agent running on Claude or GigaChat writes anything to a live system; and RAG with versioned memory instead of a chat that forgets context the next day. The seemingly simple result—an agent you can trust—requires exactly this hidden work.

Conclusion

  1. A three-line deployment is the start of a project, not the finish.

  2. What deserves praise is how many of the harness's four dimensions are covered before the agent gets access to money, data, or customers.

  3. Until these dimensions are covered, you have a demo.

  4. The first dissatisfied client usually reveals the difference between a demo and a production agent.

Discuss the article: Three-Line Agent: What Happens…

Enter your email or phone number so we can get back to you.

Send via: