CopilotKit

Quickstart

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


Prerequisites#

Before you begin, you'll need the following:

  • A GitHub Personal Access Token (for GitHub Models API - free AI access)
  • .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 on our Enterprise Intelligence Platform to get a license key. You'll use it later to enable persistent threads, observability, 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 GitHub token is set correctly via user secrets
    • Both servers started successfully (check terminal output)

GitHub Token Issues

  • If the agent fails with "GitHubToken not found":
    cd agent
    dotnet user-secrets set GitHubToken "$(gh auth token)"

.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

What's next?#

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