AI and Agents in Python

39 projects in AI & ML. Most starred: hermes-agent, transformers and langchain.

Python's AI tooling splits into layers. Orchestration frameworks such as LangChain, LangGraph, Pydantic AI and CrewAI handle prompts, tool calls and multi-step agent loops. LangGraph is the lower-level option when you want explicit state and control flow, while CrewAI models a team of agents with roles. The vendor SDKs from OpenAI, Anthropic (Claude Agent SDK) and Google (ADK) are the shortest path when you are committed to one model provider. To expose your own functions to AI clients, the official MCP SDK and FastMCP implement the Model Context Protocol.

Below the agent layer sit data and model libraries. Instructor and Pydantic AI turn model output into validated Pydantic objects, LlamaIndex builds retrieval pipelines over your own documents, and Mem0 adds long-term memory to agents. Hugging Face Transformers loads pretrained models, and Sentence Transformers computes embeddings and reranks search results. To run open-weight models yourself, Ollama and llama-cpp-python suit a single machine, MLX LM targets Apple Silicon, and vLLM or SGLang serve models at high throughput on GPUs.

To adapt a model to your data, PEFT provides LoRA and other parameter-efficient methods, TRL covers post-training such as supervised fine-tuning and preference optimization, and Unsloth and Axolotl wrap these steps into faster or config-driven workflows. For speech, faster-whisper is a common replacement for OpenAI's Whisper package when inference speed and memory matter.

Agent Skills5

django-ai-plugins

Django backend agent skills for Django, DRF, Celery, and Django-specific code review.

162updated 3mo ago1.1.0

scientific-agent-skills

Agent skills for scientific research and analysis with Python libraries like scikit-learn, polars, and biopython.

54.4kupdated 5d ago2.72.0

sentry-skills

Agent skills the Sentry team uses for code review, pull requests, and Django reviews.

1.1kupdated 1d ago

trailofbits-skills

Security skills for vulnerability detection, auditing, and testing.

7.8kupdated today

wshobson-agents

Plugins, agents, and skills for AI coding tools, including Python skills for testing, async, packaging, and uv.

41.6kupdated today

Orchestration4

langchain

A framework for building agents and LLM-powered applications.

148.4kupdated todaylangchain-core==1.7.0

langgraph

Low-level orchestration framework for building stateful, long-running LLM agents.

43.8kupdated today1.2.17

pydantic-ai

A Python agent framework for building generative AI applications with structured schemas.

20.8kupdated today2.61.0

crewai

A framework for orchestrating role-playing autonomous AI agents for collaborative task solving.

60.1kupdated today1.15.30

Vendor Agent SDKs3

claude-agent-sdk

Anthropic's Python SDK for building AI agents on Claude Code's harness — custom tools, in-process MCP servers, hooks.

8.3kupdated today0.2.174

openai-agents

OpenAI's framework for building and managing AI agents.

30.3kupdated 2d ago0.24.0

google-adk

Google's code-first toolkit for building, evaluating, and deploying AI agents.

22kupdated today2.13.0

Model Context Protocol2

mcp

The official Python SDK for building Model Context Protocol servers and clients.

24.7kupdated today2.3.0

fastmcp

A high-level, Pythonic framework for building MCP servers and clients.

28.2kupdated today4.1.3

Personal Assistants2

hermes-agent

An adaptive personal AI assistant that grows with you.

256.8kupdated today0.22.5

AstrBot

A multi-platform AI assistant that connects LLMs to chat apps like Telegram, Slack, and QQ, extensible with Python plugins.

43.2kupdated today4.29.3

Prompt Optimization1

dspy

A framework for programming, not prompting, language models.

38.8kupdated 1d ago3.4.1

Data Layer5

instructor

A library for extracting structured data from LLMs, powered by Pydantic.

14.1kupdated 4d ago1.17.0

llama-index

A toolkit for building RAG pipelines and agents over your data.

52.6kupdated 1d ago0.14.25

mem0

An intelligent memory layer for AI agents enabling personalized interactions.

67.8kupdated 1d agots-v3.3.1

openviking

A context database for AI agents that unifies memory, resources, and skills.

40.7kupdated today0.5.2

semantica

A graph-native context and knowledge layer for AI agents with reasoning, provenance, and governance.

14.2kupdated today0.7.0

Pre-trained Models2

transformers

The model-definition framework for pretrained models in text, computer vision, audio, video, and multimodal tasks, for inference and training.

168.1kupdated today5.20.2

sentence-transformers

Compute embeddings, run retrieval, and rerank results with pretrained and fine-tuned models.

19.2kupdated 1d ago6.2.0

Local LLM Inference3

ollama

Python client for Ollama, which downloads and runs open-weight LLMs locally.

10.6kupdated 8d ago0.6.3

llama-cpp-python

Python bindings for llama.cpp, for running GGUF models locally.

10.7kupdated 23d ago0.3.36-hip-radeon

mlx-lm

Run and fine-tune large language models on Apple Silicon with MLX.

7.5kupdated today0.32.2

LLM Serving3

vllm

A high-throughput and memory-efficient inference and serving engine for LLMs.

95.3kupdated today0.32.0

sglang

A high-performance serving framework for large language models and multimodal models.

37.8kupdated today0.5.22

deepinfer

DeepSeek's production inference engine for DeepSeek models, with MoE expert parallelism.

21.8kupdated 3d ago

Image and Video Generation1

diffusers

Pre-trained diffusion models for generating and editing images, audio, and video.

34.8kupdated today0.42.0

Fine-tuning4

peft

A library for parameter-efficient fine-tuning of large pretrained models.

21.8kupdated 1d ago0.21.2

trl

A library for post-training transformer language models with SFT, DPO, GRPO, and other trainers.

19.6kupdated today1.16.0

unsloth

Faster, lower-memory LLM fine-tuning, as a Python library or a desktop app.

78.5kupdated today0.1.910-beta

axolotl

A framework for fine-tuning and post-training large language models.

12.6kupdated today0.21.0

Speech4

faster-whisper

A Whisper reimplementation on CTranslate2, up to 4 times faster than openai-whisper with less memory.

26.1kupdated 1d ago1.2.1

openai-whisper

A general-purpose automatic speech recognition model trained on 680k hours of multilingual and multitask supervised data.

111.2kupdated 1mo ago20250625

gTTS

Python library and CLI tool for converting text to speech using Google Translate TTS.

2.6kupdated 6mo ago2.5.4

funasr

Industrial-grade speech recognition toolkit with speaker diarization and emotion detection.

20.8kupdated 2d ago1.4.16
Esc

Type to search every entry. ↑↓ to move, Enter to open.