Skip to main content

piilot-sdk

Public SDK for building Piilot plugins — the AI cockpit with data sovereignty.

PyPI version Python versions License

What is it

piilot-sdk is the stable, narrow public contract Piilot plugins import from. A plugin MUST only import from piilot.sdk.* — any import from backend.* is refused at boot by the loader's AST check.

The SDK exposes primitives for:

  • Connectors — credentials storage with manifest-driven auto-encrypt
  • Tools — agent tool registration with namespace isolation
  • Modules — dashboards and workflow surfaces (register_module)
  • Agents — session scope + templates (register_template) + system prompt builders
  • HTTPregister_router / register_webhook_router with auth deps
  • DB — RLS-aware cursor, run_in_thread, execute_values, Json
  • Schedulerregister_sync_handler for per-provider sync dispatch
  • Cache — async Redis primitives with namespace auto-prefix
  • Storage — async S3 primitives with namespace auto-prefix
  • Accesscheck_grant passthrough
  • Cryptomask_api_key helper

Install

pip install piilot-sdk

Quick start

Create a plugin entry point:

# piilot_pack_hello/__init__.py
from piilot.sdk import Plugin, Context
from piilot.sdk import tools, http

class Plugin(Plugin):
    def register(self, ctx: Context) -> None:
        tools.register_tool({
            "id": "hello.greet",
            "label_key": "hello.tools.greet.label",
            "description_key": "hello.tools.greet.description",
            "callable": lambda name: f"Hello, {name}!",
        })

        http.register_router(
            routes=[...],
            prefix="/api/hello",
        )

Declare it as a Piilot plugin in your pyproject.toml:

[project.entry-points."piilot.plugins"]
hello = "piilot_pack_hello:Plugin"

[tool.piilot.plugin]
manifest_version = 1
namespace = "hello"
sdk_compat = ">=0.7.0,<1.0.0"
# ...

Documentation

Full guide: PLUGIN_DEVELOPMENT.md.

Changelog: SDK_CHANGELOG.md.

Template repo: piilot-plugin-template.

Versioning

Semver. Breaking changes bump the major. Plugins pin a compatible range via sdk_compat in their manifest.

License

Apache-2.0. See LICENSE.

Release files for piilot-sdk 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piilot-sdk 0.9.0
File Size Uploaded
piilot_sdk-0.9.0.tar.gz 45.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for piilot-sdk 0.9.0
File Interpreter ABI Platform
piilot_sdk-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 102.2 kB

Release files / piilot_sdk-0.9.0.tar.gz

Download URL piilot_sdk-0.9.0.tar.gz
Size 45.1 kB
Tags Source
SHA-256 checksum
How to use checksums
32cc35f64bb9faa5d1049408ebb6bc40d36b88e90038a8832a3726390f27c7a3
BLAKE2b-256 checksum
How to use checksums
fd3562a71b9e1b9fef061bb6ca2bd9418535b98e50d45d6101fb32764fa96bc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / piilot_sdk-0.9.0-py3-none-any.whl

Download URL piilot_sdk-0.9.0-py3-none-any.whl
Size 57.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
585d75dc130df71a6b36c6e0ae60548f354fbfddd1f50c32e1e3d2bef88b1754
BLAKE2b-256 checksum
How to use checksums
b291a865bdd02d81ff83e830ae914a0ee3e5838569c15f564cf8204b07bd2bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page