# Introduction

> Bring your Microsoft Agent Framework agents to your users with CopilotKit via AG-UI.

## Bring your Microsoft Agent Framework agents to your users

The Microsoft Agent Framework runs your agents. CopilotKit gives them a surface your users can see, interrupt and steer.

[Quickstart](/ms-agent-python/quickstart)

## Build with Microsoft Agent Framework

The Microsoft Agent Framework gives you the agent: tools, threads and the host that runs them, in Python or .NET. What it does not give you is the surface. Your users need a place to talk to the agent, a view of the run while it works, and a way to step in. Each capability below builds on something your agent already does.

- [Generative UI](/ms-agent-python/generative-ui): Your agent calls tools and updates state as it runs. CopilotKit streams both to the browser and renders them as React components your users watch update while the agent works.
- [Human-in-the-loop](/ms-agent-python/human-in-the-loop): Your agent can pause for a decision, or call a tool that lives in the browser. CopilotKit renders your own UI for either and resumes the run with the user's answer.
- [Shared state](/ms-agent-python/shared-state): Threads carry state between turns on the server. CopilotKit mirrors it into your app and back. Changes from the user and from the agent go to the same state.

Chat surfaces, headless UI, frontend tools and multi-agent flows work with the Microsoft Agent Framework too. [And more](/ms-agent-python/build-with-agents)

## Start building

Scaffold a new app with the CLI, or follow the quickstart to connect the Microsoft Agent Framework agent you already run.

```bash
npx copilotkit@latest init
```

[Read the quickstart](/ms-agent-python/quickstart)

## Connect your agent

Your agent keeps running as its own service, with the AG-UI bridge from agent_framework_ag_ui in front of it. CopilotKit reaches that service over HTTP, so nothing inside the agent changes.

```ts title="app/api/copilotkit/[[...slug]]/route.ts"
import {
  CopilotRuntime,
  createCopilotRuntimeHandler,
} from "@copilotkit/runtime/v2";
import { HttpAgent } from "@ag-ui/client";

const runtime = new CopilotRuntime({
  agents: {
    my_agent: new HttpAgent({ url: process.env.AGENT_URL! }),
  },
});

const handler = createCopilotRuntimeHandler({
  runtime,
  basePath: "/api/copilotkit",
});

export const GET = handler;
export const POST = handler;
```

[Read the setup guide](/ms-agent-python/quickstart)
