Agent & Prompt Frameworks
Developer frameworks that turn prompts into programs: structured output libraries, agent orchestration toolkits, prompt compilers and automatic prompt optimizers.
AdalFlow
A library for building LLM applications that also auto-tunes them, optimizing prompt text and few-shot demonstrations against a training set. It aims to make prompt tuning as routine as model training.
CrewAI
A Python framework for role-playing agent crews, where each agent is defined by a role, goal and backstory that become its prompt. Tasks are assigned to agents and executed sequentially or hierarchically.
DSPy
A Python framework that replaces hand-written prompt strings with declarative modules and signatures, then compiles them against your data. Optimizers search for the wording and few-shot examples that score best on a metric you define.
EvoPrompt
The official implementation of a paper that applies evolutionary algorithms to prompt search, using a language model to perform crossover and mutation on candidate prompts. Populations are scored on a dev set each generation.
GEPA
An optimizer that improves prompts and other text artifacts through reflective evolution, reading execution traces and natural-language feedback to propose edits. It integrates with DSPy and other pipelines.
Guidance
A templating language for steering language models token by token, interleaving generation with control flow, regex and grammar constraints. Output structure is enforced during decoding rather than checked afterwards.
Haystack
deepset's orchestration framework for retrieval and agent pipelines built from composable components. Prompt builders are pipeline nodes, so prompt text is versioned with the rest of the pipeline definition.
Instructor
A library that maps model responses onto Pydantic models so a prompt returns validated typed objects instead of raw text. Failed validations are automatically retried with the error fed back into the prompt.
LangChain
One of the most widely used frameworks for LLM applications, providing prompt templates, chat message abstractions, tool calling and agent loops. It connects to the LangSmith platform for tracing and prompt management.
Letta
A platform for stateful agents, formerly MemGPT, where the agent manages its own context window through editable memory blocks. The prompt is assembled from persistent memory rather than rebuilt each turn.
LlamaIndex
A data framework for connecting documents and databases to language models, with a prompt template layer that can be overridden per query engine. It is commonly used to build retrieval-augmented prompt pipelines.
LLM CLI
Simon Willison's command-line tool and Python library for running prompts against many models. Prompts, system prompts and responses are logged to a local SQLite database, and saved templates can be reused.
Marvin
A Python toolkit from Prefect for building AI features as ordinary functions, where the prompt is generated from type hints and docstrings. It covers classification, extraction and generation tasks without manual prompt strings.
OPRO
Reference code from the Google DeepMind paper that uses a language model as the optimizer for its own instructions. Previously scored prompts are fed back as context so the model proposes better ones.
Outlines
A structured generation library that forces model output to match a JSON schema, regex or context-free grammar. It works with local and hosted models and is used to make prompt output parseable by default.
PromptWizard
A Microsoft framework that iteratively refines both prompt instructions and in-context examples using model-generated critique. It targets task-specific prompt optimization with a modest number of API calls.
SAMMO
A Microsoft research library for structure-aware prompt optimization. Prompts are represented as programs whose components can be mutated and searched against multiple objectives such as accuracy and cost.
Semantic Kernel
Microsoft's SDK for embedding model calls into C#, Python and Java applications. Prompts live in versioned template files with typed parameters and are invoked as callable functions alongside native code.
SGLang
A serving framework and domain-specific language for programs that make many structured model calls. Its runtime reuses shared prefixes across calls, which speeds up branching and multi-step prompt programs.
TextGrad
A research library that treats natural-language critique as a gradient, backpropagating textual feedback through a pipeline to improve prompts and other text variables. It mirrors the autograd style familiar from PyTorch.
Verbalized Sampling
A reference implementation of a training-free prompting strategy that asks a model for a distribution of responses with probabilities, which the authors report reduces mode collapse in creative tasks.
ell
A language model programming library that treats prompts as versioned Python functions. A local store records every prompt version and invocation so changes can be diffed and compared in a studio UI.
Magentic
A small Python library that turns a decorated function signature and docstring into a prompt, returning the declared return type. It supports streaming, function calling and chat-based prompt chains.
LMQL
A query language from ETH Zurich that blends Python control flow with prompt text and declarative constraints. Constraints are compiled into decoding rules so the model is guided while it generates.
Mirascope
A Python library that keeps prompts as decorated functions with normal editor tooling rather than opaque chains. It supports response models, prompt templates and a provider-agnostic call interface.
Pydantic AI
An agent framework from the Pydantic team that applies model validation to prompt inputs and outputs. It supports typed dependencies, streaming structured responses and instrumentation via Logfire.
BAML
A domain-specific language for writing prompts as typed functions that compile to Python, TypeScript and other clients. Schemas are enforced with a parser that repairs imperfect model output.
SmythOS Runtime Environment
An open-source runtime for agentic AI that separates agent definitions, skills and connectors, letting the same agent specification run across different model providers and storage backends.
AutoGen
A Microsoft Research framework for multi-agent applications where agents exchange messages to solve a task. Each agent is configured with its own system prompt, tools and termination rules.
LMOps
A Microsoft Research collection of projects on making language models usable in production, including automatic prompt optimization, prompt compression and structured prompting techniques.
Optillm
An OpenAI-compatible inference proxy that applies reasoning techniques such as chain-of-thought variants, best-of-n sampling and self-consistency at request time to improve answer quality.
AutoPrompt
A prompt tuning framework built around intent-based prompt calibration. It generates challenging edge-case examples, collects judgements on them and rewrites the prompt to close the gap.
Adaline Gateway
An open-source, locally running SDK that provides one interface for calling many model providers, with batching, retries and caching handled in the library rather than a hosted service.
NeMo Guardrails
An NVIDIA toolkit for adding programmable rails to conversational applications. Rails are written in a dedicated modelling language and control topics, dialogue flow and unsafe output.
spacy-llm
An Explosion package that plugs language models into spaCy pipelines, shipping versioned prompt templates for tasks such as named entity recognition, classification and summarisation.
Priompt
A JSX-based prompt design library from the makers of Cursor. Prompt components are given priorities so the renderer can drop lower-priority sections when the context window is tight.
Questions
Frequently asked questions
What counts as agent & prompt frameworks?
Developer frameworks that turn prompts into programs: structured output libraries, agent orchestration toolkits, prompt compilers and automatic prompt optimizers.
What are agent & prompt frameworks?
Developer frameworks that turn prompts into programs: structured output libraries, agent orchestration toolkits, prompt compilers and automatic prompt optimizers.
Do I need a tool for this?
Solo users often do fine with a text file. Teams shipping prompts to production usually want versioning and evaluation. Start with the free tier of a tool in the category.