You can deploy the Kernel Memory infrastructure to Azure by clicking the button below. This will create required resources. We recommend to create a new resource group for each deployment.
Tips for customizing the deployment
Resources are deployed with an opinionated set of configurations. You can modify services on Azure portal or you can reuse and customize the Bicep files starting from infra/main.bicep.
[!TIP] The
Deploy to Azurebutton uses the infra/main.json file, which is a compiled version of infra/main.bicep. Please note that themain.jsonfile is not updated automatically when you make changes tomain.bicepfile.You can use the
az bicep build -f main.bicepcommand to compile the Bicep file to a json file.
- Click here for
azinstall instructions- Click here for Bicep CLI commands
After the deployment is complete, you will see the following resources in your resource group:
- Application Insights
- Container Apps Environment
- Log Analytics workspace
- Search service
- Container App
- Managed Identity
- Storage account
You can start using Kernel Memory immediately after deployment. Use Application Url from Container App instance page as Kernel Memory's endpoint. Refer to this screenshot if you need help finding Application Url value.
Kernel Memory web service is deployed with AuthenticationType set to APIKey and default API keys are random GUIDs. Each request requires the Authorization HTTP header, passing one of the two keys.
Warning
It is highly recommended to change the default API keys after deployment. You can do this by updating the
KernelMemory__ServiceAuthorization__AccessKey1 and KernelMemory__ServiceAuthorization__AccessKey2 > environment variables in the Container App.
Refer to this screenshot or to the documentation page: Manage environment variables on Azure Container Apps if you need help finding and changing environment variables.
Tip
The easiest way to start using Kernel Memory API is to use Swagger UI. You can access it by navigating to
{Application Url}/swagger/index.html in your browser. Replace km-service-example.example.azurecontainerapps.io
with your Application Url value.
Here is an example of how to create a MemoryWebClient instance and start using Kernel Memory web service:
var memory = new MemoryWebClient(
"https://km-service-example.example.azurecontainerapps.io",
apiKey: "...your WebServiceAuthorizationKey1...");We recommend reviewing the examples included in the repository, e.g. starting from 001-dotnet-WebClient.