Category · 51 posts

dev

  1. Building an AI Agent Server with AG-UI and Microsoft Agent Framework

    In this post, I want to talk about the Python backend I built for an AG-UI demo project. It is part of a larger project that also includes a frontend that uses CopilotKit: This post discusses the Python AG-UI server that is built with Microsoft Agent Framework. All code is on GitHub: https://github.com/gbaeke/agui. Most of…

    ai
  2. Using tasks with streaming in Google Agent2Agent (A2A)

    In a previous post we created a simple A2A agent that uses synchronous message exchange. An A2A client sends a message and the A2A server, via the Agent Executor, responds with a message. But what if you have a longer running task to perform and you want to inform the client that the task in…

    ai
  3. Google’s A2A: taking a closer look

    In the previous post, I talked about options to build multi-agent solutions. The last option used Google’s A2A. A2A provides a wrapper around your agent, basically a JSON-RPC API, that standardizes how you talk to your agent. In this post we take a closer look at the basics of A2A with simple synchronous message exchange.…

    ai
  4. Building multi-agent solutions: what are your options?

    When we meet with customers, the topic of a “multi-agent solution” often comes up. This isn’t surprising. There’s a lot of excitement around their potential to transform business processes, strengthen customer relationships, and more. The first question you have to ask yourself though is this: “Do I really need a multi-agent solution?”. Often, we find…

    ai
  5. Create a Copilot declarative agent that calls an API with authentication

    In a previous post, we looked at creating a Copilot declarative agent. The agent had one custom action that called the JSONPlaceholder API. Check that post for an introduction to what these agents can do. Using a dummy, unauthenticated API is not much fun so let’s take a look at doing the same for a…

    ai
  6. Creating a Copilot declarative agent with VS Code and the Teams Toolkit

    If you are a Microsoft 365 Copilot user, you have probably seen that the words “agent” and “Copilot agent” are popping up here and there. For example, if you chat with Copilot there is an Agents section in the top right corner: Above, there is a Visual Creator agent that’s built-in. It’s an agent dedicated…

    ai
  7. Using your own message broker with Diagrid Catalyst

    In a previous post, I wrote about Diagrid Catalyst. Catalyst provides services like pub/sub and state stores to support the developer in writing distributed applications. In the post, we discussed a sample application that processes documents and extracts fields with an LLM (gpt-4o structured extraction). Two services, upload and process, communicate via the pub/sub pattern.…

    ai
  8. Writing an multi-service document extractor with the help of Diagrid’s Catalyst

    Many enterprises have systems in place that take documents, possibly handwritten, that contain data that needs to be extracted. In this post, we will create an application that can extract data from documents that you upload. We will make use of an LLM, in this case gpt-4o. We will use model version 2024-08-06 and its…

    ai
  9. Creating a custom GPT to query any knowledge base with actions

    A while ago, OpenAI introduced GPTs. A GPT is a custom version of ChatGPT that combine instructions, extra knowledge, and any combination of skills. In this tutorial, we are going to create a custom GPT that can answer questions about articles on this blog. In order to achieve that, we will do the following: create…

    ai
  10. Giving Microsoft’s Radius a spin

    Microsoft recently announced Radius. As stated in their inaugural blog post, it is “a tool to describe, deploy, and manage your entire application”. With Radius, you describe your application in a bicep file. This can include containers, databases, the connections between those and much more. Radius is an open-source solution started from within Microsoft. The…

    azure
  11. Enhancing Semantic Search with a Streamlit UI

    In a previous blog post, we discussed two Python programs, upload_vectors.py and search_vectors.py. These programs were used to create and search vectors, respectively. The upload_vectors.py script created vectors from chunks of a larger text and stored them in Pinecone, while the search_vectors.py script enabled semantic search on the text. In this blog post, we will…

    ai
  12. Storing and querying for embeddings with Redis

    In a previous post, we wrote about using vectorized search and cosine similarity to quickly query a database of blog posts and retrieve the most relevant content to a natural language query. This is achieved using OpenAI’s embeddings API, Pinecone (a vector database), and OpenAI ChatCompletions. For reference, here’s the rough architecture: The steps above…

    ai
  13. Pinecone and OpenAI magic: A guide to finding your long lost blog posts with vectorized search and ChatGPT

    Searching through a large database of blog posts can be a daunting task, especially if there are thousands of articles. However, using vectorized search and cosine similarity, you can quickly query your blog posts and retrieve the most relevant content. In this blog post, we’ll show you how to query a list of blog posts…

    ai
  14. Step-by-Step Guide: How to Build Your Own Chatbot with the ChatGPT API

    In this blog post, we will be discussing how to build your own chat bot using the ChatGPT API. It’s worth mentioning that we will be using the OpenAI APIs directly and not the Azure OpenAI APIs, and the code will be written in Python. A crucial aspect of creating a chat bot is maintaining…

    ai
  15. Authenticate to Azure Resources with Azure Managed Identities

    In this post, we will take a look at managed identities in general and system-assigned managed identity in particular. Managed identities can be used by your code to authenticate to Azure AD resources from Azure compute resources that support it, like virtual machines and containers. But first, let’s look at the other option and why…

    azure
  16. AKS Workload Identity Revisited

    A while ago, I blogged about Workload Identity. Since then, Microsoft simplified the configuration steps and enabled Managed Identity, in addition to app registrations. But first, let’s take a step back. Why do you need something like workload identity in the first place? Take a look at the diagram below. Workloads (deployed in a container…

    azure
  17. A quick look at Azure App Configuration and the Python Provider

    When developing an application, it is highly likely that it needs to be configured with all sorts of settings. A simple list of key/value pairs is usually all you need. Some of the values can be read by anyone (e.g., a public URL) while some values should be treated as secrets (e.g., a connection string).…

    automation
  18. Learn to use the Dapr authorization middleware

    Based on a customer conversation, I decided to look into the Dapr middleware components. More specifically, I wanted to understand how the OAuth 2.0 middleware works that enables the Authorization Code flow. In the Authorization Code flow, an authorization code is a temporary code that a client obtains after being redirected to an authorization URL…

    cloud
  19. Quick Guide to Flux v2 on AKS

    Now that the Flux v2 extension for Azure Kubernetes Service and Azure Arc is generally available, let’s do a quick guide on the topic. A Quick Guide, at least on this site 😉, is a look at the topic from a command-line perspective for easy reproduction and evaluation. This Quick Guide is also on GitHub.…

    azure
  20. Quick Guide to Azure Container Apps

    Now that Azure Container Apps (ACA) is generally available, it is time for a quick guide. These quick guides illustrate how to work with a service from the command line and illustrate the main features. Prerequisites All commands are run from bash in WSL 2 (Windows Subsystem for Linux 2 on Windows 11) Azure CLI…

    azure
  21. Trying out WebAssembly on Azure Kubernetes Service

    Introduction In October 2021, Microsoft announced the public preview of AKS support for deploying WebAssembly System Interface (WASI) workloads in Kubernetes. You can read the announcement here. In short, that means we can run another type of workload on Kubernetes, besides containers! WebAssembly is maybe best known for the ability to write code with languages…

    cloud
  22. Azure App Services with Private Link

    In one of my videos on my YouTube channel, I discuss Azure App Services with Private Link. The video describes how it works and provides an example of deploying the infrastructure with Bicep. The Bicep templates are on GitHub. If you want to jump straight to the video, here it is: In the rest of…

    automation
  23. From MQTT to InfluxDB with Dapr

    In a previous post, we looked at using the Dapr InfluxDB component to write data to InfluxDB Cloud. In this post, we will take a look at reading data from an MQTT topic and storing it in InfluxDB. We will use Dapr 0.10, which includes both components. To get up to speed with Dapr, please…

    cloud
  24. Using the Dapr InfluxDB component

    A while ago, I created a component that can write to InfluxDB 2.0 from Dapr. This component is now included in the 0.10 release. In this post, we will briefly look at how you can use it. If you do not know what Dapr is, take a look at https://dapr.io. I also have some videos…

    azure
  25. First Look at Azure Static Web Apps

    Note: part 2 looks at the authentication and authorization part. At Build 2020, Microsoft announced Azure Static Web Apps, a new way to host static web apps on Azure. In the past, static web apps, which are just a combination of HTML, JavaScript and CSS, could be hosted in a Storage Account or a regular…

    api
  26. Azure SQL, Azure Active Directory and Seamless SSO: An Overview

    Instead of pure lift-and-shift migrations to the cloud, we often encounter lift-shift-tinker migrations. In such a migration, you modify some of the application components to take advantage of cloud services. Often, that’s the database but it could also be your web servers (e.g. replaced by Azure Web App). When you replace SQL Server on-premises with…

    azure
  27. Update to IoT Simulator

    Quite a while ago, I wrote a small IoT Simulator in Go that creates or deletes multiple IoT devices in IoT Hub and sends telemetry at a preset interval. However, when you use version 0.4 of the simulator, you will encounter issues in the following cases: You create a route to store telemetry in an…

    azure
  28. Writing a Kubernetes operator with Kopf

    In today’s post, we will write a simple operator with Kopf, which is a Python framework created by Zalando. A Kubernetes operator is a piece of software, running in Kubernetes, that does something application specific. To see some examples of what operators are used for, check out operatorhub.io. Our operator will do something simple in…

    api
  29. A quick tour of Kustomize

    Image above from: https://kustomize.io/ When you have to deploy an application to multiple environments like dev, test and production there are many solutions available to you. You can manually deploy the app (Nooooooo! 😉), use a CI/CD system like Azure DevOps and its release pipelines (with or without Helm) or maybe even a “GitOps” approach…

    automation
  30. GitOps with Weaveworks Flux – Installing and Updating Applications

    In a previous post, we installed Weaveworks Flux. Flux synchronizes the contents of a git repository with your Kubernetes cluster. Flux can easily be installed via a Helm chart. As an example, we installed Traefik by adding the following yaml to the synced repository: apiVersion: helm.fluxcd.io/v1 kind: HelmRelease metadata: name: traefik namespace: default annotations: fluxcd.io/ignore:…

    containers
  31. Using the OAuth Client Credentials Flow

    I often get questions about protecting applications like APIs using OAuth. I guess you know the drill: you have to obtain a token (typically a JWT or JSON Web Token) the client submits the token to your backend (via a Authorization HTTP header) the token needs to be verified (do you trust it?) you need…

    api
  32. Exposing a local endpoint to the Internet with inlets

    A while ago, I learned about inlets by Alex Ellis. It allows you to expose an endpoint on your internal network via a tunnel to an exit node. To actually reach your internal website, you navigate to the public IP and port of the exit node. Something like this: Internet user –> public IP:port of…

    containers
  33. Azure DevOps multi-stage YAML pipelines

    A while ago, the Azure DevOps blog posted an update about multi-stage YAML pipelines. The concept is straightforward: define both your build (CI) and release (CD) pipelines in a YAML file and stick that file in your source code repository. In this post, we will look at a simple build and release pipeline that builds…

    cloud
  34. Securing access to and from Azure Functions

    I am often asked how to secure access to and from Azure Functions that are not running in an App Service Environment (ASE). An App Service Environment allows you to safeguard your apps in a subnet of your Azure Virtual Network. In a sense, it gives you a private deployment of Azure App Service that…

    azure
  35. Querying Postgres with GraphQL

    I wanted a quick and easy way to build an API that retrieves the ten latest events from a stream of data sent to a TimescaleDB hypertable. Since such a table can be queried by any means supported by Postgres, I decided to use Postgraphile, which automatically provides a GraphQL server for a database. If…

    api
  36. Improving an Azure Function that writes IoT Hub data to TimescaleDB

    In an earlier post, I used an Azure Function to write data from IoT Hub to a TimescaleDB hypertable on PostgreSQL. Although that function works for demo purposes, there are several issues. Two of those issues will be addressed in this post: the INSERT INTO statement used the NOW() function instead of the enqueuedTimeUtc field;…

    analytics
  37. Hosting an Angular app in Kubernetes

    We recently had to deploy an Angular application to Kubernetes in three different environments: development, acceptance and production. The application is not accessed via the browser directly. Instead, it’s accessed via a Microsoft Office add-in. The next sections will provide you with some tips to make this work. In practice, I do not recommend hosting…

    api
  38. Building a real-time messaging server in Go

    Often, I need a simple real-time server and web interface that shows real-time events. Although there are many options available like socket.io for Node.js or services like Azure SignalR and PubNub, I decided to create a real-time server in Go with a simple web front-end: For a real-time server in Go, there are several options.…

    api
  39. Infrastructure as Code: exploring Pulumi

    Image: from the Pulumi website In my Twitter feed, I often come across Pulumi so I decided to try it out. Pulumi is an Infrastructure as Code solution that allows you to use familiar development languages such as JavaScript, Python and Go. The idea is that you define your infrastructure in the language that you…

    automation
  40. Simple Azure AD Authentication in a single page application (SPA)

    Adding Azure AD integration to a website is often confusing if you are just getting started. Let’s face it, not everybody has the opportunity to dig deep into such topics. For https://deploy.baeke.info, I wanted to enable Azure AD authentication so that only a select group of users in our AD tenant can call the back-end…

    api
  41. ResNet50v2 classification in Go with a local container

    To quickly go to the code, go here. Otherwise, keep reading… In a previous blog post, I wrote about classifying images with the ResNet50v2 model from the ONNX Model Zoo. In that post, the container ran on a Kubernetes cluster with GPU nodes. The nodes had an NVIDIA v100 GPU. The actual classification was done…

    ai
  42. Deploying Azure Cognitive Services Containers with IoT Edge

    Introduction Azure Cognitive Services is a collection of APIs that make your applications smarter. Some of those APIs are listed below: Vision: image classification, face detection (including emotions), OCR Language: text analytics (e.g. key phrase or sentiment analysis), language detection and translation To use one of the APIs you need to provision it in an…

    analytics
  43. Using certmagic to add SSL to webhookd

    A while ago, I stumbled upon https://github.com/ncarlier/webhookd. It is a simple webhook server, written in Go, that can execute shell scripts. To use it, simply install it on a Linux box and execute it. By default, the executable looks at the ./scripts folder and maps each shell script to a URL you can call. It…

    api
  44. Draft: a simpler way to deploy to Kubernetes during development

    If you work with containers and work with Kubernetes, Draft makes it easier to deploy your code while you are in the earlier development stages. You use Draft while you are working on your code but before you commit it to version control. The idea is simple: You have some code written in something like…

    api
  45. Adaptable IoT

    On May 24, 2017 I gave a short partner session at Techorama, a technology event in Belgium for both developers and IT Pros. You can find the slides on SlideShare: https://www.slideshare.net/gbaeke/adaptable-iot Since it was a short session and a short slide deck, this post provides a bit more background information. First, what do I mean…

    analytics
  46. IoT Hub Device Twin and MQTT

    When you connect to IoT Hub with MQTT directly, you need to connect with a ClientId, username and password. Those three values need to be set according to Azure IoT Hub specificiations: ClientId: use the IoT Hub deviceId Username: use {iothubhostname}/{deviceId}/api-version=2016-11-14 Password: use a SAS token When you connect with MQTT, you will notice it…

    api
  47. Communication between microservices in Kubernetes with Go Micro

    In this post, we continue the story we started with two earlier posts: Getting started with Kubernetes on Azure Microservices on Kubernetes: a simple example in Go In the previous post, I described a very simple service written with the help of Go Micro. It exposes an RPC call Get that retrieves a device from a…

    api
  48. Microservices on Kubernetes: a simple example in Go

    In the previous post, Getting started with Kubernetes on Azure, we talked about creating a Kubernetes cluster and deploying a couple of services. There are basically two services: Data: a service that exposes an endpoint to pick up data for an IoT device; you call it with http://service_endpoint:8080/data/devicename Device: a service that can be used…

    api
  49. Particle and Azure IoT Hub: forward events for storage and analysis

    In a previous post about Partice published events, you have seen how to publish custom events to the Particle Cloud. Other devices or applications can subscribe to these events and act upon them. What if you want to do more and connect these events to custom applications? In that case, Particle has a couple of…

    arm
  50. IoT with Particle and Porter

    In an earlier article, we took a look at Particle Functions and Variables. We wrote a simple application that can blink an LED with a function and read the value of a photoresistor with a variable. Although you can easily call the function or read the variable with the Particle CLI or with a REST…

    arm
  51. IoT with Particle: publishing events

    In the two previous posts, we discussed setup and talked about triggering actions and reading sensor data. Particle also allows you to publish events. You can subscribe to these events or pass them to other systems such as Azure IoT Hub. Let’s build on the previous example with the LED and the photoresistor. When we…

    arm