Quickstart

Turn your Microsoft Agent Framework agent into an agent-native application in 10 minutes.


Build agents that get smarter with every use.

Rich Threads keep messages, generative UI, and tool activity available across sessions and devices.

Learning turns real usage into skills that improve your agent.

Build a new agent or bring one you already have. Any frontend, any backend.

Prerequisites#

Before you begin, you'll need the following:

  • An OpenAI API key for the .NET starter
  • .NET 9.0 SDK or later
  • Node.js 20+
  • Your favorite package manager (npm, pnpm, yarn, or bun)

Getting started#

Create a free account#

Sign up for a free developer account for CopilotKit Intelligence to get a license key. You'll use it later to enable persistent threads and the inspector.

Choose your starting point#

You can either start fresh with our starter template or integrate CopilotKit into your existing Microsoft Agent Framework agent.

🎉 Start chatting!#

Your AI agent is now ready to use! Try asking it some questions:

Can you tell me a joke?
Can you help me understand AI?
What do you think about .NET?
Troubleshooting

Agent Connection Issues

  • If you see "I'm having trouble connecting to my tools", make sure:
    • The C# agent is running on port 8000
    • Your OpenAI API key is set via .NET user secrets
    • Both servers started successfully (check terminal output)

OpenAI API Key Issues

  • If the agent fails with "OPENAI_API_KEY not found":
    cd agent
    dotnet user-secrets set OPENAI_API_KEY "<your-openai-api-key>"

.NET SDK Issues

  • Verify .NET SDK is installed:
    dotnet --version  # Should be 9.0.x or higher
  • Restore packages manually if needed:
    cd agent
    dotnet restore
    dotnet run

Port Conflicts

  • If port 8000 is already in use, you can change it in:
    • agent/Properties/launchSettings.json - Update applicationUrl
    • src/app/api/copilotkit/route.ts - Update the remote endpoint URL

Open Inspector and confirm setup#

On localhost, click the Inspector button in the corner of the app.

  1. Open Agents, then Agent. Your agent is listed.
  2. Send a chat message. Open Agents, then AG-UI Events. Events are moving.
  3. Open Threads. The list is unlocked (Intelligence is on), or locked with Enable Intelligence (Intelligence is off).

More detail: Inspector.

What's next?#

Now that you have your basic agent setup, explore these advanced features: