AutoPlan
AutoPlan is an open-source Python framework that provides a powerful pattern for implementing agentic AI applications, leveraging dynamic plan generation to select and use external tools based on the task's context.
Installation
AutoPlan requires Python 3.12 or higher.
Install using pip:
pip install -U autoplan
Quick start
The best way to start using AutoPlan is to create a new application. AutoPlan has a command-line interface that allows you to do that. To create your own application, you can use the following command:
autoplan generate \
--name "my_app" \
--description "Given a situation described by the user, generate a joke about it." \
--outdir .
Note that you can also leave the parameters empty and let the CLI prompt you for the information, which will help you get started with bootstrapping your application.
This command line will create a new folder named my_app with the basic structure of an AutoPlan application. You can then go in the application folder and run it with the following command:
cd my_app
poetry install
poetry run python my_app/app.py
This will start a Gradio interface that allows you to interact with the application without any additional effort. You can now use your browser and go to http://localhost:7860 to see the application.
[!NOTE] By default AutoPlan will use Open AI models and will include a search tool based on you.com, which require API keys. You can set the
OPENAI_API_KEYandYDC_API_KEYenvironment variables to your OpenAI and You API keys to use your own accounts.
[!NOTE] You may want to use other LLMs in your application. You can do that by setting the
generate_plan_llm_modelandcombine_steps_llm_modelparameters in thewith_planningdecorator, and/or by setting the model of your choice in your tool implementations. If your application uses other models, don't forget to set the API keys for those models in your environment (e.g.ANTHROPIC_API_KEY = <your-key>) .
Why use AutoPlan?
Agentic AI applications are an emerging AI paradigm where LLMs use external tools to accomplish tasks that are beyond their own capabilities while keeping control over how to use those tools so that their abilities are not limited to predefined workflows. Building agentic applications requires a system design that allows plans to be dynamically generated, tools to be efficiently executed, and data flowing between tools to be properly channeled to provide a coherent output. AutoPlan provides just that.
AutoPlan is organized around three core components, each serving a specific purpose to enable dynamic planning, execution, and integration required for building an agentic application:
Tools can be any typed Python function — they can be procedural code, LLM calls, or AutoPlan applications themselves. Tools can be composed from smaller tools.
Planners are LLM-based components that generate the sequence of tools to be executed and the arguments to be passed to each tool to solve a given task.
Composers integrate tool outputs based on the planner’s strategy to produce a final output.
Developer docs
Type checking
For the planning framework: poetry run pyright autoplan
Generating docs
Run a web server to view the docs:
poetry run pdoc autoplan
Generate the docs:
poetry run pdoc autoplan --output build-docs
Running unit tests
poetry run pytest tests
Metadata
Release files for autoplan 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autoplan-0.1.3.tar.gz | 19.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autoplan-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.5 kB
Release files / autoplan-0.1.3.tar.gz
| Download URL | autoplan-0.1.3.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
926cc999b1e5c33aaf70849d7263941bd4dff7c14ec0ad9224fa61e9b36eea6c
|
|
BLAKE2b-256 checksum How to use checksums |
7ea16a884345ddf56f287547c25b461a92990a136bfa5e8220c470e56be15902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0
|
Release files / autoplan-0.1.3-py3-none-any.whl
| Download URL | autoplan-0.1.3-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b65db41ca95917e05c5d96a49d04dfe3416956d146f0bde53c18db5517376401
|
|
BLAKE2b-256 checksum How to use checksums |
f3d2758c27a739d2b276f1f18d78b4173d1484476d08d04dec65d9fecb8454a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0
|