Skip to main content

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.

Project description

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_KEY and YDC_API_KEY environment 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_model and combine_steps_llm_model parameters in the with_planning decorator, 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.

pdoc architecture

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoplan-0.1.1.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autoplan-0.1.1-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

Details for the file autoplan-0.1.1.tar.gz.

File metadata

  • Download URL: autoplan-0.1.1.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for autoplan-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a61491c4ab467c5919c8b58fbb52e2bb1348516cca52e786f24cb74b8b78a51a
MD5 8be0da7f1df0b5e953431e9a698c1cfb
BLAKE2b-256 014f97a8458f8df13df8ed9397dd977739e3660055ba50b0cc556fc36f00b277

See more details on using hashes here.

File details

Details for the file autoplan-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: autoplan-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Darwin/23.6.0

File hashes

Hashes for autoplan-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd86cad959b567c6cbe447a29d8d7375809eaee4ed726c0b6949280dae95a1c
MD5 bb92529361766e646f2cba6ee2721e93
BLAKE2b-256 01a58ec93b1533346275658c424577f39c755cbbdafd237180dbfca676dd36b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page