Skip to content

Instantly share code, notes, and snippets.

View kshyju's full-sized avatar

Shyju Krishnankutty kshyju

View GitHub Profile

Instructions for Creating Durable Agents in .NET Isolated Function Apps

Make sure you are using the latest version of the Microsoft.Azure.Functions.Worker NuGet package (2.2.0 or greater) in your function app. For existing apps, you will need to manually upgrade the package version. Starting November 12, 2025, new apps created using our templates will automatically include version 2.2.0 or greater.

Required NuGet Packages

To enable the ability to define durable agents and register them with the function app, you need to reference the following NuGet packages:

Core Agent Packages:

  1. Microsoft.Agents.AI.Hosting.AzureFunctions - Provides methods to register AI Agents with Azure Functions
@kshyju
kshyju / cli-feed-v4_110vs111.json
Created August 9, 2025 00:35
4.110.0 vs 4.111.0(with .NET 10 support)
{
"templates": "https://cdn.functions.azure.com/public/TemplatesApi/3.1.1648.zip",
"workerRuntimes": {
"dotnet": {
"net6": {
"displayInfo": {
"displayName": ".NET 6.0",
"hidden": true,
"displayVersion": "v4",
"targetFramework": ".NET",
@kshyju
kshyju / STJSerializationErrorNET8vsNET9.cs
Created July 25, 2025 20:41
STJ throws different serialization error in net9+ compared to net8.0
using System.Text.Json;
namespace STJTFMTest
{
internal class Program
{
static void Main(string[] args)
{
var personCollection = new[]
{
@kshyju
kshyju / LinuxDumpCollection.MD
Last active May 28, 2025 23:57
Process dump collection on Linux

🧠 Collecting a .NET Dump on Linux

🔧 Step 1: Install dotnet-dump

apt-get update
apt-get install wget -y
wget https://aka.ms/dotnet-dump/linux-x64 -O dotnet-dump
chmod +x dotnet-dump
variables:
headers:
none: ''
plaintext: '--header "Accept: text/plain,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" --header "Connection: keep-alive"'
html: '--header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header "Connection: keep-alive"'
json: '--header "Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7" --header "Connection: keep-alive"'
connectionclose: '--header "Connection: close"'
presetHeaders: none
jobs:
@kshyju
kshyju / chocolateylogs.txt
Created December 17, 2024 03:46
chocolatey logs
2024-12-16 19:43:01,400 16480 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2024-12-16 19:43:01,416 16480 [INFO ] - Installing the following packages:
2024-12-16 19:43:01,416 16480 [INFO ] - sysinternals
2024-12-16 19:43:01,416 16480 [INFO ] - By installing, you accept licenses for the packages.
2024-12-16 19:43:01,528 16480 [DEBUG] - Process Tree: Chocolatey CLI => Chocolatey CLI => powershell => WindowsTerminal => explorer
2024-12-16 19:43:01,540 16480 [DEBUG] - Updating User Agent to 'Chocolatey Command Line/2.4.1 (Chocolatey CLI) via NuGet Client/6.4.1 (Microsoft Windows NT 10.0.26100.0)'.
2024-12-16 19:43:01,607 16480 [DEBUG] - Running list with the following filter = ''
2024-12-16 19:43:01,607 16480 [DEBUG] - --- Start of List ---
2024-12-16 19:43:01,624 16480 [DEBUG] - Process Tree: Chocolatey CLI => Chocolatey CLI => powershell => WindowsTerminal => explorer
2024-12-16 19:43:01,624 16480 [DEBUG] - Updating User Agent to 'Chocolatey Command Line/2.4.1 (Chocolatey CLI) via NuGet Cl
# Create a directory
$directoryPath = "C:\ExampleDirectory"
New-Item -ItemType Directory -Path $directoryPath -Force
# Create a file in the directory
$filePath = "$directoryPath\example.txt"
"Hello, World!" | Out-File -FilePath $filePath
# Output the result
Write-Output "Directory and file created successfully."
param(
[string]$ParametersJsonBase64,
[string]$WindowsLocalAdminUserName,
[string]$WindowsLocalAdminPasswordBase64)
$ErrorActionPreference = 'Stop'
function ScheduleCrankAgentStart {
Write-Verbose 'Scheduling crank-agent start...'
@kshyju
kshyju / Ubuntu 20.04 With .NET9 SDK
Created November 13, 2024 19:06
Ubuntu 20.04 With .NET9 SDK
# Use Ubuntu 20.04 as the base image
FROM ubuntu:20.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
# Install essential packages and dependencies
RUN apt-get update && \
apt-get install -y \
wget \
{
"4.68.0": {
"templates": "https://functionscdn.azureedge.net/public/TemplatesApi/3.1.1648.zip",
"workerRuntimes": {
"dotnet": {
"net6": {
"displayInfo": {
"displayName": ".NET 6.0",
"hidden": false,
"displayVersion": "v4",