-
Notifications
You must be signed in to change notification settings - Fork 19
add quickstart claude agent before A365 extension #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ANTHROPIC_API_KEY= |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| # Claude Agent SDK + Microsoft 365 Agents SDK Quickstart | ||
|
|
||
| A sample integration demonstrating how to build an intelligent agent using the Claude Agent SDK within the Microsoft 365 Agents SDK. | ||
|
|
||
| ## Overview | ||
|
|
||
| This project combines two powerful SDKs: | ||
| - **Claude Agent SDK** - Provides AI agent capabilities powered by Anthropic's Claude models | ||
| - **Microsoft 365 Agents SDK** - Enables deployment and hosting of agents within the Microsoft 365 ecosystem | ||
|
|
||
| ## Architecture | ||
|
|
||
| ``` | ||
| User Message → M365 Agent SDK → Claude Agent SDK → Claude AI → Response | ||
| ``` | ||
|
|
||
| The agent receives messages through the M365 Agents SDK, processes them using Claude's Agent SDK, and returns intelligent responses. | ||
|
|
||
| ## Key Features | ||
|
|
||
| - **TypeScript/ESM** - Modern ES module syntax with full type safety | ||
| - **Agentic AI** - Claude Sonnet 4.5 with tool use capabilities (WebSearch, WebFetch) | ||
| - **Express Hosting** - HTTP server for agent communication | ||
| - **State Management** - Conversation state tracking with MemoryStorage | ||
| - **Error Handling** - Graceful error management and user feedback | ||
|
|
||
| ## Project Structure | ||
|
|
||
| ``` | ||
| src/ | ||
| ├── client.ts # Claude Agent SDK client wrapper | ||
| └── index.ts # M365 Agent SDK application & server | ||
| ``` | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Node.js 16+ | ||
| - Anthropic API key ([Get one here](https://console.anthropic.com/)) | ||
|
|
||
| ## Setup | ||
|
|
||
| 1. **Install dependencies:** | ||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| 2. **Configure environment:** | ||
| ```bash | ||
| cp .env.template .env | ||
| # Edit .env and add your ANTHROPIC_API_KEY | ||
| ``` | ||
|
|
||
| 3. **Build the project:** | ||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| ## Running the Agent | ||
|
|
||
| **Start the server:** | ||
| ```bash | ||
| npm start | ||
| ``` | ||
|
|
||
| **Test with M365 Agents Playground:** | ||
| ```bash | ||
| npm test | ||
| ``` | ||
|
|
||
| This runs the agent and playground in parallel for interactive testing. | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Claude Agent Defaults | ||
|
|
||
| Located in `src/client.ts`: | ||
| - **Model:** Claude Sonnet 4.5 (`claude-sonnet-4-5-20250929`) | ||
| - **Permission Mode:** Default (prompts for tool usage) | ||
| - **Max Turns:** 15 conversation turns | ||
| - **Continue Mode:** Enabled for context continuity | ||
|
|
||
| ### Custom Options | ||
|
|
||
| Override defaults in `src/index.ts`: | ||
| ```typescript | ||
| await claudeClient.invokeAgent(userMessage, { | ||
| model: 'claude-3-5-sonnet-20241022', | ||
| allowedTools: ['WebSearch', 'Read', 'Bash'], | ||
| maxTurns: 25 | ||
| }); | ||
| ``` | ||
|
|
||
| ## Development | ||
|
|
||
| **Watch mode (auto-compile):** | ||
| ```bash | ||
| npx tsc --watch | ||
| ``` | ||
|
|
||
| **Run without building:** | ||
| ```bash | ||
| npm run start:anon | ||
| ``` | ||
|
|
||
| ## Documentation | ||
|
|
||
| - [Claude Agent SDK](https://docs.claude.com/en/docs/agent-sdk/typescript) | ||
| - [Microsoft 365 Agents SDK](https://learn.microsoft.com/en-us/microsoft-365/agents-sdk/) | ||
|
|
||
| ## License | ||
|
|
||
| MIT | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.