Back to templates

Template details

Claude Managed Agents Template

Vercel template for building a Claude Managed Agents knowledge assistant that searches GitHub, Notion, and Slack via MCP.

About this template

The Claude Managed Agents Template is a Vercel-deployable boilerplate from Vercel Labs for building an internal knowledge agent that lets users query GitHub, Notion, and Slack through a single chat interface powered by Claude Managed Agents.

What is the Claude Managed Agents Template?

This open-source starter implements a full-stack chat application on Next.js 16 with the App Router and React 19. It takes MCP-connected data sources — GitHub, Notion, and Slack — as inputs and produces a web UI where authenticated users can ask questions across all of them. The template is built by Vercel Labs, is deployed to Vercel, and communicates with Anthropic's Claude Managed Agents API through the official @anthropic-ai/sdk.

Key Features

  • Next.js 16 App Router + React 19 — the application is built on Next.js 16 using the App Router, with React 19 for server and client components.
  • Claude Managed Agents integration — lib/managed-agents.ts creates sessions and sends messages via the Anthropic SDK, backed by ANTHROPIC_AGENT_ID and ANTHROPIC_ENVIRONMENT_ID.
  • MCP-connected data sources — connect GitHub, Notion, and Slack through Model Context Protocol servers so the agent can search across your company's tools.
  • Better Auth with Sign in with Vercel — authentication uses Better Auth with Vercel OIDC, and optionally GitHub OAuth for the GitHub integration.
  • Neon + Drizzle ORM — the schema in lib/schema.ts defines Better Auth tables plus managed agent tables, persisted to Neon Postgres.
  • Workflow SDK background task — app/workflows/tail-session.ts is a durable workflow that polls Anthropic events and stores them in Postgres.
  • shadcn/ui + Tailwind CSS v4 — the UI is styled with shadcn/ui components and Tailwind CSS v4.
  • One-click Vercel deployment — the Deploy button clones the repo, sets the required environment variables, and provisions a Neon storage integration.

Who should use the Claude Managed Agents Template?

  • Developers building internal AI assistants — they can clone the repository to get a working chat agent with session management, event polling, and persistence, then extend it with their own MCP servers.
  • Teams that want a company-wide knowledge search — the deployed app gives employees a single interface to ask questions that span code, documentation, and Slack conversations.
  • Anthropic API users — anyone looking for a reference implementation of Claude Managed Agents can study the REST API routes in app/api/managed-agents/ for session, message, and transcript handling.

What can you do with it?

  • Engineering teams: connect GitHub and Slack, then ask questions about recent commits and discussions without opening separate tools.
  • Product teams: connect Notion and Slack to search meeting notes, decisions, and project documentation from one search box.
  • Support teams: set up an internal knowledge assistant that answers questions about product documentation stored in Notion.

How does it work?

The quickstart walks through cloning the repo, installing the claude-api and vercel/workflow skills via npx, linking a Vercel project, and adding Neon. After deployment, the proxy.ts auth guard redirects unauthenticated users on protected routes. When a user sends a message, the REST API routes create a managed agent session and send it through the Anthropic SDK, while the durable Workflow SDK task polls events and persists the conversation to Postgres.

FAQ

Do I need an Anthropic API key?

Yes. You must set ANTHROPIC_API_KEY (from console.anthropic.com), ANTHROPIC_AGENT_ID, and ANTHROPIC_ENVIRONMENT_ID (from a Managed Agents environment) before the agent can respond.

How do I connect GitHub?

Create a GitHub OAuth app and set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET as optional environment variables. This enables the GitHub data source via MCP.

What database does this template use?

It uses Neon Postgres with Drizzle ORM. The Drizzle schema in lib/schema.ts includes both Better Auth authentication tables and the tables needed for managed agent sessions and messages.

Can I run this without Vercel?

The template is designed for Vercel: the Deploy button preconfigures environment variables, and the quickstart uses vercel link and vercel integration add neon. You would need to supply the Vercel OAuth credentials (VERCEL_CLIENT_ID and VERCEL_CLIENT_SECRET) to run it elsewhere.

screenshot of Claude Managed Agents Template on template0.com