Add agent-swarms E2E sample#18
Open
larohra wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new end-to-end samples/agent-swarms sample that packages a FastAPI-based swarm orchestration service, ACA sandbox execution adapters, Azure deployment assets, and sample-specific docs/tests so users can deploy and run agent swarms against GitHub repos.
Changes:
- Adds the new
agent-swarmssample application, including API, orchestration, storage, sandbox, auth, and GitHub publishing code. - Adds deployment assets for
azd, Bicep, Docker packaging, sandbox-image creation, and sample-local configuration. - Adds contract/integration-style tests plus sample README/quickstart/architecture/troubleshooting docs and links the sample from the repo root README.
Reviewed changes
Copilot reviewed 55 out of 56 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
samples/agent-swarms/tests/test_sandbox_adapter_contract.py |
Adds contract tests for log tailing and redaction helpers. |
samples/agent-swarms/tests/test_request_validation_contract.py |
Adds request/settings validation contract tests. |
samples/agent-swarms/tests/test_public_http_contract.py |
Adds API/OpenAPI/SSE contract coverage for public routes. |
samples/agent-swarms/tests/test_external_sample_layout.py |
Verifies docs/infra/layout expectations for the sample. |
samples/agent-swarms/tests/contract_support.py |
Adds shared test helpers for imports, paths, OpenAPI, and scratch files. |
samples/agent-swarms/src/agent_swarm_service/services/swarm_runs.py |
Implements the main run service facade over orchestration and secret storage. |
samples/agent-swarms/src/agent_swarm_service/services/__init__.py |
Adds service package marker. |
samples/agent-swarms/src/agent_swarm_service/sandboxes/workspace.py |
Adds sandbox workspace staging/read helpers. |
samples/agent-swarms/src/agent_swarm_service/sandboxes/sandbox_groups.py |
Re-exports sandbox group client type. |
samples/agent-swarms/src/agent_swarm_service/sandboxes/logs.py |
Adds sandbox log redaction and local tail helpers. |
samples/agent-swarms/src/agent_swarm_service/sandboxes/aca_client.py |
Adds small ACA sandbox handle helpers. |
samples/agent-swarms/src/agent_swarm_service/sandboxes/__init__.py |
Adds sandbox package marker. |
samples/agent-swarms/src/agent_swarm_service/runtime/storage.py |
Adds in-memory/Azure storage backends for runtime state, queues, and leases. |
samples/agent-swarms/src/agent_swarm_service/runtime/__init__.py |
Re-exports runtime storage types/helpers. |
samples/agent-swarms/src/agent_swarm_service/orchestration/sandbox_execution.py |
Implements planner/worker/reviewer/merge sandbox execution flow. |
samples/agent-swarms/src/agent_swarm_service/orchestration/projections.py |
Builds summary/plan/tasks/details/event projection responses. |
samples/agent-swarms/src/agent_swarm_service/orchestration/models.py |
Defines swarm domain/config/projection models. |
samples/agent-swarms/src/agent_swarm_service/orchestration/__init__.py |
Adds orchestration package marker. |
samples/agent-swarms/src/agent_swarm_service/github/publishing.py |
Adds GitHub PR publishing integration. |
samples/agent-swarms/src/agent_swarm_service/github/__init__.py |
Adds GitHub package marker. |
samples/agent-swarms/src/agent_swarm_service/dependencies.py |
Adds FastAPI dependency providers and sandbox log chunk helper. |
samples/agent-swarms/src/agent_swarm_service/config.py |
Adds typed environment/settings loading and defaults. |
samples/agent-swarms/src/agent_swarm_service/auth/session_store.py |
Adds run-scoped GitHub PAT storage abstractions. |
samples/agent-swarms/src/agent_swarm_service/auth/__init__.py |
Adds auth package marker. |
samples/agent-swarms/src/agent_swarm_service/app.py |
Wires the FastAPI app, runtime host, storage, clients, and routers. |
samples/agent-swarms/src/agent_swarm_service/api/sse.py |
Adds SSE event formatting helper. |
samples/agent-swarms/src/agent_swarm_service/api/schemas.py |
Defines request/response schemas for the public API. |
samples/agent-swarms/src/agent_swarm_service/api/routers/swarm_runs.py |
Adds run CRUD/control/SSE/logstream routes. |
samples/agent-swarms/src/agent_swarm_service/api/routers/health.py |
Adds /health and /api/health routes. |
samples/agent-swarms/src/agent_swarm_service/api/routers/__init__.py |
Adds router package marker. |
samples/agent-swarms/src/agent_swarm_service/api/__init__.py |
Adds API package marker. |
samples/agent-swarms/src/agent_swarm_service/__init__.py |
Adds package version export. |
samples/agent-swarms/sandbox-image/run-role.py |
Adds baked sandbox entrypoint launcher. |
samples/agent-swarms/sandbox-image/README.md |
Documents building/pushing/registering the sandbox disk image. |
samples/agent-swarms/sandbox-image/Dockerfile |
Builds the private sandbox image contract. |
samples/agent-swarms/README.md |
Adds main sample documentation and usage instructions. |
samples/agent-swarms/pyproject.toml |
Declares sample package metadata and Python dependencies. |
samples/agent-swarms/infra/main.parameters.json |
Adds azd/Bicep parameter defaults. |
samples/agent-swarms/infra/main.bicep |
Provisions Azure resources for the sample. |
samples/agent-swarms/hooks/preprovision.sh |
Registers required Azure providers on POSIX. |
samples/agent-swarms/hooks/preprovision.ps1 |
Registers required Azure providers on Windows. |
samples/agent-swarms/docs/troubleshooting.md |
Adds deployment/runtime troubleshooting guidance. |
samples/agent-swarms/docs/quickstart.md |
Adds step-by-step deployment guide. |
samples/agent-swarms/docs/architecture.md |
Documents sample architecture and runtime flow. |
samples/agent-swarms/Dockerfile |
Adds the app container build for azd deployment. |
samples/agent-swarms/azure.yaml |
Adds azd project/service configuration. |
samples/agent-swarms/.gitignore |
Adds sample-local git ignore rules. |
samples/agent-swarms/.dockerignore |
Adds Docker build context exclusions. |
README.md |
Adds the new sample to the repo-level samples list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nd update documentation
…n, and improve path handling in tests
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a comprehensive, deployable sample called agent-swarms for orchestrating agent swarms using Durable Task Scheduler and ACA Sandboxes. The sample demonstrates how to plan, execute, review, and publish code changes to a GitHub repository using GitHub Copilot, with full Azure infrastructure-as-code, deployment automation, and detailed documentation. Key additions include the sample's code, deployment scripts, Dockerfile, and extensive documentation for setup, architecture, and usage.
Major additions and improvements:
1. New Sample: Agent Swarms
agent-swarms, illustrating how to orchestrate agent swarms with Durable Task Scheduler and ACA Sandboxes, including a FastAPI service, deployment automation, and integration with GitHub Copilot. [1] [2]2. Documentation
README.mdforagent-swarmscovering prerequisites, deployment steps, API usage, token handling, customization, local development, and cleanup.architecture.mddocument explaining the system's components, flow, and validation anchors.3. Deployment and Infrastructure
azure.yamlfor azd deployment, specifying preprovision hooks, Bicep infra, and container app service configuration..dockerignoreand.gitignorefiles to ensure clean Docker builds and proper source control hygiene. [1] [2]Dockerfileto build and package the FastAPI app with all dependencies, including vendored Azure SDKs and Copilot SDK, for deployment to Azure Container Apps.4. Repository Organization
README.mdto include the newagent-swarmssample in the samples table, making it discoverable for users.Verify that the following are valid
Other Information