Skip to content

neondatabase-labs/neon-azure-ai-agent-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neon API & Azure AI Agent Integration

This project integrates the Neon Management API in Python using Neon SDK with Azure AI Agent Service to create, manage, and interact with Neon projects, databases, branches, and more using AI-driven commands.

Features

  • Create and manage Neon projects, databases, branches, roles, and endpoints.
  • Accept user commands from the console to trigger Neon API operations.

Demo

Neon API & Azure AI Agent Integration

Supported Tools

The following tools are supported through Neon API:

  • Project Management
    • Create, update, list, delete projects

Coming soon

  • Branch Management
    • Create, update, delete branches
    • Set a branch as primary
  • Database Management
    • Create, update, delete databases
    • Retrieve database details
  • Endpoint Management
    • Create, update, delete endpoints
    • Start and suspend endpoints
  • Role Management
    • Create, delete roles
    • Reveal and reset role passwords
  • SQL Execution
    • Run queries on Neon databases
  • API Key Management
    • Create, list, and delete API keys
  • Operations Monitoring
    • List and track project operations
  • Consumption Metrics
    • Retrieve usage and consumption data

Prerequisites

Before running the project, ensure you have:

Installation

  1. Clone this repository:

    git clone https://github.com/neondatabase-labs/neon-azure-ai-agent-demo.git
    cd neon-azure-ai-agent-demo
  2. Create a new virtual environment:

    python -m venv venv && source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up environment variables by creating a .env file:

    PROJECT_CONNECTION_STRING=your_azure_project_connection_string
    AZURE_OPENAI_CHAT_DEPLOYMENT_NAME=your_deployment_name
    NEON_API_KEY=your_neon_api_key

Usage

Running the AI Agent

Start the AI agent and interact with Neon API:

python ai-gent.py

Example Commands

After running the script, you can enter commands in the console:

  • Create a project:
    Create a project called My Neon Project
    
  • List Projects:
    List existing projects
    

Project Structure

neon-azure-ai/
│── ai-agent.py           # Main AI Agent application entry point
│── neon_functions.py     # Neon API interaction functions
│── .env                  # Environment variables (not committed)
│── requirements.txt      # Required dependencies
│── README.md             # Project documentation

Contributing

Contributions are welcome! Feel free to submit a pull request with improvements.

About

Neon Management API & Azure AI Agent Integration

Topics

Resources

Stars

Watchers

Forks

Languages