aiagent.club
中文
GitHub

magentic

#567 of 964 in the AI Agent Index

11 Score
Real usage
Momentum
Attention
45

About

Seamlessly integrate Large Language Models into Python code. Use the @prompt and @chatprompt decorators to create functions that return structured output from an LLM. Combine LLM queries and tool use with traditional Python code to build complex agentic systems.

Configure your OpenAI API key by setting the OPENAIAPIKEY environment variable. To configure a different LLM provider see [Configuration] for more.

The @prompt decorator allows you to define a template for a Large Language Model (LLM) prompt as a Python function. When this function is called, the arguments are inserted into the template, then this prompt is sent to an LLM which generates the function output.

The @prompt decorator…

Across sources

2.4k Stars
  • Stars 2.4k
  • Forks 127
  • Commits 360
  • Releases 65