Skip to main content
A Harnest Extension packages reusable application functionality. It runs in the agent process and can contribute declared lifecycle, context, storage, HTTP, content, and telemetry capabilities. It does not need to connect to an external service. Building one is a three-part process: define the extension’s application-owned object, declare how it joins Harnest lifecycle, then consume its bounded API from agent code.
1

Create the extension

Add extensions/<name>/extension.yaml, export the singleton from extension.py, and declare any SDK dependencies.

Create a Harnest Extension

Build the folder, manifest, typed context, and shared dependency contract.
2

Integrate lifecycle behavior

Own application startup and shutdown in the extension class. Put declared Harnest hooks and factories under the extension’s lifecycle/ directory.

Use lifecycle in an extension

Declare capabilities, ordering, hooks, storage, telemetry, and auditing.
3

Use the extension from the agent

Import its compiler-owned namespace or resolve its typed invocation context. No central registry is required.

Use a Harnest Extension

Discover local extensions, call their public API, and understand PyPI search behavior.

Choose the right extension boundary

Harnest Extensions share the root interpreter, event loop, dependency solve, and lock. They do not receive extension-private environments, and they do not turn an external job into a resumable Python process.