Neon Azure Ai Agent Service Get Started banner
neondatabase neondatabase

Neon Azure Ai Agent Service Get Started

DevOps community

Description

Build your first AI Agent for Postgres on Azure

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

AI Agent for Postgres using Azure AI Agent Service

This project demonstrates how to build an AI agent that can analyze SaaS usage data stored in a Neon Serverless Postgres database and explain billing anomalies in natural language using Azure AI Agent Service.

✨ Why this project?

  • No need for complex frameworks like LangChain, Semantic Kernel, or AutoGen
  • Leverages Azure AI Foundry's built-in agent orchestration
  • Connects to a real Postgres backend (Neon) to fetch and analyze data
  • Beginner-friendly setup with clear steps

🧠 Use Case

Imagine you run a SaaS platform and want to:

  • Spot billing spikes (e.g., sudden API call increases)
  • Ask natural questions like: "Why did my bill go up this week?"
  • Get AI-powered insights directly from your usage database

📦 Project Structure

.
├── billing_anomaly_agent.py         # Main script to run the agent
├── billing_agent_tools.py           # Tool functions used by the agent
├── init_usage_data.py               # Optional: Populate sample data in Neon
├── requirements.txt                 # Python dependencies
├── .env                             # Environment variables (not committed)
└── README.md                        # This file

✅ Prerequisites

⚙️ Setup Instructions

1. Create a **Neon Database on Azure**

Open the [new Neon Resource page](https://portal.azure.com/#view/Azure_Marketplace_Neon/NeonCreateResource.ReactView) on the Azure portal, and it brings up the form to create a Neon Serverless Postgres Resource. Fill out the form with the required fields and deploy it.

Obtain Neon Database Credentials

  1. After the resource is created, go to the Neon Serverless