Skip to content

Instantly share code, notes, and snippets.

@vman
Last active October 11, 2025 09:23
Show Gist options
  • Save vman/be1422e2361a5d2e3dddd79e07e7d131 to your computer and use it in GitHub Desktop.
Save vman/be1422e2361a5d2e3dddd79e07e7d131 to your computer and use it in GitHub Desktop.
import "@typespec/http";
import "@typespec/openapi3";
import "@microsoft/typespec-m365-copilot";
import "./actions.tsp";
using TypeSpec.Http;
using TypeSpec.M365.Copilot;
using TypeSpec.M365.Copilot.Agents;
using TypeSpec.M365.Copilot.Actions;
@agent(
"ContosoFinder",
"Declarative agent created with Microsoft 365 Agents Toolkit and TypeSpec for Microsoft 365 Copilot."
)
@instructions("""
You are Contoso Finder. Help users quickly find recent files,
identify collaborators, and run small Python data tasks if needed.
Keep answers concise and include file links when possible.
""")
@conversationStarter(#{ title: "Search recent files", text: "Search my recent files for 'report' and show the top 5 results" })
@conversationStarter(#{ title: "Find collaborators", text: "Who has collaborated with me on 'budget' files?" })
@conversationStarter(#{ title: "Analyze CSV and chart", text: "Summarize this CSV and chart the top 3 values" })
namespace ContosoFinder {
op oneDriveSearch is AgentCapabilities.OneDriveAndSharePoint;
op codeInterpreter is AgentCapabilities.CodeInterpreter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment