Organisation AI is a free, open-source web application that empowers your entire organisation with access to advanced AI chat capabilities—without the burden of costly per-user licenses.
Deploy effortlessly to Microsoft Azure and run OpenAI models hosted in Azure AI Foundry.
Originally known as Teacher AI for its focus on supporting staff in schools, this app has been upgraded to meet the needs of any organisation, from businesses to nonprofits.
- A clean, professional chat interface
- Access to the latest OpenAI language models
- Customisable prompt presets for different teams
- Understanding of uploaded images
- Voice-to-voice conversations
- Chat history
- Automated content moderation and manual review
- Configurable weekly spend limits
- Usage and cost dashboard
- Support for all screen sizes including mobile
- Single sign-on (SSO) using Microsoft 365
-
Create an Azure AI Foundry project and deploy the OpenAI models that you would like to use.
-
Create a general purpose v2 storage account in Microsoft Azure, and within it create:
- Tables:
conversations,spend, andreview - Blob containers:
conversationsandconfig
- Tables:
-
Within the
configblob container, upload a blank filekeys.xml. Generate a SAS URL for this file with read/write permissions and a distant expiry. This will be used to store the application's data protection keys so that auth cookies persist across app restarts. -
Within the
configblob container, create a filemodels.jsonwith the following format. Each model name needs to match a deployment in your Azure AI Foundry project.[ { "name": "gpt-5", "costPer1MInputTokens": 1.38, "costPer1MCachedInputTokens": 0.14, "costPer1MAudioInputTokens": null, "costPer1MOutputTokens": 11.00, "costPer1MAudioOutputTokens": null } ] -
Within the
configblob container, create a fileusers.csvwith the following format:Email,UserGroup [email protected],staff -
For each user group configured in
users.csv, create a file<usergroup>.jsonwith the following format:{ "allowUploads": true, "introMessage": "This service is for work-related queries only.", "presets": [ { "id": "default", "title": null, "category": null, "introduction": null, "instructions": "You are a helpful AI assistant.", "model": "gpt-5", "temperature": null, "reasoningEffort": "minimal", "voice": null } ], "reviewers": [ "[email protected]" ], "showPresetDetails": true, "stopCommands": [ "token": "[offtopic]", "message": "This is off-topic." ], "userMaxWeeklySpend": 2.00 }Our examples folder contains sample configuration files for a secondary school.
The settings are:
allowUploads- whether users in this group can upload filesintroMessage- a message to display to users on the homepage in Markdown format, e.g. you may include a link to your organisation's AI policypresets- an array of preset prompt templates that will be available to users from the sidebarid- the ID of the preset, which is a unique string without spaces; use the IDdefaultto specify the default preset which loads at the starttitle- the title of the preset, displayed in the sidebarcategory- the category of the preset, displayed as a heading in the sidebarintroduction- the message to display when this preset is selected, in Markdown format (note that this is not sent to the language model)instructions- the system instructions to send to the language model along with the user's messagemodel- the OpenAI model to use for this preset, as configured belowtemperature(optional) - the temperature to use, where supported by the modelreasoningEffort(optional) - the reasoning effort to use, where supported by the modelvoice(optional) - when set, this enables speech-to-speech mode using the specified voice
reviewers- an array of users to give reviewer access, which allows them to retrospectively review all AI conversations in this groupshowPresetDetails- whether to show the preset details, such as the system instructions and model name, to the userstopCommands- specific strings that, if received from the language model, will stop the conversation and display a customised message; this needs to be used in conjunction with the modelinstructionsabove, and can be useful for safety purposestoken- the exact text to match in the language model's output (e.g.[OFF TOPIC])message- the warning to display to the user, in Markdown format
userMaxWeeklySpend- the amount each user is allowed to spend per week; resets Sundays (OpenAI token usage is retrospective, so users might slightly exceed the limit before restrictions apply)
-
Create an Azure app registration.
- Name -
Organisation AI - Redirect URI -
https://<app-website-domain>/signin-oidc - Implicit grant - ID tokens
- Supported account types - Accounts in this organizational directory only
- API permissions -
Microsoft Graph - User.Read - Token configuration - add an optional claim of type ID:
upn - Certificates & secrets - create a new client secret
- Name -
-
Create an Azure App Service web app.
- Publish mode - Container
- Operating system - Linux
- Image source - Other container registries
- Container name -
main - Access type - Public
- Registry server URL -
https://index.docker.io - Image and tag -
jamesgurung/organisation-ai:latest - Port - 8080
- Startup command: (blank)
-
Configure the following environment variables for the web app:
Azure__ClientId- the client ID of your Azure app registrationAzure__ClientSecret- the client secret of your Azure app registrationAzure__DataProtectionBlobUri- the SAS URL for the keys file you created earlierAzure__StorageAccountKey- the key for your Azure Storage accountAzure__StorageAccountName- the name of your Azure Storage accountAzure__TenantId- your Azure tenant IDOpenAI__AIFoundryApiKey- the API key for your Azure AI Foundry projectOpenAI__AIFoundryEndpoint- the endpoint URL for your Azure AI Foundry deployment, e.g.https://<project>.cognitiveservices.azure.com/OpenAI__TitleSummarisationModel- the deployment which will be used to summarise titles, e.g.gpt-5-miniOrganisation__AppWebsite- the host name where this app will be hosted, e.g.example.comOrganisation__Name- the name of your organisationOrganisation__SyncApiKey- a secret key to be used when updating theusers.csvfile with an automated script (optional)
To make changes to users or user groups after deployment, you can edit the files in the config blob container. A user with reviewer access must then navigate to /api/refresh for the changes to take effect.
If you have a question or feature request, please open an issue.
To contribute improvements to this project, or to adapt the code for the specific needs of your organisation, you are welcome to fork the repository.
Pull requests are welcome; please open an issue first to discuss.
