Skip to main content

Agent Plugin Authoring

Requirements and Dependencies

Installing dependancies and additional requirements

Files and Directories

The following is an example of what a sample Plugin directory looks like.

The /requirements.txt file is your point of interest here.

handler.py
manifest.json
requirements.txt    <-- HERE
readme.md           
/template           
    panel.html      
    thread.html     
    message.html   
/static             
    icon.png
    ...

requirements.txt

Is a PIP-compatible requirements file which will be installed.

When developing you can set the environment variable: PROMPT_DEV_INSTALL_REQS to ENABLED, this will install your requirements on each container start.

When going to production it's recommended to disable this setting, copy your plugins into an image in your Dockerfile, and run something like the following:

RUN pip3 install --upgrade pip && find . -name requirements.txt -exec pip3 install --no-cache-dir -r {} \;