Generate a starter pack
Create a Python pack and an editable compile manifest together:--output to use ./acme-pack. The name must begin with a lowercase letter and contain only lowercase letters, digits, or hyphens, with a maximum of 63 characters. harnest is reserved. The destination must not already exist; the command never overwrites an existing team pack.
The generated manifest starts with:
PATH:
.exe. Set HARNEST_CLI to your Harnest executable path if it is not on PATH.
The initializer copies the manifest and sample documentation into each new agent. The guide stays at docs/team-guide.md for teammates to read and is excluded from compilation. It does not become an agent instruction or skill. Use an agent template for standard instructions.md, skills, and other required agent structure. A team’s custom CLI can also install internal-service extensions using Harnest’s existing extension commands.
Adding an extra requires the corresponding [project.optional-dependencies] entry in the generated agent’s pyproject.toml. The compile manifest controls dependency selection only; it does not package arbitrary project files.
Edit these files before creating agents. To update existing agents, increment schema_version, add a migration, and run python ./acme-pack/pack.py upgrade ./sales --apply. Initializers do not run again during upgrade.
You can later move this starter into your team’s Python package and expose main through a company CLI console entry point. Include both template files beside pack.py in the installed package. Harnest compiles agents; the pack remains authoring code.
Start with a typed definition
This first release accepts a team name and writes it to the company’sowner field. The migration example later renames that field to team.
pack.py
Options validates values supplied by the caller. Settings validates the resulting company file after that pack’s hooks finish. They serve different purposes: an upgrade can validate existing settings without asking the user to repeat their init options.
Pack properties
Keep company properties in a separate file such as
acme-agent.yaml. Use existing Harnest fields when changing Harnest configuration; arbitrary company fields do not extend Harnest’s configuration schema.
Package templates
A pack that generates a company workflow could have this structure:templates=Path(__file__).parent / "templates" to ProjectPack, and include the files in your package’s build configuration. Templates are read as data; Harnest does not import or execute them.
Declare compilation dependencies
Use ordinary pack operations to maintain optional dependency selections:[project.optional-dependencies].crm group in the agent’s pyproject.toml, for example through the team’s agent template. Package versions remain in Python metadata. The compile manifest does not accept resources.
When changing existing agents, add a versioned pack migration for the declarations. Generated-file and YAML ownership rules still apply: coordinate shared lists between packs rather than having multiple packs claim the same key. Compilation reads only the resulting declarations and files; it does not import the pack or execute its migrations. Your authoring package does not need to ship with the agent.
See compilation selections and reports for dependency selection, compiled content, and shared-runtime behavior.
Choose what runs
Pass installed pack objects explicitly toProjectCLI or ProjectPlanner. Harnest does not discover packs from package names in a project file.
Pack callbacks are trusted Python, not sandboxed code. Keep them deterministic and free of filesystem or network side effects. A preview can execute callbacks multiple times without applying any changes.
@pack.initialize reference or build your company CLI.