Content review squad deployed as an HTTP-triggered Azure Function. A multi-agent review pipeline analyzes submitted content through three specialist agents: tone reviewer, technical reviewer, and copy editor. Results are aggregated into a structured JSON response with per-agent scores and findings.
- Node.js >= 20
- npm
- Azure Functions Core Tools (for
func start) - The SDK must be built first:
cd ../../ && npm run build
- Install dependencies:
npm install - Build the TypeScript:
npm run build - Start the Azure Functions runtime:
func start - Send a request:
curl -X POST http://localhost:7071/api/squad-prompt \ -H "Content-Type: application/json" \ -d '{"prompt": "Azure Functions now supports Node.js v20. This is great!"}'
Or simply run: npm start (builds and starts the runtime automatically).
- How to use
defineSquad(),defineTeam(),defineAgent(), anddefineRouting()to compose a squad configuration - How to wire an Azure Function HTTP trigger to a Squad SDK application
- How to aggregate results from multiple specialist agents into a structured response
- How to structure agent definitions with capabilities and model constraints
- How to deploy a Squad application to a serverless platform
The sample defines a review squad with three specialist agents using the SDK builder API. When an HTTP POST is received at /api/squad-prompt with a {"prompt": "..."} body, the Azure Function loads the squad config, instantiates the review agents, and distributes the content for analysis. Each agent reviews the content according to its role: the tone reviewer assesses audience fit and engagement, the technical reviewer checks factual accuracy and code validity, and the copy editor reviews grammar and readability. The function aggregates results and returns a JSON response with per-agent scores, findings, and an overall consensus.
When you send a POST request:
{
"prompt": "Building multi-agent systems with the Squad SDK is straightforward...",
"timestamp": "2026-03-06T10:30:00.000Z",
"reviews": [
{
"agent": "tone-reviewer",
"role": "Tone & Voice Analyst",
"score": 7,
"findings": [
{
"severity": "info",
"message": "Code blocks detected. Ensure surrounding prose provides adequate context."
}
],
"summary": "Tone is neutral. Consider adding variety to maintain reader interest."
},
{
"agent": "technical-reviewer",
"role": "Technical Accuracy Checker",
"score": 9,
"findings": [
{
"severity": "info",
"message": "Code blocks present. Verify snippets compile and match behavior."
}
],
"summary": "Technical review complete. Code blocks verified."
},
{
"agent": "copy-editor",
"role": "Copy Editor",
"score": 8,
"findings": [
{
"severity": "suggestion",
"message": "Passive voice detected. Consider rewriting in active voice."
}
],
"summary": "Reviewed 6 sentences. Avg sentence length: 12 words."
}
],
"overallScore": 8,
"consensus": "✅ Content is publication-ready with minor suggestions."
}| File | Purpose |
|---|---|
src/functions/squad-prompt.ts |
Azure Function HTTP trigger — entry point |
src/squad/config.ts |
Squad configuration using builder API |
src/squad/handlers.ts |
Agent review handlers (mock logic for demo) |
host.json |
Azure Functions host configuration |
local.settings.json |
Local development settings |
package.json |
Dependencies and scripts |
tsconfig.json |
TypeScript configuration |
To make this production-ready:
- Replace mock handlers with real
SquadClientcalls for live reviews - Add
StreamingPipelinefor long-running reviews - Wire up
CostTrackerfor per-review cost monitoring - Add
defineHooks()for PII scrubbing on submitted content - Deploy to Azure with
func azure functionapp publish
TypeScript must be compiled before the Azure Functions runtime can find the function. npm start handles this automatically:
npm start # npm run build && func startOr build separately:
npm run build # Compile TypeScript to dist/
func start # Start runtime- See autonomous-pipeline for a full showcase of Squad SDK features
- Check the Squad SDK documentation for builder API details
- Review Azure Functions documentation for deployment options