typespec-create-agent
github/awesome-copilot
Generate complete TypeSpec declarative agents for Microsoft 365 Copilot with instructions, capabilities, and conversation starters.
What is typespec-create-agent?
This skill generates a fully-formed TypeSpec declarative agent definition for Microsoft 365 Copilot. Use it when you need to create a new agent with custom instructions, capabilities, and conversation starters that guide user interactions.
- Generates main.tsp files with @agent decorator and metadata
- Creates behavioral instructions using @instructions decorator (up to 8,000 characters)
- Adds 2-4 conversation starters with titles and example queries
- Includes selected capabilities (WebSearch, OneDriveAndSharePoint, TeamsMessages, Email, People, CodeInterpreter, GraphicArt, GraphConnectors, Dataverse, Meetings)
- Applies scoping to capabilities (URLs, folders) for performance optimization
- Validates agent names (≤100 chars) and descriptions (≤1,000 chars)
How to install typespec-create-agent
npx skills add https://github.com/github/awesome-copilot --skill typespec-create-agent- TypeSpec compiler installed
- Access to Microsoft TypeSpec M365 Copilot libraries
- Understanding of desired agent capabilities and scope
How to use typespec-create-agent
- 1.Define the agent's purpose, role, and expertise area
- 2.List the specific capabilities the agent needs (WebSearch, OneDriveAndSharePoint, etc.)
- 3.Identify knowledge sources and data the agent should access
- 4.Describe typical user interactions and use cases
- 5.Review generated main.tsp file for accuracy
- 6.Deploy to Microsoft 365 Copilot environment
Use cases
- Create a customer support agent that searches knowledge bases and accesses Teams channels
- Build a research assistant with web search and document access capabilities
- Generate a meeting insights agent that accesses calendar and meeting content
- Define a data analysis agent with CodeInterpreter and Dataverse access
- Set up a team collaboration agent with email, Teams, and SharePoint integration
- Microsoft 365 Copilot developers
- Enterprise AI platform architects
- Teams and SharePoint administrators building custom agents
- Organizations creating domain-specific copilot assistants
typespec-create-agent FAQ
Instructions can be up to 8,000 characters. Use clear, second-person language ("You are...") to define behavior, expertise, and limitations.
Include 2-4 conversation starters. Make them diverse to showcase different agent capabilities and typical user interactions.
Yes. Capabilities like WebSearch, OneDriveAndSharePoint, and Email support optional scoping (URLs, folders) for better performance and security.
WebSearch, OneDriveAndSharePoint, TeamsMessages, Email, People, CodeInterpreter, GraphicArt, GraphConnectors, Dataverse, and Meetings.
Agent names must be 100 characters or less; descriptions must be 1,000 characters or less.
Full instructions (SKILL.md)
Source of truth, from github/awesome-copilot.
name: typespec-create-agent description: 'Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot'
Create TypeSpec Declarative Agent
Create a complete TypeSpec declarative agent for Microsoft 365 Copilot with the following structure:
Requirements
Generate a main.tsp file with:
-
Agent Declaration
- Use
@agentdecorator with a descriptive name and description - Name should be 100 characters or less
- Description should be 1,000 characters or less
- Use
-
Instructions
- Use
@instructionsdecorator with clear behavioral guidelines - Define the agent's role, expertise, and personality
- Specify what the agent should and shouldn't do
- Keep under 8,000 characters
- Use
-
Conversation Starters
- Include 2-4
@conversationStarterdecorators - Each with a title and example query
- Make them diverse and showcase different capabilities
- Include 2-4
-
Capabilities (based on user needs)
WebSearch- for web content with optional site scopingOneDriveAndSharePoint- for document access with URL filteringTeamsMessages- for Teams channel/chat accessEmail- for email access with folder filteringPeople- for organization people searchCodeInterpreter- for Python code executionGraphicArt- for image generationGraphConnectors- for Copilot connector contentDataverse- for Dataverse data accessMeetings- for meeting content access
Template Structure
import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";
using TypeSpec.Http;
using TypeSpec.M365.Copilot.Agents;
@agent({
name: "[Agent Name]",
description: "[Agent Description]"
})
@instructions("""
[Detailed instructions about agent behavior, role, and guidelines]
""")
@conversationStarter(#{
title: "[Starter Title 1]",
text: "[Example query 1]"
})
@conversationStarter(#{
title: "[Starter Title 2]",
text: "[Example query 2]"
})
namespace [AgentName] {
// Add capabilities as operations here
op capabilityName is AgentCapabilities.[CapabilityType]<[Parameters]>;
}
Best Practices
- Use descriptive, role-based agent names (e.g., "Customer Support Assistant", "Research Helper")
- Write instructions in second person ("You are...")
- Be specific about the agent's expertise and limitations
- Include diverse conversation starters that showcase different features
- Only include capabilities the agent actually needs
- Scope capabilities (URLs, folders, etc.) when possible for better performance
- Use triple-quoted strings for multi-line instructions
Examples
Ask the user:
- What is the agent's purpose and role?
- What capabilities does it need?
- What knowledge sources should it access?
- What are typical user interactions?
Then generate the complete TypeSpec agent definition.
Related skills
More from github/awesome-copilot and the wider catalog.

typespec-create-api-plugin
Generate TypeSpec API plugins for Microsoft 365 Copilot with REST operations, auth, and Adaptive Cards

unit-test-vue-pinia
Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases with behavior-first patterns.

update-avm-modules-in-bicep
Update Azure Verified Modules to latest versions in Bicep files with breaking change detection.

update-implementation-plan
Update implementation plan files with new requirements for features, refactoring, upgrades, and infrastructure changes.

update-llms
Keeps your repo's llms.txt navigation file accurate and spec-compliant as docs evolve.

update-markdown-file-index
Auto-generate and maintain file indexes in markdown documents from folder contents.