#221221st of 242 in Agent frameworks and SDKs

magentic

Python decorators that turn LLM prompts into typed, structured-output functions

Stars
2.4k
License
MIT
Last commit
Mar 2026
Last release
Mar 2026
Language
Python
Stars, last 30 weeks+39
27 Apr 2026: 2,390 stars4 May 2026: 2,394 stars11 May 2026: 2,394 stars18 May 2026: 2,395 stars25 May 2026: 2,396 stars1 Jun 2026: 2,400 stars8 Jun 2026: 2,400 stars15 Jun 2026: 2,400 stars22 Jun 2026: 2,401 stars29 Jun 2026: 2,402 stars6 Jul 2026: 2,403 stars13 Jul 2026: 2,404 stars20 Jul 2026: 2,404 stars27 Jul 2026: 2,406 stars3 Aug 2026: 2,408 stars10 Aug 2026: 2,408 stars17 Aug 2026: 2,408 stars24 Aug 2026: 2,410 stars31 Aug 2026: 2,411 stars7 Sept 2026: 2,420 stars14 Sept 2026: 2,421 stars21 Sept 2026: 2,421 stars28 Sept 2026: 2,421 stars5 Oct 2026: 2,422 stars12 Oct 2026: 2,424 stars19 Oct 2026: 2,425 stars26 Oct 2026: 2,425 stars2 Nov 2026: 2,425 stars9 Nov 2026: 2,425 stars16 Nov 2026: 2,426 stars23 Nov 2026: 2,429 stars

2,390 on 27 Apr 20262,429 on 23 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

Magentic is a Python library where `@prompt`, `@chatprompt` and `@prompt_chain` decorators turn a function signature into an LLM call that returns pydantic models or built-in types. It supports streaming of structured output, function calling, asyncio and OpenTelemetry tracing. Backends include OpenAI (default), Anthropic, LiteLLM, Mistral and OpenAI-compatible servers such as Ollama.

Who it is for: Python developers adding typed LLM calls and tool use to existing code

Strengths

  • Return type annotations drive structured output, including pydantic models and streamed Iterable items
  • Prompt functions can be passed as tools to other prompt functions, so parts can be tested alone
  • Backends: OpenAI, Anthropic, LiteLLM, Mistral, plus Ollama via an OpenAI-compatible base URL
  • OpenTelemetry observability with a Pydantic Logfire integration

Weaknesses

  • APIs without tool-call support cannot return Python objects from prompt functions
  • LiteLLM backend may lack function calling, structured output or streaming for some models
  • Mistral backend does not stream tool calls or structured outputs; they arrive at once
  • Library only: no UI, deployment layer or multi-agent orchestration

What it needs

  • no GPU
  • Needs OpenAI API key or other LLM provider, pydantic
  • Models: OpenAI, Anthropic, LiteLLM, Mistral, Ollama

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in Agent frameworks and SDKs

See all 242
Also in Agent frameworks and SDKs
RankProjectScore
#219kaibanjsJavaScript framework for multi-agent workflows with a Kanban-style task board Live demo ↗ (opens in a new tab)1.5k starsMIT26 out of 100
#220llmunityUnity package for running local llama.cpp LLM characters in games1.7k starsApache-2.025 out of 100
#222latentmasMulti-agent LLM reasoning that passes latent states between agents instead of text1.2k starsApache-2.024 out of 100
#223openbiomedBiomedical skill set and toolkit for drug discovery and protein work Live demo ↗ (opens in a new tab)1.1k starsMIT24 out of 100
#224mle-benchBenchmark of 75 Kaggle competitions for scoring ML engineering agents1.8k starscustom license23 out of 100