alpha

Lays down development guidelines for Microsoft 365 Copilot declarative agents: schema v1.5 limits, capabilities, TypeSpec and Agents Toolkit workflows.
description: Comprehensive development guidelines for Microsoft 365 Copilot declarative agents with schema v1.5, TypeSpec integration, and Microsoft 365 Agents Toolkit workflows
applyTo: "**.json, **.ts, **.tsp, **manifest.json, **agent.json, **declarative-agent.json"
Microsoft 365 Copilot declarative agents are powerful custom AI assistants that extend Microsoft 365 Copilot with specialized capabilities, enterprise data access, and custom behaviors. These guidelines provide comprehensive development practices for creating production-ready agents using the latest v1.5 JSON schema specification with full Microsoft 365 Agents Toolkit integration.
{
"$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.5/schema.json",
"version": "v1.5",
"name": "string (max 100 characters)",
"description": "string (max 1000 characters)",
"instructions": "string (max 8000 characters)",
"capabilities": ["array (max 5 items)"],
"conversation_starters": ["array (max 4 items, optional)"]
}
# Install Microsoft 365 Agents Toolkit
# Extension ID: teamsdevapp.ms-teams-vscode-extension
import "@typespec/json-schema";
using TypeSpec.JsonSchema;
@jsonSchema("/schemas/declarative-agent/v1.5/schema.json")
namespace DeclarativeAgent;
/** Microsoft 365 Declarative Agent */
model Agent {
/** Schema version */
@minLength(1)
$schema: "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.5/schema.json";
/** Agent version */
version: "v1.5";
/** Agent name (max 100 characters) */
@maxLength(100)
@minLength(1)
name: string;
/** Agent description (max 1000 characters) */
@maxLength(1000)
@minLength(1)
description: string;
/** Agent instructions (max 8000 characters) */
@maxLength(8000)
@minLength(1)
instructions: string;
/** Agent capabilities (1-5 items) */
@minItems(1)
@maxItems(5)
capabilities: AgentCapability[];
/** Conversation starters (max 4 items) */
@maxItems(4)
conversation_starters?: ConversationStarter[];
}
/** Available agent capabilities */
union AgentCapability {
"WebSearch",
"OneDriveAndSharePoint",
"GraphConnectors",
"MicrosoftGraph",
"TeamsAndOutlook",
"PowerPlatform",
"BusinessDataProcessing",
"WordAndExcel",
"CopilotForMicrosoft365",
"EnterpriseApplications",
"CustomConnectors"
}
/** Conversation starter definition */
model ConversationStarter {
/** Starter text (max 100 characters) */
@maxLength(100)
@minLength(1)
text: string;
}
# Compile TypeSpec to JSON manifest
tsp compile agent.tsp --emit=@typespec/json-schema
{
"name": "${DEV_AGENT_NAME}",
"description": "Development version: ${AGENT_DESCRIPTION}",
"instructions": "${AGENT_INSTRUCTIONS}",
"capabilities": ["${REQUIRED_CAPABILITIES}"]
}
{
"name": "${PROD_AGENT_NAME}",
"description": "${AGENT_DESCRIPTION}",
"instructions": "${AGENT_INSTRUCTIONS}",
"capabilities": ["${PRODUCTION_CAPABILITIES}"]
}
// Validate against v1.5 schema
const schema = await fetch('https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.5/schema.json');
const validator = new JSONSchema(schema);
const isValid = validator.validate(agentManifest);
// Validation helper functions
function validateName(name: string): boolean {
return name.length > 0 && name.length <= 100;
}
function validateDescription(description: string): boolean {
return description.length > 0 && description.length <= 1000;
}
function validateInstructions(instructions: string): boolean {
return instructions.length > 0 && instructions.length <= 8000;
}
# Start Agents Playground
npm install -g @microsoft/agents-playground
agents-playground start --manifest=./agent.json
graph LR
A[TypeSpec Definition] --> B[JSON Compilation]
B --> C[Local Testing]
C --> D[Validation]
D --> E[Staging Deployment]
E --> F[Production Release]
{
"name": "MyAgent v1.2.0",
"description": "Production agent with enhanced capabilities",
"version": "v1.5",
"metadata": {
"version": "1.2.0",
"build": "20241208.1",
"environment": "production"
}
}
{
"instructions": "You are a specialized financial analyst agent. Always provide disclaimers for financial advice.",
"behavior_overrides": {
"response_tone": "professional",
"max_response_length": 2000,
"citation_requirements": true
}
}
{
"name": {
"en-US": "Financial Assistant",
"es-ES": "Asistente Financiero",
"fr-FR": "Assistant Financier"
},
"description": {
"en-US": "Provides financial analysis and insights",
"es-ES": "Proporciona análisis e insights financieros",
"fr-FR": "Fournit des analyses et insights financiers"
}
}
// Structured logging for agent interactions
const log = {
timestamp: new Date().toISOString(),
agentName: "MyAgent",
version: "1.2.0",
userId: "user123",
capability: "WebSearch",
responseTime: 1250,
success: true
};
This comprehensive guide ensures robust, scalable, and maintainable Microsoft 365 Copilot declarative agents with full TypeSpec and Microsoft 365 Agents Toolkit integration.
© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com


Night megacity evacuation as alien structure arrives
Generates a 45-second sci-fi thriller about a survivor fleeing a rainy megacity as a huge alien structure arrives, with a beat sheet and continuity lock.
video-prompt, sci-fi, cinematic, photorealistic, timed-beats, multi-shot, trailer, character-consistency, negative-prompt, guardrails, futuristic, night-scene, rain, cityscape, woman, aerial-view, dramatic-lighting, camera-movement, spaceships, visual-effects, seedance, for-filmmakers, long-form, structured-output, neon

Black luxury sedan city ad ending with a kiss
Generates a 15-second photorealistic luxury car commercial in four timed shots through a dusk city, ending with the driver blowing a kiss.
video-prompt, video-ad, multi-shot, timed-beats, cars, camera-movement, tracking-shot, photorealistic, cinematic, cityscape, luxury, low-angle, product-video, bokeh, night-scene, for-filmmakers, for-marketers, advertising, negative-prompt, hailuo, long-form, woman

3D cartoon boy stepping out of a sketchbook drawing
Draws a cute 3D cartoon boy stepping out of a pencil-sketch page of a sketchbook on a wooden desk, lit by warm fairy lights.
image-prompt, 3d-render, pixar-style, cartoon, character-design, cozy, bokeh, surreal, whimsical, soft-lighting, studio-lighting, still-life, illustration, sketch, nano-banana, quick, text-rendering, cinematic
Loading reviews…
Loading comments…