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:
conversations
andconfig
- Tables:
-
Within the
config
blob 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
config
blob container, create a fileusers.csv
with the following format:Email,UserGroup test@example.com,staff
-
For each user group configured in
users.csv
, create a file<usergroup>.json
with 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": [ "reviewer@example.com" ], "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 IDdefault
to 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 modelinstructions
above, 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
- Name -
-
Create an Azure App Service web app.
- Publish mode - Container
- Operating system - Linux
- Image source - Other container registries
- Docker Hub access type - Public
- Image and tag -
jamesgurung/organisation-ai:latest
- Startup command: (blank)
-
Configure the following environment variables for the web app:
Azure__ClientId
- the client ID 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__CostPer1KFileSearches
- the OpenAI credit cost per 1K file searchesOpenAI__Models__0__Name
- the name of the Azure AI Foundry OpenAI deployment you would like to make available, e.g.gpt-4.1
(subsequent models can be configured by adding additional items with incrementing indices)OpenAI__Models__0__CostPer1MAudioInputTokens
- the model cost per 1M audio input tokens (where applicable)OpenAI__Models__0__CostPer1MAudioOutputTokens
- the model cost per 1M audio output tokens (where applicable)OpenAI__Models__0__CostPer1MCachedInputTokens
- the model cost per 1M cached input tokensOpenAI__Models__0__CostPer1MInputTokens
- the model cost per 1M input tokensOpenAI__Models__0__CostPer1MOutputTokens
- the model cost per 1M output tokensOpenAI__TitleSummarisationModel
- the deployment which will be used to summarise titles, e.g.gpt-4.1-mini
Organisation__AppWebsite
- the host name where this app will be hosted, e.g.example.com
Organisation__Name
- the name of your organisationOrganisation__SyncApiKey
- a secret key to be used when updating theusers.csv
file 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.