# jackmpcollins/magentic

Seamlessly integrate LLMs as Python functions

Repository: https://github.com/jackmpcollins/magentic
Canonical: https://ross.abutalabs.com/products/magentic
Homepage: https://magentic.dev/
Language: Python
License: MIT
License Family: permissive
Topics: agent, ai, chatbot, chatgpt, gpt, llm, openai, openai-api, prompt, pydantic, magentic, magnetic, agentic, magenta
Last push: 2026-03-11T13:44:45+00:00

## Health v2 (maintenance only)
Score: 74/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 71, release rhythm 74, longevity 83
- inputs: {"age_days": 1172, "days_push": 175, "days_rel": 175, "gap_med": 6, "n_releases_24m": 16}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2415, forks 127 (observed 2026-08-28T04:06:50.243990+00:00)

## What it is
A Python library for seamlessly integrating LLMs into Python code via @prompt and @chatprompt decorators that return typed, structured output. It supports multiple providers (OpenAI, Anthropic, Ollama), tool/function calling, streaming, and observability for building agentic systems.

## Use cases
- call an llm as if it were a python function
- get structured pydantic output from an llm
- build ai agents by mixing llm calls with python code
- add llm-powered function calling to my app
- stream structured llm responses while generating
- switch between openai anthropic and ollama providers
- add observability to llm calls with opentelemetry

## When to choose
- you want typed, structured LLM outputs validated with pydantic
- you prefer decorator-based, function-style LLM integration in Python
- you need multi-provider support (OpenAI, Anthropic, Ollama) behind one API
- you're building agentic workflows combining tool calls with regular Python code

## When to avoid
- you need a full agent framework with built-in memory, planning, or UI
- you're not using Python
- you want a no-code or chat-interface product rather than a library
- you need fine-grained control over raw prompt/completion APIs

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, agent-framework, prompt-engineering, sdk
- domain: large-language-models, developer-tools
- platform: python, cross-platform
- tags: structured-outputs, pydantic, function-calling, decorators, openai, anthropic, ollama, streaming, opentelemetry, ai-agents, natural-language-processing

## Member repositories
- jackmpcollins/magentic (main) score 74

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:50.243990+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:33:11.654052+00:00, confidence not recorded.
  - readme: https://github.com/jackmpcollins/magentic (fetched 2026-08-28T04:06:50.243990+00:00, sha 18cc058a4a5b)
  - homepage: https://magentic.dev/ (fetched 2026-08-29T10:13:48.950905+00:00, sha 93854cbbeb78)
- Data as of 2026-08-30T08:39:29.467469+00:00.
