python-ai-agent-frameworks-demos  by Azure-Samples

Python AI agent framework examples for LLM interaction

Created 7 months ago
268 stars

Top 95.6% on SourcePulse

GitHubView on GitHub
Project Summary

This repository offers a comprehensive collection of examples for popular Python AI agent frameworks, designed for developers and researchers exploring LLM-based agent development. It provides practical demonstrations of integrating various frameworks with both free-tier GitHub Models and Azure OpenAI services, enabling rapid prototyping and evaluation of different AI agent architectures.

How It Works

The project showcases diverse Python AI agent frameworks, including Microsoft Agent Framework, Langchain v1/LangGraph, OpenAI Agents, PydanticAI, LlamaIndex, and SmolAgents. It demonstrates core agent patterns such as basic conversational agents, agents with tool integration (e.g., weather, planning), multi-agent orchestration (supervisors, handoffs), Retrieval Augmented Generation (RAG), and function calling. Examples leverage LLMs accessible via GitHub Models or provisioned Azure OpenAI resources, illustrating different data flows and interaction models.

Quick Start & Requirements

  • Primary install/run: GitHub Codespaces is recommended for an automated setup. Alternatively, use VS Code Dev Containers (requires Docker) or a local environment.
  • Local setup: Requires Python 3.10+, Git. Clone the repo, set up a virtual environment (python -m venv venv, source venv/bin/activate), and install dependencies (pip install -r requirements.txt).
  • Prerequisites: For local GitHub Models usage, a GITHUB_TOKEN environment variable with a GitHub Personal Access Token is needed. For Azure OpenAI, install the Azure Developer CLI (azd) and authenticate (azd auth login).
  • Resource footprint: GitHub Codespaces provides a managed environment. Local setup requires standard Python development tools. Azure OpenAI provisioning incurs cloud costs.
  • Links: GitHub Repository

Highlighted Details

  • Covers a broad spectrum of leading Python AI agent frameworks, offering comparative insights.
  • Features practical examples for tool usage, multi-agent coordination, RAG, and specific integrations like GitHub issue triaging and travel planning.
  • Supports flexible backend LLM choices: free-tier GitHub Models (rate-limited) or Azure OpenAI (requiring provisioning).
  • Includes Azure Developer CLI scripts for infrastructure-as-code (IaC) to provision necessary Azure OpenAI resources.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or roadmap are provided in the README snippet.

Licensing & Compatibility

The license type is not explicitly stated in the provided README content. Compatibility for commercial use would depend on the actual repository license, which requires verification.

Limitations & Caveats

Usage of free GitHub Models is subject to daily rate limits. Running examples with Azure OpenAI necessitates provisioning cloud resources, incurring costs and requiring Azure account setup. The repository serves as a demonstration platform rather than a production-ready framework.

Health Check
Last Commit

5 days ago

Responsiveness

Inactive

Pull Requests (30d)
7
Issues (30d)
0
Star History
48 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.