Skip to main content

Piilot plugin SDK — public primitives (connectors, tools, modules, agents, HTTP, DB, scheduler, cache, storage, access, knowledge) for building Piilot plugins.

Project description

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.2.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.

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

piilot_sdk-0.4.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

piilot_sdk-0.4.0-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file piilot_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: piilot_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for piilot_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4ba2c851ed4f66676c8a8c86d410be0ddd3d32d1a11f78bdf045efcfcd0c022d
MD5 544356cf552c00cea365ee6ce91cff75
BLAKE2b-256 2dd0bce4c21a3dd4b6f554becb4ff200e0a51bb503e7fb7d006c9daccddc24a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for piilot_sdk-0.4.0.tar.gz:

Publisher: release-sdk.yml on Kinetics-Consulting-V2/AICockpit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file piilot_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: piilot_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 48.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for piilot_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e435a5749aa6c4b96c338fa73c0a39b070e78fcef1394208c1126d9bfaa32fd
MD5 765c660be4308a99122202f0b3bec954
BLAKE2b-256 cd9e12d1f45b00df7d7616f61f8be32360a13c603f259911801a47a372d64c27

See more details on using hashes here.

Provenance

The following attestation bundles were made for piilot_sdk-0.4.0-py3-none-any.whl:

Publisher: release-sdk.yml on Kinetics-Consulting-V2/AICockpit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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