TypeSpec Create Agent

TypeSpec Create Agent

Generates a complete TypeSpec declarative agent for Microsoft 365 Copilot, with instructions, conversation starters and capability declarations.

Skill files1 file
SKILL.md92 lines
1
---
2
name: typespec-create-agent
3
description: 'Generate a complete TypeSpec declarative agent with instructions, capabilities, and conversation starters for Microsoft 365 Copilot'
4
---
5
6
# Create TypeSpec Declarative Agent
7
8
Create a complete TypeSpec declarative agent for Microsoft 365 Copilot with the following structure:
9
10
## Requirements
11
12
Generate a `main.tsp` file with:
13
14
1. **Agent Declaration**
15
- Use `@agent` decorator with a descriptive name and description
16
- Name should be 100 characters or less
17
- Description should be 1,000 characters or less
18
19
2. **Instructions**
20
- Use `@instructions` decorator with clear behavioral guidelines
21
- Define the agent's role, expertise, and personality
22
- Specify what the agent should and shouldn't do
23
- Keep under 8,000 characters
24
25
3. **Conversation Starters**
26
- Include 2-4 `@conversationStarter` decorators
27
- Each with a title and example query
28
- Make them diverse and showcase different capabilities
29
30
4. **Capabilities** (based on user needs)
31
- `WebSearch` - for web content with optional site scoping
32
- `OneDriveAndSharePoint` - for document access with URL filtering
33
- `TeamsMessages` - for Teams channel/chat access
34
- `Email` - for email access with folder filtering
35
- `People` - for organization people search
36
- `CodeInterpreter` - for Python code execution
37
- `GraphicArt` - for image generation
38
- `GraphConnectors` - for Copilot connector content
39
- `Dataverse` - for Dataverse data access
40
- `Meetings` - for meeting content access
41
42
## Template Structure
43
44
```typescript
45
import "@typespec/http";
46
import "@typespec/openapi3";
47
import "@microsoft/typespec-m365-copilot";
48
49
using TypeSpec.Http;
50
using TypeSpec.M365.Copilot.Agents;
51
52
@agent({
53
name: "[Agent Name]",
54
description: "[Agent Description]"
55
})
56
@instructions("""
57
[Detailed instructions about agent behavior, role, and guidelines]
58
""")
59
@conversationStarter(#{
60
title: "[Starter Title 1]",
61
text: "[Example query 1]"
62
})
63
@conversationStarter(#{
64
title: "[Starter Title 2]",
65
text: "[Example query 2]"
66
})
67
namespace [AgentName] {
68
// Add capabilities as operations here
69
op capabilityName is AgentCapabilities.[CapabilityType]<[Parameters]>;
70
}
71
```
72
73
## Best Practices
74
75
- Use descriptive, role-based agent names (e.g., "Customer Support Assistant", "Research Helper")
76
- Write instructions in second person ("You are...")
77
- Be specific about the agent's expertise and limitations
78
- Include diverse conversation starters that showcase different features
79
- Only include capabilities the agent actually needs
80
- Scope capabilities (URLs, folders, etc.) when possible for better performance
81
- Use triple-quoted strings for multi-line instructions
82
83
## Examples
84
85
Ask the user:
86
1. What is the agent's purpose and role?
87
2. What capabilities does it need?
88
3. What knowledge sources should it access?
89
4. What are typical user interactions?
90
91
Then generate the complete TypeSpec agent definition.
92

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…