The governing document for this repository. Read this before contributing.
CommunityRAPP is the Azure Functions backend for the RAPP (Rapid Agent Prototyping Platform) ecosystem. It is the engine that powers agent creation, execution, and orchestration.
This repo does ONE thing well: it takes a transcript, discovery call, or user request and turns it into a production-ready AI agent deployed on Azure — with memory, multi-user support, and Microsoft 365 integration.
This is a community tool. Every file tracked in this repo must serve any user deploying their own instance — not just one project or customer.
| Category | Examples |
|---|---|
| Core Runtime | function_app.py, host.json, requirements.txt |
| Agents | Business agents that inherit from BasicAgent and do real work |
| Utilities | Storage, environment, results, Copilot Studio (API, templates, triggers) |
| Documentation | Architecture, API reference, deployment, Copilot Studio guides |
| Tests | Unit tests, integration tests, plumbing tests, live API tests |
| Demos | Scripted demo JSON files for the ScriptedDemoAgent |
| Deployment | ARM templates, .funcignore, CI/CD workflows, deployment configs |
| RAPP Pipeline | The 14-step methodology: discovery → MVP → code → quality gates → deploy |
| Power Platform Harness | MSFTAIBASMultiAgentCopilot_*.zip — the Copilot Studio solution that connects RAPP to Teams/M365 Copilot |
| Category | Why | Where Instead |
|---|---|---|
| Customer-specific agents or demos | Ties the repo to one engagement | Your local workspace or private fork |
Transpiled output (transpiled/) |
Generated artifacts — rebuild from source agents | Gitignored; lives locally |
| Project-specific solution ZIPs | Binary artifacts tied to one deployment | GitHub Releases or private storage |
RAPP project workspaces (.rapp/, rapp_projects/) |
Personal experiment data, archives | Gitignored; lives locally |
Customer-specific HTML (index-*.html) |
One-off UIs for specific customers | Your local workspace |
| Credentials or PII | Security risk | local.settings.json (gitignored) |
CommunityRAPP/
├── agents/ # Production agents (BasicAgent subclasses)
├── demos/ # Demo script JSON files
│ └── tools/ # Demo capture scripts, HTML tools, bookmarklets
├── docs/ # Documentation, architecture diagrams, PPT templates
├── tests/ # Test suite
├── utils/ # Core utilities
│ ├── copilot_studio/ # Templates, triggers, deploy config
│ └── triggers/ # Trigger engine (router, registry, models)
├── .claude/ # Claude Code configuration
├── .github/ # GitHub workflows, Copilot instructions
├── function_app.py # Main Azure Function entry point
├── host.json # Azure Functions host configuration
├── requirements.txt # Python dependencies
├── azuredeploy.json # ARM deployment template
├── index.html # Web chat interface
├── MSFTAIBASMultiAgentCopilot_*.zip # Copilot Studio harness (community asset)
├── CHANGELOG.md # Version history
├── CLAUDE.md # Claude Code guidance
├── CONSTITUTION.md # This file
├── README.md # Project readme
└── QUICK_START.md # Quick start guide
Gitignored (local-only, never tracked):
.rapp/ — RAPP ecosystem workspace, archives, experimentstranspiled/ — Generated Copilot Studio artifactsrapp_projects/ — Project working directories*.zip (except MSFTAIBASMultiAgentCopilot_*.zip) — Project-specific solution packagesindex-*.html — Customer-specific web UIslocal.settings.json — Credentials and configBasicAgent (agents/basic_agent.py)name — a clear, descriptive stringmetadata — valid JSON schema for OpenAI function callingperform(**kwargs) — the agent’s core logic.py file in agents/logging.info() and logging.error() for observabilityutils.storage_factory.get_storage_manager()requirements.txt (auto-install is a fallback, not a strategy)|||VOICE||| response delimiter contractEvery file in this repo must pass the “thousand strangers” test:
If a thousand developers cloned this repo tomorrow, would this file help them — or confuse them?
YOUR_* placeholders in docs, environment variables in codeMSFTAIBASMultiAgentCopilot_*.zip) which is a community asset needed for Power Platform integrationtranspiled/, rapp_projects/, .rapp/ live locallylocal.settings.template.json, not local.settings.jsonAsk yourself:
python tests/run_tests.py must succeedlocal.settings.json or API keysfeature/agent-name # New agent
fix/issue-description # Bug fix
docs/topic # Documentation
refactor/component # Code improvement
The production deployment target is Azure Functions (Flex Consumption) with:
USE_IDENTITY_BASED_STORAGE)func azure functionapp publish --build remote)businessinsightbot_function (main) + copilot_studio_trigger (Copilot Studio)The main API contract:
// Request
POST /api/businessinsightbot_function
{
"user_input": "string",
"conversation_history": [],
"user_guid": "optional-guid"
}
// Response
{
"assistant_response": "formatted markdown |||VOICE||| concise voice text",
"voice_response": "concise voice text",
"agent_logs": "what agents did",
"user_guid": "the-user-guid"
}
Do not change this contract without updating all consumers.
.local_storage/ (local dev)USE_IDENTITY_BASED_STORAGE=true for identity-based storage accessget_storage_manager() auto-detects environmentThe default GUID (c0p110t0-aaaa-bbbb-cccc-123456789abc) is intentionally invalid — it’s a guardrail against accidental database insertion. See CLAUDE.md for details.
This repo follows the standards:
lsBasicAgent, they do one thingThis repo welcomes contributions from community forks. When integrating external contributions:
Co-authored-by: trailers in commits| Contributor | Fork | Contributions |
|---|---|---|
| Bill Whalen | CommunityRAPP-BillWhalen | Agent transpiler, Copilot Studio integration, performance optimizations, trigger system, MCS templates, architecture diagrams |
local.settings.json or any file containing API keys/connection stringscustomers/masterchief/, customers/cortana/)MSFTAIBASMultiAgentCopilot_*.zip is allowed)microsoftzune as a demo identifier)YOUR_* placeholder namesWhen transpiling Python agents (.py) to Copilot Studio native solutions, all metadata MUST be sourced directly from the original .py agent files — never invented, abbreviated, or left empty. This ensures no fidelity is lost between the Python agent and its Copilot Studio counterpart.
| Python Agent Field | Copilot Studio Target | Notes |
|---|---|---|
self.metadata["description"] |
bot.xml <description> tag AND botcomponent.xml <description> tag |
This is what the orchestrator sees when adding sub-agents. If empty, the orchestrator cannot pick the agent. |
self.metadata["description"] |
GPT component displayName |
Short name shown in UI |
System prompt / docstring / self.metadata |
GPT component instructions field in data file |
Full detailed instructions — must match the depth of the .py agent’s behavior |
self.metadata["parameters"]["properties"] |
Topic trigger phrases + question nodes | Each parameter becomes a data collection step |
self.metadata["parameters"]["properties"]["action"]["enum"] |
Individual topics (one per action) | Each action in perform() maps to a topic |
| Class docstring | Agent description in solution manifest | High-level purpose |
self.metadata["description"] in the .py file.instructions in the data file must be as detailed as the Python agent’s actual behavior — including all parameters, response formats, error handling, and edge cases..py agent doesn’t do something, the Copilot Studio version must not claim to either.isAgentConnectable must be true for any agent intended to be used as a sub-agent by an orchestrator.This article codifies the relationship between the RAPP Brainstem (T1) and CommunityRAPP (T2/T3), and the bridge between them.
Start small, layer up when ready.
Users begin with the brainstem alone. They are never pushed to T2/T3. The hatchery agent is loaded only when the user explicitly asks for the next step.
The one-liner IS the onboarding.
Every tier of the RAPP platform is installed with a single command. Everything after it — starting, authenticating, deploying to Azure — either happens automatically or is guided by the running system. Manual steps exist only as advanced documentation, never as the primary path.
When training users, the instruction is: “run the one-liner.” That’s it. Any change to install scripts must be tested against this path. If the one-liner breaks, nothing else matters.
The brainstem stays clean. The rapp-installer repo (Brainstem, T1) is the local, on-device AI. CommunityRAPP code and dependencies must never be injected into the brainstem at install time. The only acceptable change to the brainstem is guidance updates to soul.md.
CommunityRAPP is for the customer’s cloud instance. It provides Azure Functions runtime, persistent memory, and enterprise channel integration (T2/T3). It does not run inside the brainstem process.
The hatchery agent is the on-demand bridge. A single-file agent (rapp_hatchery_agent.py) is hosted in this repo and fetched into the brainstem’s agents/ folder when the user is ready. It creates isolated CommunityRAPP project instances — never before the user asks.
Projects are isolated. Each hatched project lives in ~/rapp-projects/{name}/, with its own virtual environment, its own port, and its own configuration. Hatched projects never share state with the brainstem or with each other.
The hatchery agent must be self-contained. It may only use Python stdlib, subprocess, and requests. No Azure SDK, no openai, no imports from utils/. It must run inside the brainstem’s Python environment without additional dependencies.
Progressive disclosure. The hatchery agent shows only the next step, never the full roadmap. Local testing before cloud deployment. Cloud deployment before Copilot Studio. Each layer is offered only when the previous layer is working.
Brainstem (T1) CommunityRAPP (T2/T3)
localhost:7071 ~/rapp-projects/{customer}/
localhost:7072+
User: "I'm ready to deploy"
|
v
soul.md guidance → one-liner fetch script
|
v
rapp_hatchery_agent.py loaded into agents/
|
v
hatch → clone, venv, configure
|
v
Isolated project ready Azure Functions deploy
Copilot Studio integration
The brainstem continues running as the user’s local AI. The hatched project runs independently as the customer’s cloud instance. They complement each other — they do not conflict.
This constitution can be amended by:
CONSTITUTION.mdThe spirit of this document is focus. If an amendment would broaden scope beyond “Azure Functions backend for RAPP agent pipeline,” it should be a new repo instead.
Ratified on initial repo cleanup. Revised for community-first principles and the Hatchery Pattern.