Last active
September 20, 2025 04:42
-
-
Save rido-min/b81d72ebced24a79165997224b0c1794 to your computer and use it in GitHub Desktop.
quote-agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { App } from '@microsoft/teams.apps' | |
| const app = new App() | |
| app.on('message', async ({ send, activity }) => { | |
| await send(`you said "${activity.text}"`) | |
| }) | |
| await app.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "module", | |
| "scripts": { | |
| "build": "tsc --build", | |
| "prestart": "npm run build", | |
| "start": "node ./dist/app.js" | |
| }, | |
| "dependencies": { | |
| "@microsoft/teams.apps": "^2.0.0", | |
| "@openai/agents": "^0.1.3" | |
| }, | |
| "devDependencies": { | |
| "typescript": "^5.9.2" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Agent, hostedMcpTool, run } from '@openai/agents' | |
| import { App } from '@microsoft/teams.apps' | |
| const agent = new Agent({ | |
| name: 'MCP Assistant', | |
| instructions: 'You must always use the MCP tools to answer questions.', | |
| tools: [ | |
| hostedMcpTool({ | |
| serverLabel: 'msdocs', | |
| serverUrl: 'https://learn.microsoft.com/api/mcp', | |
| }), | |
| ], | |
| }) | |
| const app = new App() | |
| app.on('message', async ({ send, activity }) => { | |
| send(`You said "${activity.text}", let me think...`) | |
| const result = await run(agent, activity.text); | |
| send(result.finalOutput!) | |
| }) | |
| app.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "target": "ES2022", | |
| "moduleResolution": "nodenext", | |
| "module": "nodenext", | |
| "outDir": "./dist", | |
| "rootDir": "./src", | |
| "tsBuildInfoFile": "./dist/.tsbuildinfo" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment