# AANCER developer documentation (full text) > How to build AANCER extensions: signed packs holding workflow templates, agents, skills, themes, connectors, dashboards, event hooks and embedded apps. Pages: https://aancer.ai/developers. JSON schemas: https://aancer.ai/dev/schemas/ --- Source: https://aancer.ai/developers --- title: Build on AANCER | AANCER Developers description: Build templates, agents, skills, themes, connectors, dashboards, hooks and embedded apps for AANCER. Formats, schemas, examples and a prompt for your AI. --- ## Build on AANCER AANCER is an all-in-one platform for agentic AI that customers run in the cloud or on their own infrastructure. You can extend it without touching its code. Every extension is plain data in a signed file, called a pack. This section shows every format, with JSON Schemas, full examples, the install steps and the errors you may see. It is written so that a developer, or an AI assistant such as ChatGPT, Claude or Gemini, can produce a valid extension from it. ## What you can build | Build | What it is | Page | |---|---|---| | Workflow templates | reusable workflows with typed parameters, deployed from the template gallery | [Templates](/developers/templates) | | Agents | AI assistants with instructions, tools and limits, shipped as agent blueprints | [Agents](/developers/agents) | | Skills | reusable instructions that shape how chat and agents work | [Skills](/developers/skills) | | Themes | colours, fonts, logos, login page and UI wording | [Themes](/developers/themes) | | Connectors | integrations with external systems, certified and signed by AANCER | [Connectors](/developers/connectors) | | Dashboards | datasets, semantic models, charts, KPIs, tables and forms | [Dashboards](/developers/dashboards) | | Hooks | start a workflow or agent when a platform event happens | [Hooks](/developers/hooks) | | Embedded apps | your own web application inside AANCER, with single sign-on and data access | [Embedded apps](/developers/apps) | | API and MCP | REST endpoints, and the MCP server for external AI clients | [REST API and MCP](/developers/api) | ## The pack model in one minute - A **pack** is a ZIP file with the extension `.ancpack`. It holds `MANIFEST.json`, a signature `MANIFEST.sig`, and content files under `content/`. - The manifest lists **items**. Each item has a `kind` (such as `template`, `skill` or `app`), a `schemaVersion`, an `id` and a `spec`. - **Parameters** make a pack portable. Write `{{param.target_workspace}}` in a spec, and the administrator picks the workspace when activating the pack. - You **sign** the pack with your own key using the `aancer-pack` CLI. An administrator adds your public key as a trust key once. - Installing has three steps: **import** (checks everything, changes nothing), **activate** (installs the items), **retire** (removes them). - A pack id plus version never changes. To ship a fix, bump the version. ```json { "v": 2, "kind": "bundle", "id": "acme.business-skills", "version": "1.0.0", "title": "Acme business skills", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "items": [ { "kind": "skill", "schemaVersion": 1, "id": "vendor-review", "scope": "install", "spec": { "$ref": "content/vendor-review.json" } } ] } ``` Read [Packs](/developers/packs) for the full format. ## Build with your AI assistant **Ready to use:** open the [AANCER Builder Gem in Gemini](https://gemini.google.com/gem/1-QrMUAZtHW0-ooIxLo6OXNqbvnTuxO0C?usp=sharing). It already knows the developer docs and every schema. Tell it what you want to build. In Claude, ChatGPT, Cursor or VS Code, connect the [AANCER Builder MCP server](#connect-the-aancer-builder-mcp-server). Or copy this prompt into ChatGPT, Claude or Gemini. Replace the last paragraph with what you want to build. ```text You are helping me build an extension for the AANCER platform. Before you write anything: 1. Read https://aancer.ai/dev/llms.txt. It lists every AANCER developer page and schema. 2. Read https://aancer.ai/developers-packs and https://aancer.ai/dev/schemas/pack-manifest.schema.json. 3. Read the page and the JSON Schema for the extension type I need, for example https://aancer.ai/developers-templates and https://aancer.ai/dev/schemas/template.schema.json. Rules: - Use only fields that appear in the schema. Do not invent fields. Unknown fields are refused. - Output a folder: manifest.json plus content/.json for each item spec. - Use "v": 2, "kind": "bundle", a pack id like ".", and a strict semver version. - Never put real ids of an installation (connections, knowledge sets, workspaces, approvers) into a spec. Use pack parameters ({{param.}}) or template parameters with bindings instead. - Never put keys, tokens or passwords into any file. - Check every limit in the field tables (lengths, counts, allowed values). - After the files, list the commands to sign the pack with the aancer-pack CLI and the steps to import and activate it in a test installation. What I want to build: ``` Tips for good results: - Name the extension type. "A workflow template", "an agent blueprint" and "an embedded app" lead to different formats. - Paste back the exact import error if there is one. Every page has a "Common errors" table the assistant can use. - Ask the assistant to validate each file against the JSON Schema before it answers. ## Connect the AANCER Builder MCP server Your assistant can also use AANCER's public builder server directly. It reads the docs, the schemas and the examples, and it checks a pack before you sign it. It is read-only and needs no account. - Endpoint: `https://aancer.ai/mcp` (Streamable HTTP, no authentication) - Tools: `list_extension_types`, `get_docs`, `get_schema`, `get_example`, `validate_pack`, `search_docs` - Prompt: `build_extension` walks the assistant through docs, schema, example, files and validation | Client | How to connect | |---|---| | Claude (web and desktop) | Settings, Connectors, add a custom connector with the URL `https://aancer.ai/mcp` | | Claude Code | `claude mcp add --transport http aancer-builder https://aancer.ai/mcp` | | ChatGPT | Turn on developer mode for connectors, then create a connector with the URL `https://aancer.ai/mcp` and no authentication | | Gemini CLI | Add `"aancer-builder": {"httpUrl": "https://aancer.ai/mcp"}` under `mcpServers` in `~/.gemini/settings.json` | | Cursor, VS Code and other MCP clients | Add an HTTP server named `aancer-builder` with the URL `https://aancer.ai/mcp` | Then ask, for example: "Use the AANCER builder tools to make a workflow template that triages supplier invoices with a human approval, and validate it." `validate_pack` checks the published schemas and the pack structure. Your installation runs further checks on import: the signature, licence features and references to items that exist there. ## JSON Schemas | Schema | Covers | |---|---| | [pack-manifest.schema.json](https://aancer.ai/dev/schemas/pack-manifest.schema.json) | the pack manifest | | [template.schema.json](https://aancer.ai/dev/schemas/template.schema.json) | `template` item spec | | [agent.schema.json](https://aancer.ai/dev/schemas/agent.schema.json) | `agent-blueprint` item spec, plus the REST agent configuration | | [skill.schema.json](https://aancer.ai/dev/schemas/skill.schema.json) | `skill` item spec | | [theme.schema.json](https://aancer.ai/dev/schemas/theme.schema.json) | `theme` item spec, plus `locale` | | [connector.schema.json](https://aancer.ai/dev/schemas/connector.schema.json) | `connector` item spec | | [dashboard.schema.json](https://aancer.ai/dev/schemas/dashboard.schema.json) | `dataset`, `model`, `widget` and `dashboard` item specs | | [hook.schema.json](https://aancer.ai/dev/schemas/hook.schema.json) | `hook` item spec | | [app.schema.json](https://aancer.ai/dev/schemas/app.schema.json) | `app` item spec, plus `link` and `card` | All schemas use JSON Schema draft 2020-12. ## Examples The [AANCER developers repository on GitHub](https://github.com/Aancer-ai/aancer-developers) holds a complete, valid pack for every type: two workflow templates, two agent blueprints, a skill, a theme, a connector source folder, a sales dashboard, a hook and two embedded apps with working app code. The examples and schemas are MIT licensed. The AANCER platform itself is proprietary. ## Tools - **aancer-pack CLI**: creates keys, signs, verifies, inspects and lints packs. Node 20 or newer. Available to partners and builders on request: [contact us](https://aancer.ai/contact). - **AANCER Builder MCP server** at `https://aancer.ai/mcp`: `validate_pack` checks a pack against the schemas before you sign it. See [Connect the AANCER Builder MCP server](#connect-the-aancer-builder-mcp-server). - **A test installation**: import your pack into an EVAL or test installation. Import checks everything and installs nothing until you activate. [Start a free EVAL](https://aancer.ai/contact?intent=eval). ## Start here 1. Read [Packs](/developers/packs). 2. Pick your type from the table above and copy its Quick start. 3. Sign with `aancer-pack`, import into a test installation, read the summary, activate. 4. Partners who want to publish in the certified catalog add `listing` and `declarations` and run `aancer-pack lint`. See the [partner programme](https://aancer.ai/partners). ## Limits and editions Each page lists the limits for its type and any licence feature it needs, such as Embedded apps, Certified Agents or the MCP server. Check your edition on [aancer.ai/pricing](https://aancer.ai/pricing). --- Source: https://aancer.ai/developers-packs --- title: Extension packs (.ancpack) | AANCER Developers description: The signed .ancpack format that carries every AANCER extension. Manifest fields, parameters, signing, trust keys, install and errors. --- ## Extension packs Every AANCER extension travels in one file format: the signed extension pack, file extension `.ancpack`. A pack is a ZIP archive with a manifest, a signature and optional content files. One pack can carry one item or many: templates, agents, skills, themes, dashboards, hooks, embedded apps, links and more. The installation checks the signature and the hash of every file before it trusts anything. A pack then goes through three steps: **import** (verify and stage), **activate** (bind parameters and install the items) and **retire** (uninstall). The same file works for an upload in the admin screen, the REST API, an offline server folder and the certified catalog. ## Quick start The smallest useful pack holds one skill. ```text my-pack/ manifest.json content/ vendor-review.json ``` `manifest.json`: ```json { "v": 2, "kind": "bundle", "id": "acme.business-skills", "version": "1.0.0", "title": "Acme business skills", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "items": [ { "kind": "skill", "schemaVersion": 1, "id": "vendor-review", "scope": "install", "spec": { "$ref": "content/vendor-review.json" } } ] } ``` `content/vendor-review.json` is a skill spec (see [Skills](/developers/skills)). Sign it and import it: ```bash aancer-pack keygen --out acme.key aancer-pack sign manifest.json content/ -o acme.business-skills-1.0.0.ancpack --key acme.key aancer-pack verify acme.business-skills-1.0.0.ancpack --pubkey acme.pub ``` Then an administrator adds your public key under **Platform Settings > Extensions > Trust keys** and imports the file with **Import pack**. ## File layout What you write (the input to `aancer-pack sign`): ```text my-pack/ manifest.json # the manifest; items point at content files with {"$ref": "content/.json"} content/ .json # one JSON object per item spec (or put the spec inline in manifest.json) logos/logo.png # binary assets, only the allowed media types ``` What the installation reads (the signed archive): ```text MANIFEST.json # your manifest in signing form: every $ref gets a "$hash", binaries are listed in "assets" MANIFEST.sig # base64url Ed25519 signature over the canonical JSON of MANIFEST.json content/... # every file must be referenced by an item ($ref) or listed in assets ``` Rules for the archive: - `MANIFEST.json` must be at the root. - `MANIFEST.sig` must be present and not empty. - Every other file must live under `content/`. No `..`, no backslashes in names. - Every file under `content/` must be referenced by an item `$ref` or listed in `assets`. An extra file makes the whole pack fail the signature check. - A `$ref` file must contain a JSON object. - Use stored or deflate compression only. No encrypted entries. ## Field reference JSON Schema: [pack-manifest.schema.json](https://aancer.ai/dev/schemas/pack-manifest.schema.json) ### Manifest | Field | Type | Required | Rules | |---|---|---|---| | `v` | integer | yes | must be `2` | | `kind` | string | yes | must be `"bundle"` | | `id` | string | yes | `^[a-z0-9][a-z0-9._-]{2,63}$`. Use `.`, for example `acme.invoice-desk` | | `version` | string | yes | strict semver: `MAJOR.MINOR.PATCH`, optional `-pre`. No `+build` part | | `title` | string | no | shown in the admin screen. Required (1 to 120 characters) when `listing` is present | | `publisher` | object | no | `{ "name": "...", "keyId": "..." }`. `keyId` names the key that signed the pack | | `requires.platform` | string | no | `>=X.Y.Z`, optionally followed by ` }}`. Not allowed with `install` scope | | `spec` | object | yes | the item spec inline, or `{"$ref": "content/.json"}` | Supported schema versions: | Kind | Versions | Page | |---|---|---| | `template` | 1 | [Templates](/developers/templates) | | `agent-blueprint` | 1 | [Agents](/developers/agents) | | `skill` | 1 | [Skills](/developers/skills) | | `theme` | 2 (1 for simple branding) | [Themes](/developers/themes) | | `locale` | 1 | [Themes](/developers/themes) | | `connector` | 1 | [Connectors](/developers/connectors) | | `dataset`, `model`, `widget`, `dashboard` | 1 | [Dashboards](/developers/dashboards) | | `hook` | 1 | [Hooks](/developers/hooks) | | `app` | 2 | [Embedded apps](/developers/apps) | | `link`, `card` | 1 | [Embedded apps](/developers/apps) | An item with a schema version that the installation does not support is staged as `unsupported`. It is not an error, but nothing is installed. `GET /api/extensions/schemas` returns the table for a given installation. ### Parameters Parameters let one pack work in any installation. The administrator binds them at activation. | Field | Type | Required | Rules | |---|---|---|---| | `id` | string | yes | `^[a-z][a-z0-9_]{0,63}$`, unique | | `type` | string | yes | `connection`, `workspace`, `dataset`, `string`, `secret`, `workflow`, `agent` | | `label` | string | no | shown in the activation dialog | | `required` | boolean | no | default `true` | | `connector` | string | no | for `connection`: the connector the connection must belong to | | `default` | any | no | used when no value is sent and none was bound before | Reference a parameter as the whole string `{{param.}}` anywhere in a spec or in an item's `workspace`. Every referenced parameter must be declared. At activation every value is a string. A `workspace` value must name an existing workspace. A `connection` value must name an existing connection. A `secret` is stored encrypted. ### Assets | Field | Type | Rules | |---|---|---| | `path` | string | starts with `content/`, no `..` | | `sha256` | string | 64 lower-case hex characters | | `contentType` | string | `font/woff2`, `image/png`, `image/svg+xml`, `image/jpeg`, `image/x-icon`. `application/x-tar` only as the `archive` of a connector item | `aancer-pack sign` lists every binary file for you. Each asset is at most 4 MiB. A connector archive is at most 96 MiB. ### Catalog blocks You only need `listing` and `declarations` to submit a pack to the certified catalog. When they are present they are checked strictly and unknown fields are refused. `listing`: | Field | Rules | |---|---| | `v` | `1` | | `summary` | required, 1 to 280 characters | | `description` | plain text, at most 4000 characters | | `category` | required. One of `operations`, `finance`, `hr`, `legal`, `sales`, `marketing`, `customer-service`, `it`, `devops`, `security`, `compliance`, `procurement`, `manufacturing`, `healthcare`, `retail`, `education`, `public-sector`, `productivity`, `analytics`, `other` | | `tags` | at most 8, each `^[a-z0-9][a-z0-9-]{0,31}$` | | `icon` | path of an image listed in `assets` | | `screenshots` | at most 5 image paths listed in `assets` | | `releaseNotes` | at most 4000 characters | | `supportUrl` | https URL, at most 300 characters, no credentials | | `locales` | keys `en`, `de`, `es`, `ar`; each `{ title?, summary?, description? }` | `declarations`: | Field | Rules | |---|---| | `v` | `1` | | `licence` | one of `0BSD`, `AGPL-3.0-only`, `AGPL-3.0-or-later`, `Apache-2.0`, `BSD-2-Clause`, `BSD-3-Clause`, `BSL-1.0`, `CC-BY-4.0`, `CC-BY-SA-4.0`, `CC0-1.0`, `EPL-2.0`, `EUPL-1.2`, `GPL-2.0-only`, `GPL-2.0-or-later`, `GPL-3.0-only`, `GPL-3.0-or-later`, `ISC`, `LGPL-2.1-only`, `LGPL-2.1-or-later`, `LGPL-3.0-only`, `LGPL-3.0-or-later`, `MIT`, `MIT-0`, `MPL-2.0`, `OFL-1.1`, `Unlicense`, `Zlib`, or `LicenseRef-` (``: 1 to 64 letters, digits, `.` or `-`) | | `thirdParty` | at most 256 of `{ name, licence }`. `licence` follows the same rule | | `egress` | at most 64 of `{ host, port, purpose }`. `host` is a lower-case DNS name, no wildcard, no IP address | | `dataFlows` | at most 32 of `{ purpose, data[], personalData, destination, host? }`. `destination` is `installation`, `external` or `web-search`. An `external` flow names a `host` that is also listed in `egress` | | `aiUse` | `{ intendedPurpose (1 to 500), annexIII (boolean), humanOversight (1 to 120) }` | | `attestations` | `{ "ownsRights": true, "noProhibitedPractice": true }`. Both must be `true` | ### Pack id rules for the catalog A catalog pack id is `.`. `publisherId` matches `^[a-z0-9][a-z0-9-]{2,31}$`. These prefixes are reserved and cannot be used: anything starting with `aancer`, plus `platform`, `system`, `test`, `install`, `inst`, `pack`, `v1`, `template`, `solution`, `dashboard`, `export`, `conn`. ## Full examples ### A pack for the certified catalog ```json { "v": 2, "kind": "bundle", "id": "acme.invoice-triage", "version": "1.0.0", "title": "Invoice triage", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "listing": { "v": 1, "summary": "Sorts incoming invoices and drafts the booking proposal.", "description": "Plain text, up to 4000 characters.", "category": "finance", "tags": ["invoices", "accounts-payable"], "icon": "content/listing/icon.png", "releaseNotes": "First release.", "supportUrl": "https://support.example.com/invoice-triage", "locales": { "de": { "title": "Rechnungssortierung", "summary": "Sortiert eingehende Rechnungen und entwirft den Buchungsvorschlag." } } }, "declarations": { "v": 1, "licence": "LicenseRef-Acme-Commercial", "thirdParty": [{ "name": "amount-parser", "licence": "MIT" }], "dataFlows": [ { "purpose": "Read invoice documents to extract amounts", "data": ["invoice-documents"], "personalData": true, "destination": "installation" }, { "purpose": "Open the help page in the browser", "data": ["none"], "personalData": false, "destination": "external", "host": "support.example.com" } ], "egress": [{ "host": "support.example.com", "port": 443, "purpose": "Help page opened by the user" }], "aiUse": { "intendedPurpose": "Drafts a booking proposal a person approves", "annexIII": false, "humanOversight": "approval-step" }, "attestations": { "ownsRights": true, "noProhibitedPractice": true } }, "items": [ { "kind": "skill", "schemaVersion": 1, "id": "invoice-triage", "scope": "install", "spec": { "$ref": "content/skill.json" } }, { "kind": "link", "schemaVersion": 1, "id": "triage-help", "scope": "install", "spec": { "id": "triage-help", "label": "Invoice triage help", "url": "https://support.example.com/invoice-triage", "icon": "ExternalLink", "order": 90, "openIn": "new-tab" } } ] } ``` `content/listing/icon.png` must be in the folder you sign. The signer adds it to `assets`. ### A workspace pack with parameters ```json { "v": 2, "kind": "bundle", "id": "acme.sales-dashboard", "version": "1.2.0", "title": "Sales overview", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "parameters": [ { "id": "target_workspace", "type": "workspace", "label": "Workspace", "required": true } ], "items": [ { "kind": "dataset", "schemaVersion": 1, "id": "sales_orders", "scope": "workspace", "workspace": "{{param.target_workspace}}", "spec": { "$ref": "content/dataset.sales_orders.json" } }, { "kind": "dashboard", "schemaVersion": 1, "id": "sales-overview", "scope": "workspace", "workspace": "{{param.target_workspace}}", "spec": { "$ref": "content/dashboard.sales-overview.json" } } ] } ``` ## Signing ### The aancer-pack CLI The `aancer-pack` CLI is available to partners and builders on request: [contact us](https://aancer.ai/contact). It needs Node 20 or newer and has no other dependencies. | Command | What it does | |---|---| | `aancer-pack keygen --out acme.key` | makes an Ed25519 key pair (`acme.key`, `acme.pub`) and prints your key id `pub-<12 hex>`. Never overwrites a key | | `aancer-pack sign manifest.json content/ -o .ancpack --key acme.key` | builds the signing form, zips and signs | | `aancer-pack verify .ancpack --pubkey acme.pub [--publisher-pubkey acme.pub]` | checks the signature, prints OK. `--publisher-pubkey` also checks the publisher signature of a certified pack | | `aancer-pack inspect .ancpack` | shows id, version, items and content hash | | `aancer-pack mirror --from --to --pubkey platform.pub` | copies the certified catalog and its packs into a folder, verified, for a mirror inside your own network | | `aancer-pack lint manifest.json content/` or `aancer-pack lint .ancpack` | checks catalog readiness, prints one `: ` line per problem. Add `--json` for machine-readable output | Exit codes: `0` ok, `2` invalid input or usage, `3` signature or verification refused. `lint` also demands `publisher.name` (1 to the name limit) and a `publisher.keyId` in one of the forms `pub-<12 hex>`, `inst-<12 hex>` or `install`. Put the `pub-<12 hex>` id that `keygen` prints into `publisher.keyId`. Keep the `.key` file private. Share only the `.pub` file. ### What gets signed You do not need this if you use the CLI. It is here so you can check a pack by hand. 1. Start from `manifest.json`. 2. Replace every `{"$ref": "content/x.json"}` with `{"$ref": "content/x.json", "$hash": "sha256:"}`. 3. Add `assets` with the sha256 of every binary file under `content/`. 4. Remove any `sig` or `signature` field. 5. Serialise as canonical JSON: object keys sorted at every level, compact separators, arrays in order, no non-finite numbers. 6. Sign those bytes with Ed25519. Write the base64url signature to `MANIFEST.sig`, and the signing form to `MANIFEST.json`. ### Who may sign An installation accepts a pack when one of these keys verifies it: 1. the AANCER platform key; 2. the installation's own export key (`inst-<12 hex>`), for templates, agents and dashboards exported from that installation; 3. a partner key that an administrator added under **Platform Settings > Extensions > Trust keys**. The manifest's `publisher.keyId` must equal the key id the administrator entered. A pack signed by the installation's own key always verifies with that key and is not affected by catalog withdrawals. A pack whose signer is known but whose signature does not match is refused with `PACK_SIGNATURE_INVALID`. Connector packs are accepted only with the AANCER platform key. Partners submit connectors for certification and AANCER signs them. See [Connectors](/developers/connectors). ## Install and test To test a pack, import it into an EVAL or test installation. Import is installation-wide: it checks everything and installs nothing. Only activation changes the installation. A pack that contains workflow templates also passes the template permission check on activate and rollback. ### In the UI 1. **Platform Settings > Extensions > Trust keys > Add trust key**. Paste your public key. Use your `publisher.keyId` as the key id. 2. **Import pack**. The summary lists items, parameters and warnings. 3. **Activate**. Fill in the parameters. 4. Later: **Roll back** to an older version, or **Retire** to uninstall. Importing needs the `extensions.manage` permission. Activating a pack whose items are all workspace-scoped and target workspaces you manage also works with `extensions.manage_own`. ### With the REST API ```bash # 1. add the trust key (once per publisher) curl -X POST https://aancer.example.com/api/extensions/trust-keys \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"keyId":"pub-0123456789ab","label":"Acme Example Ltd","publicKeyPem":"-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"}' # 2. import (raw bytes as the body) curl -X POST https://aancer.example.com/api/extensions/packs/import \ -H "Authorization: Bearer $TOKEN" \ --data-binary @acme.sales-dashboard-1.2.0.ancpack # 3. activate with parameter values curl -X POST https://aancer.example.com/api/extensions/packs/acme.sales-dashboard/activate \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"version":"1.2.0","parameters":{"target_workspace":"ws-sales"}}' ``` | Call | What it does | |---|---| | `POST /api/extensions/packs/import` | raw `.ancpack` bytes, optionally `?activate=1`. Returns `201` (new) or `200` with a summary: items, parameters, warnings, `upgradeFrom`, and when relevant `certification`, `revocation`, `keptBehind` | | `POST /api/extensions/packs/{packId}/activate` | `{ "version": "...", "parameters": { "": "" } }`. A `null` value unbinds an optional parameter | | `POST /api/extensions/packs/{packId}/rollback` | `{ "version": "..." }` | | `POST /api/extensions/packs/{packId}/retire` | uninstall | | `GET /api/extensions/packs`, `GET /api/extensions/packs/{packId}` | list and detail | | `GET /api/extensions/objects` | installed objects, filter by `kind`, `workspaceId`, `state`, `packId` | | `GET /api/extensions/schemas` | supported kinds and schema versions | | `GET /api/extensions/trust-keys` | list trust keys | | `POST /api/extensions/trust-keys` | add a key, answers `201` | | `DELETE /api/extensions/trust-keys/{keyId}` | remove a key, answers `204` | ### The certified catalog in your installation Certified packs are listed in the installation's catalog. An administrator opens a listing and chooses **Get** to import it; a newer certified version shows **Update available**. The installation receives the catalog over its catalog channel. Installations without direct internet access upload the signed catalog file (`catalog-snapshot.json`) by hand, or point the channel at a mirror in their own network built with `aancer-pack mirror`. | Call | Permission | What it does | |---|---|---| | `GET /api/marketplace/certified/status` | `marketplace.view` | channel status and last refresh | | `PUT /api/marketplace/certified/settings` | `extensions.manage` | catalog channel settings | | `POST /api/marketplace/certified/refresh` | `extensions.manage` | fetch the catalog now | | `POST /api/marketplace/certified/snapshot` | `extensions.manage` | upload a catalog file (raw body, up to 8 MiB) | | `GET /api/marketplace/certified/items`, `/items/{packId}`, `/facets` | `marketplace.view` | browse listings, kinds and available updates | | `POST /api/marketplace/certified/items/{packId}/get` | `marketplace.import_pack` | import a listed pack | ### Withdrawn versions AANCER can withdraw a certified pack version, for example after a security finding, and names the version that fixes it. A withdrawn version is no longer imported (`PACK_REVOKED`). For a critical withdrawal the installation stops the installed version (a forced stop); otherwise the version is flagged for the administrator. Where the installation allows it, an administrator can record a decision to keep a withdrawn version running, with a reason, and end that decision later: | Call | Body | |---|---| | `POST /api/extensions/packs/{packId}/revocation-override` | `{ version, reason }` | | `DELETE /api/extensions/packs/{packId}/revocation-override` | `{ version }` | Both need `extensions.manage`. Activating a newer version ends the decision for older ones. ### Offline install An operator can drop `.ancpack` files into the installation's packs folder. Every file is imported at start. A pack is activated when every required parameter has a value in `packs.env`, written as `PACK___=value`. For example `PACK_acme_sales_dashboard__target_workspace=ws-sales`. Administrators can rescan the folder with **Scan server folder**. ### Versions A pack id plus version is permanent. Importing the same version again with the same content does nothing. Importing it with different content fails: bump the version. Activating a newer version replaces the older one. With equal `MAJOR.MINOR.PATCH`, a pre-release such as `1.2.0-rc1` is older than `1.2.0`. ## Common errors | Code | Status | Message | Fix | |---|---|---|---| | `PACK_UNSIGNED` | 422 | This pack is not signed (MANIFEST.sig is missing). | Sign it with `aancer-pack sign` | | `PACK_MALFORMED` | 400 | The pack could not be read. / MANIFEST.json is missing | Rebuild the ZIP with the CLI | | `PACK_SIGNATURE_INVALID` | 400 | This pack could not be verified, the signature is invalid. | A file changed after signing, a file under `content/` is not referenced or listed, or `publisher.keyId` names another key. Re-sign after every change | | `PACK_SIGNER_UNKNOWN` | 422 | This pack was signed by an unknown key (pub-...). Add the publisher's key under Extensions > Trust keys first. | The administrator adds your public key with the same key id | | `PACK_SIGNER_NOT_ALLOWED` | 403 | Connector packs must be signed by the platform key. | Submit connectors for certification | | `PACK_SCHEMA_INVALID` | 422 | The pack failed validation: `: ` | Fix the field at the path. Item errors use `/items//spec/...` | | `PACK_SCHEMA_INVALID` | 422 | `/parameters: parameter 'x' is referenced but not declared` | Declare it in `parameters` | | `PACK_SCHEMA_INVALID` | 422 | `/items/0/scope: agent-blueprint items are install-scoped` | Use `"scope": "install"` | | `PACK_SCHEMA_INVALID` | 422 | `/items/0/workspace: required for workspace scope` | Add `workspace` or use install scope | | `PACK_SCHEMA_INVALID` | 422 | `/version: must be strict semver` | Use `1.0.0`, not `1.0` or `v1.0.0` | | `PACK_SCHEMA_INVALID` | 422 | the unzipped content is larger than the limit | Keep the unzipped content under 32 MiB (128 MiB for a connector pack) | | `EXTENSION_KIND_UNKNOWN` | 422 | This platform does not know the extension kind '...'. | Use a kind from the table above | | `PACK_PLATFORM_INCOMPATIBLE` | 422 | This pack needs platform version ...; this installation runs ... | Lower `requires.platform`, or the installation upgrades | | `PACK_VERSION_CONFLICT` | 409 | Pack ... is already imported with different content. Bump the version. | Bump `version` | | `PACK_TOO_LARGE` | 413 | This file is larger than the ... MB limit for one pack on this installation. | Applies to the file size only: keep the file under 64 MiB | | `PACK_PARAMETER_MISSING` | 422 | Required parameters are missing: ... | Send them at activation, or set `"required": false` | | `PACK_PARAMETER_INVALID` | 422 | Parameter values are invalid: ... | Send existing ids as strings | | `EXTENSION_REFERENCED` | 409 | Other active extensions still reference objects in this pack: ... | Remove the dependants first | | `PACK_REVOKED` | 403 | This pack version was withdrawn by the platform (...). | Install the version named in the message | | `PACK_LICENCE_REQUIRED` | 403 | This connector pack needs an active licence. | Activate the licence, then import again | | `PACK_LICENCE_MISMATCH` | 403 | This connector pack was issued for a different licence. | Ask for a pack issued to this installation | | `PACK_CONTENT_FORBIDDEN` | 422 | The connector archive contains forbidden content: ... | Remove the named files | | `PACK_PIECE_NAME_TAKEN` | 409 | A connector named ... is already installed on this platform. | Use another package name | | `EXTENSION_NOT_FOUND` | 404 | ... not found. | Check the pack id or object id | | `PACK_NOT_REVOKED` | 409 | This pack version is not withdrawn with a forced stop, so there is nothing to keep running. | Only for versions stopped by a withdrawal | | `PACK_REVOCATION_OVERRIDE_FORBIDDEN` | 403 | This installation does not allow a withdrawn pack to keep running. | Install the fixed version | `aancer-pack lint` adds catalog checks, for example "a submission needs a listing block", "a submission must not carry a certification block" and "pack id must be '.'". ## Limits and editions - Pack file: 64 MiB by default. The operator can change it. - Unzipped content: 32 MiB per pack, 128 MiB for a pack with a connector. Each asset: 4 MiB; a connector archive (`application/x-tar`): 96 MiB. Items: 256 per pack. - Importing and activating packs is controlled by permissions (`extensions.manage`, `extensions.manage_own`). - Some item kinds need a licence feature: embedded apps, certified agents and licensed connectors. Each page says so. - Check your edition on [aancer.ai/pricing](https://aancer.ai/pricing). --- Source: https://aancer.ai/developers-templates --- title: Workflow templates | AANCER Developers description: Build reusable AANCER workflow templates: the record, typed parameters, bindings, workflow steps, validation rules and how to ship them in a pack. --- ## Workflow templates A workflow in AANCER is a graph of steps: a trigger, AI calls, knowledge lookups, agents, connector actions, human approvals, conditions, loops and more. A **workflow template** is a reusable, reviewed copy of a workflow. Everything that names a resource of one installation is taken out and turned into a typed **parameter**: connections, knowledge sets, agents, personas, datasets, approvers and trigger secrets. The person who deploys the template fills these in. Templates travel between installations as a pack item of kind `template`. Inside an installation you can also create templates from an existing workflow, review them and export them as a pack. ## Quick start A webhook that posts the request to a chat channel. The chat connection is a parameter. ```json { "kind": "template", "schemaVersion": 1, "id": "request-intake", "scope": "install", "spec": { "id": "tpl-acme-request-intake", "version": 1, "workspace": "{{param.target_workspace}}", "record": { "name": "Request intake", "description": "Takes a request and posts it to the team.", "icon": "🧩", "industry": "operations", "complexity": "starter", "locale": "en", "aiAct": { "riskClass": "unclassified", "annexIiiCategory": "none", "intendedPurpose": "", "humanOversight": "", "transparencyNote": "" }, "compliance": { "dataCategories": [], "dataSubjects": [], "lawfulBasis": "", "retentionDays": null }, "parameters": [ { "id": "conn_1", "type": "connection", "label": "Chat connection", "required": true, "connector": "connector-chat" } ], "bindings": [ { "parameterId": "conn_1", "stepId": "a", "path": "connectorAuth" } ], "translations": {}, "flow": { "name": "Request intake", "rootStepId": "t", "steps": [ { "id": "t", "type": "trigger", "name": "When called", "position": { "x": 0, "y": 0 }, "triggerType": "webhook", "nextStepId": "a" }, { "id": "a", "type": "connector", "name": "Post", "position": { "x": 0, "y": 120 }, "connectorPiece": "connector-chat", "connectorAction": "send", "connectorInputs": { "channel": "general" } } ] }, "builtAgainst": { "catalogHash": "", "platformVersion": "1.0.0" }, "createdAt": "2026-11-15T00:00:00.000Z" } } } ``` Put this item in a pack manifest and declare the workspace parameter: ```json "parameters": [ { "id": "target_workspace", "type": "workspace", "label": "Workspace", "required": false } ] ``` `connector-chat` is a placeholder. Use the connector name of a real connector in the target installation. ## File layout ```text acme-request-intake/ manifest.json # pack manifest, one template item content/ request-intake.json # the item spec: { id, version, workspace?, record } ``` A template is one pack item. Its `spec` is inline or in `content/.json`. If the administrator should choose the workspace, declare a `workspace` pack parameter (for example `target_workspace`, `required: false`) and set `spec.workspace` to `{{param.target_workspace}}`. If it stays unbound, the template is published for the whole installation. ## Field reference JSON Schema: [template.schema.json](https://aancer.ai/dev/schemas/template.schema.json) ### Item spec | Field | Type | Required | Rules | |---|---|---|---| | `id` | string | yes | 1 to 64 characters. The installation computes its own row id on import | | `version` | integer | yes | 1 or higher | | `workspace` | string | no | exactly `{{param.}}` of a `workspace` pack parameter. A literal workspace id is refused | | `record` | object | yes | the template record below | ### Template record | Field | Type | Required | Rules | |---|---|---|---| | `name` | string | yes | 1 to 80 characters | | `description` | string | yes | 1 to 300 characters | | `longDescription` | string | no | detail text | | `icon` | string | yes | 1 to 40 characters, usually an emoji | | `industry` | string | yes | `healthcare`, `legal`, `financial`, `hr`, `manufacturing`, `retail`, `saas`, `marketing`, `operations`, `devops` | | `industries` | string[] | no | extra tags | | `complexity` | string | yes | `starter`, `intermediate`, `advanced` | | `estimatedTimeSaved` | string | no | for example `"3h/week"` | | `locale` | string | yes | at most 20 characters, for example `en` | | `dataClassification` | string | no | free text | | `aiAct` | object | yes | `{ riskClass, annexIiiCategory, intendedPurpose, humanOversight, transparencyNote }`. `riskClass`: `unclassified`, `minimal`, `limited`, `high`, `prohibited` | | `compliance` | object | yes | `{ dataCategories: string[], dataSubjects: string[], lawfulBasis, retentionDays }`. `lawfulBasis`: `contract`, `consent`, `legitimate-interest`, `legal-obligation` or `""`. `retentionDays`: integer 0 to 36500, or `null` | | `parameters` | array | yes | at most 50. See Template parameters | | `bindings` | array | yes | which parameter fills which step field | | `translations` | object | yes | `{ "": { name?, description?, longDescription?, parameters?: { "": { label?, help? } } } }`. May be `{}` | | `flow` | object | yes | `{ name, description?, rootStepId, steps }`, 2 to 200 steps | | `builtAgainst` | object | no | `{ catalogHash, platformVersion }` | | `createdAt` | string | yes | ISO 8601 date and time, for example `2026-11-20T00:00:00.000Z` | Do not send `derived`. The installation computes it. ### Template parameters | Field | Type | Required | Rules | |---|---|---|---| | `id` | string | yes | `^[a-z][a-z0-9_]{0,39}$`, unique | | `type` | string | yes | `connection`, `knowledgeSet`, `agent`, `persona`, `dataset`, `approvers`, `secret`, `string`, `number`, `boolean`, `select` | | `label` | string | yes | not empty | | `help` | string | no | | | `required` | boolean | no | | | `default` | string, number or boolean | no | must match the type. Not allowed for `connection`, `knowledgeSet`, `agent`, `persona`, `dataset`, `approvers`, `secret` | | `options` | string[] | for `select` | at least one; a `select` default must be one of them | | `connector` | string | no | for `connection`: the connector it must belong to | These template parameters are separate from pack parameters. Pack parameters are bound when the pack is activated. Template parameters are filled each time someone deploys the template. ### Bindings A binding is `{ "parameterId": "...", "stepId": "...", "path": "..." }`. `path` is dot-separated. A parameter may fill only these fields: | Path | Parameter type | |---|---| | `connectorAuth` | `connection` | | `knowledgeSetId` | `knowledgeSet` | | `agentRef`, `agentId` | `agent` | | `personaId` | `persona` | | `datasetId` | `dataset` | | `approvers` | `approvers` | | `triggerAuthFields.` (trigger step only) | `secret` (a secret fills nothing else) | | `connectorInputs.` (not `connectorInputs.auth`), `triggerInputs.` | `string`, `number`, `boolean`, `select` | | `systemPrompt`, `userPromptTemplate`, `routingInstructions`, `agentGoal`, `routerQuestion`, `searchQuery`, `approvalMessage`, `approvalReasoning` | `string`, `select` | A code step is never a binding target. **No resource may stay in the steps.** Leave these fields out of every step and bind a parameter instead: `connectorAuth`, `knowledgeSetId`, `agentRef`, `agentId`, `personaId`, `datasetId`, `approvers`, `triggerAuthFields`, `webhookPath`, `agentApprovers`, `capturedOutput`. Text must not contain `{{connections[`. ### Workflow steps Every step has `id`, `type`, `name` and `position {x, y}`. Optional: `description`, `nextStepId` (the next step), `continueOnFailure`, `retryOnFailure`, `retryCount`, `retryDelayMs`, `fieldModes` (`{ "": "manual" | "auto" | "prompt" | "none" }`). Exactly one step has `type: "trigger"`, and `flow.rootStepId` points at it. There must be at least one other step. Refer to earlier output with `{{trigger.body.}}`, `{{}}` or `{{.}}`. | `type` | Fields (required in bold) | |---|---| | `trigger` | **`triggerType`**: `webhook`, `schedule`, `event`, `piece`. `schedule` (cron), `triggerTimezone` (IANA), `triggerAuthType` (`none`, `basic`, `header`, `hmac`), `triggerPiece`, `triggerName`, `triggerInputs`, `triggerPieceVersion` for a connector trigger | | `aancer-ai` | `modelTier` (`local-standard`, `local-advanced`, `cloud-reasoning`), `dataClassification` (`sovereign`, `internal`, `permitted`), `systemPrompt`, `userPromptTemplate`, `maxTokens` | | `rag` | as `aancer-ai`, plus a `knowledgeSetId` binding to a `knowledgeSet` parameter | | `agent` | **`agentGoal`**, `agentToolRefs`, `agentMaxSteps` (1 to 50, default 10), `agentMaxBudgetUsd` (default 1.00), `agentRequireApproval` (default true), `agentOutputFields` | | `connector` | **`connectorPiece`** (connector name), `connectorAction`, `connectorInputs` | | `approval` | `approvalMessage`, `approvalReasoning`, `approvalTimeout` (hours, default 24), `approvalOnReject` (`stop`, `continue`), plus an `approvers` binding | | `condition` | **`conditionExpression`**, **`branches [{id, label, nextStepId}]`** (at least one) | | `router` | **`routingInstructions`**, **`routerBranches [{id, label, nextStepId, isDefault}]`** with exactly one default | | `ai-router` | **`routerInput`**, **`routerQuestion`**, **`routerRoutes [{id, label, description}]`** (2 to 12, ids unique and not empty, not `otherwise`; every edge must be a declared route), `routerMode` (`single`, `multi`), `routerConfidenceFloor` (0 to 1) | | `loop` | **`loopExpression`**, `loopBodyStepId` | | `code` | `codeLanguage` (`javascript`, `python`), `codeSource`, `codeInputs {name: "{{ref}}"}` | | `guardrails` | `guardTarget`, `guardOnFail` (`block`, `annotate`) | | `file-search` | `searchQuery`, `searchMode` (`hybrid`, `vector`), `searchMaxHits` (1 to 20), plus a `knowledgeSetId` binding | | `publish` | `publishMode` (`append`, `upsert`, `replace`), `publishRows`, `whenFull` (`remove_oldest`, `fail`), plus a `datasetId` binding | | `output` | no required fields | A step with `dataClassification: "sovereign"` cannot use `modelTier: "cloud-reasoning"`. ### AI Act fields If the template has AI steps (`aancer-ai`, `rag`, `agent`, `router`, `ai-router`), set `aiAct.riskClass` to `minimal`, `limited` or `high` and fill `aiAct.intendedPurpose`. AANCER treats a template as high risk when `riskClass` is `high`, or when its industry, name or description (including translations) contains one of these terms: `hr` (as a word), `rrhh`, `talent`, `employ`, `hiring`, `recruit`, `candidate`, `screen`, `performance review`, `offboard`, `onboard`, `education`, `edu` (as a word), `proctor`, `grading`, `student`, `exam`. The match is a plain substring test, so words such as "screenshot", "employee" and "example" also count. A high-risk template with AI steps needs `aiAct.annexIiiCategory` (not `none`) and `aiAct.humanOversight`, and should contain an approval step. If the declared `riskClass` is lower than this rule derives, you get the warning `TPL_RISK_DECLARED_BELOW_DERIVED` and the template is treated as high risk. ### What the installation works out for you Do not send these. AANCER derives them from the steps: which steps run locally, in the cloud, call a connector or wait for approval; whether the template is fully sovereign, mixed or sends data to a connector; the connectors it needs; and the hosts named in connector inputs. ## Full examples ### Local AI summary, human approval, then post ```json { "kind": "template", "schemaVersion": 1, "id": "invoice-summary-approval", "scope": "install", "spec": { "id": "tpl-acme-invoice-summary", "version": 1, "workspace": "{{param.target_workspace}}", "record": { "name": "Invoice summary with approval", "description": "Summarises an incoming invoice with a local model, asks a person to approve, then posts the summary to a chat channel.", "icon": "🧾", "industry": "financial", "complexity": "intermediate", "locale": "en", "aiAct": { "riskClass": "limited", "annexIiiCategory": "none", "intendedPurpose": "Summarise supplier invoices for a person who approves them.", "humanOversight": "A person approves every summary in an approval step before it is posted.", "transparencyNote": "The summary is written by an AI model." }, "compliance": { "dataCategories": ["invoice data"], "dataSubjects": [], "lawfulBasis": "contract", "retentionDays": 90 }, "parameters": [ { "id": "approvers_1", "type": "approvers", "label": "Who approves the summary", "required": true }, { "id": "conn_1", "type": "connection", "label": "Chat connection", "required": true, "connector": "connector-chat" }, { "id": "channel", "type": "string", "label": "Channel to post to", "required": true, "default": "finance" } ], "bindings": [ { "parameterId": "approvers_1", "stepId": "approve", "path": "approvers" }, { "parameterId": "conn_1", "stepId": "post", "path": "connectorAuth" }, { "parameterId": "channel", "stepId": "post", "path": "connectorInputs.channel" } ], "translations": {}, "flow": { "name": "Invoice summary with approval", "rootStepId": "t", "steps": [ { "id": "t", "type": "trigger", "name": "Invoice received", "position": { "x": 0, "y": 0 }, "triggerType": "webhook", "nextStepId": "sum" }, { "id": "sum", "type": "aancer-ai", "name": "Summarise", "position": { "x": 0, "y": 120 }, "modelTier": "local-standard", "dataClassification": "internal", "systemPrompt": "You summarise supplier invoices: supplier, amount, due date, cost centre.", "userPromptTemplate": "{{trigger.body.text}}", "maxTokens": 600, "nextStepId": "approve" }, { "id": "approve", "type": "approval", "name": "Approve summary", "position": { "x": 0, "y": 240 }, "approvalMessage": "Approve this invoice summary?", "approvalReasoning": "{{sum}}", "approvalTimeout": 24, "nextStepId": "post" }, { "id": "post", "type": "connector", "name": "Post to channel", "position": { "x": 0, "y": 360 }, "connectorPiece": "connector-chat", "connectorAction": "send", "connectorInputs": { "text": "{{sum}}" } } ] }, "builtAgainst": { "catalogHash": "", "platformVersion": "1.0.0" }, "createdAt": "2026-11-20T00:00:00.000Z" } } } ``` ### Weekly scheduled answer from a knowledge set, with a German translation ```json { "kind": "template", "schemaVersion": 1, "id": "weekly-policy-digest", "scope": "install", "spec": { "id": "tpl-acme-weekly-policy-digest", "version": 1, "record": { "name": "Weekly policy digest", "description": "Every Monday, answers a fixed question from a knowledge set with a local model and keeps the answer in the run history.", "icon": "📚", "industry": "operations", "complexity": "starter", "locale": "en", "aiAct": { "riskClass": "minimal", "annexIiiCategory": "none", "intendedPurpose": "Summarise internal policy changes for staff.", "humanOversight": "", "transparencyNote": "" }, "compliance": { "dataCategories": [], "dataSubjects": [], "lawfulBasis": "", "retentionDays": null }, "parameters": [ { "id": "ks_1", "type": "knowledgeSet", "label": "Policy knowledge set", "required": true }, { "id": "question", "type": "string", "label": "Question to answer each week", "required": true, "default": "What changed in our policies this week?" } ], "bindings": [ { "parameterId": "ks_1", "stepId": "ask", "path": "knowledgeSetId" }, { "parameterId": "question", "stepId": "ask", "path": "userPromptTemplate" } ], "translations": { "de": { "name": "Wöchentlicher Richtlinien-Überblick", "description": "Beantwortet jeden Montag eine feste Frage aus einer Wissenssammlung.", "parameters": { "ks_1": { "label": "Wissenssammlung" }, "question": { "label": "Wöchentliche Frage" } } } }, "flow": { "name": "Weekly policy digest", "rootStepId": "t", "steps": [ { "id": "t", "type": "trigger", "name": "Every Monday 08:00", "position": { "x": 0, "y": 0 }, "triggerType": "schedule", "schedule": "0 8 * * 1", "triggerTimezone": "Europe/Berlin", "nextStepId": "ask" }, { "id": "ask", "type": "rag", "name": "Answer from policies", "position": { "x": 0, "y": 120 }, "modelTier": "local-standard", "dataClassification": "internal", "systemPrompt": "Answer only from the retrieved passages. Say when nothing changed.", "maxTokens": 800 } ] }, "builtAgainst": { "catalogHash": "", "platformVersion": "1.0.0" }, "createdAt": "2026-11-20T00:00:00.000Z" } } } ``` There is no `workspace` here, so activation publishes it for the whole installation. A translation needs a name, a description and every parameter label, otherwise you get the warning `TPL_TRANSLATION_INCOMPLETE`. ## Install and test ### As a pack 1. Put the item in a pack and sign it. See [Packs](/developers/packs). 2. Import it: **Platform Settings > Extensions > Import pack**, or `POST /api/extensions/packs/import`. Import runs every check on this page. A missing connector is not an import error. 3. Activate it: `POST /api/extensions/packs/{packId}/activate` with `{"version":"1.0.0","parameters":{"target_workspace":"ws-ops"}}`. **Activation is the approval.** The template is published as decided by the person who activates it. That person needs `templates.publish_own` in the bound workspace, or `templates.publish_install` when it is unbound. A template with a code step also needs `automations.use_custom_code`. 4. Deploy it: the template shows in the template gallery. The person deploying it fills in the template parameters. Deploying is refused until every connector it needs is installed. ### Inside an installation You can also build a workflow in the designer and turn it into a template. | Step | API | UI | |---|---|---| | Create a workflow from JSON | `POST /api/automations` with `{name, workspaceId, status: "draft", rootStepId, steps}` | Automations > Designer | | Create a template draft from it | `POST /api/automations/templates/authored {workspaceId, fromFlowId, name?, locale?}` | Automations > Templates > New | | Edit details | `PUT /api/automations/templates/authored/{id} {rev, record?, parameters?, bindings?, translations?, valueChoices?}` | template editor | | Validate | `POST /api/automations/templates/authored/{id}/validate` returns `{ok, errors[], warnings[]}` | | | Submit for review | `POST .../{id}/submit {rev, targetScope: "workspace" or "install", note?}` | | | Approve or reject | `POST .../{id}/approve {rev, note?, riskClassConfirmed?}`, `POST .../{id}/reject {rev, note}` | Automations > Template reviews | | Export as a pack | `POST .../{id}/export {}` returns a signed `.ancpack` | | Every write (`PUT`, `submit`, `approve`, `reject`) needs the integer `rev` you last read; a stale or missing `rev` returns `TEMPLATE_REV_CONFLICT`. `riskClassConfirmed: true` is needed on approve only when the template has AI steps. The `validate` call is the quickest way to check a template while you build it. Authors cannot approve their own templates when the target is the whole installation and the installation's second-approver setting is on. Each user can hold at most 100 unpublished drafts per workspace. An exported pack is signed with the installation's export key. To move it to a second installation, open **Platform Settings > Extensions > Trust keys** on the first one and choose **Show key for another installation**. On the second installation, add a trust key and paste it: the key id is filled in for you. ## Common errors Pack import errors appear as `PACK_SCHEMA_INVALID` details with the path `/items//spec/record/...` and the code in brackets. | Code | Message | Fix | |---|---|---| | `TPL_FLOW_NO_TRIGGER` | The workflow has no trigger yet. / The workflow has more than one trigger. Keep exactly one. | One `trigger` step, and `rootStepId` points at it | | `TPL_FLOW_EMPTY` | The workflow only has a trigger. Add at least one step. | Add a step | | `TPL_FLOW_SERIALIZE` | Connector step is missing connectorPiece. / Agent step is missing agentGoal. / First step must be a trigger. | Fix the step | | `TPL_FLOW_SERIALIZE` | Sovereignty conflict: classification=sovereign cannot route to cloud-reasoning tier. | Use a local tier or lower the classification | | `TPL_META_REQUIRED`, `TPL_META_LENGTH`, `TPL_META_ENUM` | Enter a name. / Keep a short description to 300 characters. / Choose an industry from the list. / The creation date is missing. | Use the values and limits above. Always send `createdAt` | | `TPL_PARAM_INVALID` | This kind of parameter cannot have a default. / A secret cannot have a default value. / The default value does not match the parameter type. | Remove the default or fix its type | | `TPL_BINDING_ORPHAN` | This value points to a parameter that no longer exists. | Match `parameterId` and `stepId` | | `TPL_BINDING_PATH_FORBIDDEN` | The parameter "..." cannot fill this field of step "...". | Follow the bindings table | | `TPL_RESIDUAL_BINDING` | This still points to something of your own installation. | Remove the resource field from the step and add a binding | | `TPL_SECRET_FOUND` | This looks like a credential. Remove it or make the field a parameter. | No keys or tokens in any text | | `TPL_AIACT_REQUIRED` | Choose a risk class: this template has AI steps. / State the intended purpose. | Fill `aiAct` | | `TPL_PROHIBITED` | A template for a prohibited practice cannot be shared. | | | `TPL_TOO_LARGE` | The template is larger than 1 MB. / at most 200 steps / at most 50 parameters | Split it | | `TPL_PACK_WORKSPACE` | must be a pack parameter, written as {{param.}} | Use a `workspace` pack parameter | | `TPL_PACK_WORKSPACE_UNKNOWN` | the workspace it is bound to (...) does not exist here or is archived. | Bind an existing workspace at activation | | `TPL_PACK_UNREADABLE` | its content could not be read. | Rebuild and re-sign the pack | | `TPL_PARAM_DUPLICATE` | Two parameters share the id "...". | Make parameter ids unique | | `TPL_FIELD_MODE` | a step field uses a field mode that is not allowed | Use one of the field modes the designer offers | | `TPL_GUARD_MODE` | a guardrail or file-search step uses a mode that is not allowed | Use one of the modes the designer offers | | `TEMPLATE_REV_CONFLICT` | the template changed since you read it | Read it again and send the new `rev` | Warnings do not block: `TPL_RISK_DECLARED_BELOW_DERIVED` (see the high-risk rule above), `TPL_CATALOG_DRIFT` (the connector catalog changed since the template was built: update it from its workflow), `TPL_PARAM_UNUSED`, `TPL_CODE_STEP_PRESENT` (whoever deploys it runs that code), `TPL_PII_FOUND` (an e-mail address, phone number or IBAN in the text), `TPL_NO_HUMAN_OVERSIGHT_STEP`, `TPL_TRANSLATION_INCOMPLETE`. ## Limits and editions - At most 200 steps, 50 parameters and 1 MB per template. - Connector names and their action inputs depend on the connectors installed in the target installation. AANCER offers 750+ connectors. - Templates are controlled by permissions: `templates.author_own`, `templates.publish_own`, `templates.publish_install`, `automations.use_custom_code`. - An agent can only use a workflow that starts from a webhook, a schedule or an event if the agent is certified. This needs the Certified Agents licence feature. See [Agents](/developers/agents). - Check your edition on [aancer.ai/pricing](https://aancer.ai/pricing). --- Source: https://aancer.ai/developers-agents --- title: Agents and agent blueprints | AANCER Developers description: Define AANCER agents through the REST API and ship them as agent blueprints in a pack. Fields, tool rules, publishing, certified agents and errors. --- ## Agents An agent in AANCER is a versioned, governed AI assistant that belongs to a workspace. It has instructions, a model tier, tools (connector actions, knowledge sets, workflows, other agents, web search and platform tools), conversation starters, an optional input form, optional structured output, run limits, a write-approval policy and an automated decision disclosure. You edit a **draft** and **publish** numbered versions. Each publish issues a signed passport that binds the version to a hash of its configuration. To move an agent between installations, or to offer it to customers, you use an **agent blueprint**: a pack item of kind `agent-blueprint`. A blueprint carries content only: instructions, starters, model tier, tool references and skills. Activating a blueprint creates no agent. A person creates an agent from it with one click, and that agent is an ordinary agent of the target installation. There are two formats on this page: | Format | Use it for | How you send it | |---|---|---| | Agent blueprint | shipping an agent design in a pack | pack item `agent-blueprint`, schema version 1 | | Agent configuration | creating or editing an agent in one installation | REST: `PUT /api/agents/{id}/draft` | ## Quick start A blueprint that sorts invoices. It uses a mail connector action and the platform's render tool. ```json { "v": 2, "kind": "bundle", "id": "acme.invoice-triage", "version": "1.0.0", "title": "Invoice triage agent", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "items": [ { "kind": "agent-blueprint", "schemaVersion": 1, "id": "invoice-triage", "scope": "install", "spec": { "name": "Invoice triage", "description": "Sorts incoming invoices and drafts the booking proposal.", "category": "finance", "icon": "receipt", "instructions": "You sort incoming invoices. For each one, name the supplier, the amount and the cost centre, and draft a booking proposal. Never book anything yourself.", "starters": ["Sort today's invoices"], "model": { "tier": "local-standard" }, "tools": [ { "kind": "connector", "ref": "mail.send_email" }, { "kind": "frame", "ref": "render" } ], "skills": [], "riskHint": null } } ] } ``` `mail.send_email` is a placeholder. Use `.` of a connector in the target installation. ## File layout ```text acme-invoice-desk/ manifest.json # pack manifest content/ invoice-clerk.json # agent-blueprint spec invoice-summary-approval.json # template spec the blueprint uses as a tool ``` A blueprint item must use `"scope": "install"`. ## Field reference JSON Schema: [agent.schema.json](https://aancer.ai/dev/schemas/agent.schema.json). The root is the blueprint spec. `$defs/agentConfig` is the REST agent configuration. ### Agent blueprint spec | Field | Type | Required | Rules | |---|---|---|---| | `name` | string | yes | 1 to 120 characters | | `description` | string | no | at most 2000 characters | | `category` | string | no | free text, at most 80 characters | | `icon` | string | no | at most 40 characters, an icon name such as `receipt` | | `instructions` | string | yes | 1 to 50,000 characters | | `starters` | string[] | no | at most 12, each 1 to 500 characters | | `model` | object | yes | exactly `{ "tier": "" }`. Tier: `local-standard`, `local-advanced`, `cloud-reasoning`. Never a fixed model route | | `tools` | array | no | at most 64 of `{ kind, ref }`, no duplicates. See Tool references | | `skills` | string[] | no | at most 32, each 1 to 120 characters | | `riskHint` | `"high"` or `null` | no | | No other fields are allowed. ### Tool references in a blueprint | `kind` | `ref` must be | |---|---| | `knowledge` | a pack parameter `{{param.}}`. Never a knowledge set id | | `workflow` | the item id of a `template` item in the same pack, or a pack parameter | | `agent` | the item id of another `agent-blueprint` item in the same pack, or a pack parameter | | `web` | a tool name such as `search`. The pack must declare a data flow with `destination: "web-search"` | | `connector` | a connector name, optionally with an action: `name` or `name.action`. Letters, digits, `_ . @ / -` | | `dataset`, `frame` | the platform tool's action name, for example `append` or `render` | | `fn` | the item id of a `function` item in the same pack | `code` and `mcp` tools cannot be part of a blueprint. Pack parameters have no knowledge type. Declare a knowledge parameter as `"type": "string"` and let the administrator enter the knowledge set id. ### What happens on "Create agent" When a person creates an agent from a blueprint, the new draft takes the blueprint's instructions, starters, model tier, tools and skills. Everything else uses the defaults: limits of 12 steps, 20 tool calls, 1 USD and 300 seconds, write confirmation `always`, no automated decisions. Tool references are resolved in the person's workspace: - a `workflow` item becomes the newest workflow deployed there from that pack template; - an `agent` item becomes the newest agent created there from that blueprint; - a parameter becomes its bound value. A reference that cannot be filled is left out and listed in `skipped[]` with the reason `parameter_not_set`, `workflow_not_deployed` or `agent_not_created`. Deploy the template first, then create the agent. ### Agent configuration (REST) Send it with `PUT /api/agents/{id}/draft` as `{ "config": { ... } }`, at most 200,000 bytes. Saving a draft refuses malformed values. Publishing also refuses missing values and tools that are not available. | Field | Type | Required | Rules | Default | |---|---|---|---|---| | `instructions` | string | yes | not empty at publish, at most 50,000 characters | `""` | | `model` | object | yes | exactly one of `{tier}` or `{route}`. `route` is a fixed model route of the installation | `{tier: "local-advanced"}` | | `temperature` | number | no | 0 to 2 | | | `tools` | array | yes | may be empty, no duplicates. See below | `[]` | | `input` | object | yes | `{kind: "prompt"}` or `{kind: "form", fields: [...]}` with 1 to 40 fields | `{kind: "prompt"}` | | `starters` | string[] | yes | at most 12, each 1 to 500 characters | `[]` | | `output` | object | no | `{fields: [...]}`, 1 to 50 fields | | | `limits` | object | yes | `maxSteps` (at most 200), `maxToolCalls` (at most 500), `maxUsd` (at most 1000), `maxWallMs` (at most 86,400,000). All above 0; all except `maxUsd` are whole numbers | `12, 20, 1, 300000` | | `approval.confirmWrites` | string | yes | `always` or `workspace_default` | `always` | | `art22.automatedDecisionMaking` | string | yes | `none`, `assistive`, `decisive` | `none` | | `art22.humanOversightRequired` | boolean | yes | must be `true` when `decisive` | `true` | | `personaId` | string or null | no | a persona id of the installation | | | `memory.perUser` | boolean | no | opt-in memory per user | | | `skills` | string[] | no | skill ids visible in the workspace, no duplicates, always loaded for this agent | | Rule: when `automatedDecisionMaking` is not `none`, or `humanOversightRequired` is `true`, `confirmWrites` must be `always`. Tool entries are `{ kind, id, fields?, connection? }`: - `kind`: `connector`, `knowledge`, `workflow`, `mcp`, `agent`, `code`, `web`, `frame`, `dataset`, `fn`. - `id`: for `connector`, `` or `.`; for `knowledge`, a knowledge set id; for `workflow`, a workflow id; for `agent`, an agent id; for platform tools, the action name. `"*"` (every tool of that kind) is allowed only for `connector`, `knowledge`, `workflow` and `mcp`, and only as the whole id: `slack.*` or `*` for any other kind is refused. - `fields`: `{ "": { "mode": "fixed" | "preselected", "value": ... } }`. A `fixed` field needs a value. - `connection`: `{ "mode": "user" }` or `{ "mode": "preselected", "id": "" }`. Form fields: `{ id, type, label, required?, help?, options?, accept?, maxFiles? }`. `id` matches `^[a-z][a-z0-9_]{0,63}$`. `type` is `text`, `multiline`, `number`, `checkbox`, `date`, `email`, `select`, `multiselect` or `file`. `select` and `multiselect` need `options [{value, label}]`. `file` takes `accept` (media types) and `maxFiles` (1 to 10). Output fields: `{ id, type, description?, values?, required? }`. `type` is `text`, `number`, `boolean`, `enum` or `json`. An `enum` needs `values`. With `output` set, the agent ends each run by returning these fields. ## Full examples ### A blueprint that uses a pack template, a knowledge parameter and web search ```json { "v": 2, "kind": "bundle", "id": "acme.invoice-desk", "version": "1.0.0", "title": "Invoice desk", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "parameters": [ { "id": "target_workspace", "type": "workspace", "label": "Workspace", "required": false }, { "id": "policies", "type": "string", "label": "Knowledge set with the booking rules", "required": false } ], "declarations": { "v": 1, "licence": "Apache-2.0", "dataFlows": [ { "purpose": "Read invoices the person shares in the conversation", "data": ["invoice documents"], "personalData": true, "destination": "installation" }, { "purpose": "Look up a supplier on the web when asked", "data": ["supplier names"], "personalData": false, "destination": "web-search" } ], "egress": [], "aiUse": { "intendedPurpose": "Drafts booking proposals that a person checks", "annexIII": false, "humanOversight": "A person confirms every write before it happens" }, "attestations": { "ownsRights": true, "noProhibitedPractice": true } }, "items": [ { "kind": "agent-blueprint", "schemaVersion": 1, "id": "invoice-clerk", "scope": "install", "spec": { "$ref": "content/invoice-clerk.json" } }, { "kind": "template", "schemaVersion": 1, "id": "invoice-summary-approval", "scope": "install", "spec": { "$ref": "content/invoice-summary-approval.json" } } ] } ``` `content/invoice-clerk.json`: ```json { "name": "Invoice clerk", "description": "Reads invoices, names supplier, amount and cost centre, and drafts the booking proposal.", "category": "finance", "icon": "receipt", "instructions": "You help the accounts team. For each invoice, name the supplier, the amount and the cost centre, check them against the booking rules, and draft a booking proposal. Never book anything yourself.", "starters": ["Check this invoice", "Draft the booking proposal"], "model": { "tier": "local-advanced" }, "tools": [ { "kind": "knowledge", "ref": "{{param.policies}}" }, { "kind": "workflow", "ref": "invoice-summary-approval" }, { "kind": "web", "ref": "search" }, { "kind": "frame", "ref": "render" } ], "skills": [], "riskHint": null } ``` `content/invoice-summary-approval.json` is the template spec from [Templates](/developers/templates). Without the template item in the same pack, import fails. That template starts from a webhook, so the agent can only run it as a certified agent. ### An agent configuration with a form and structured output ```json { "instructions": "You triage incoming support requests. Classify each request, look up the answer in the product handbook, and draft a reply. Ask before sending anything.", "model": { "tier": "local-advanced" }, "temperature": 0.2, "tools": [ { "kind": "knowledge", "id": "ks_handbook" }, { "kind": "connector", "id": "mail.send_email", "connection": { "mode": "user" } } ], "input": { "kind": "form", "fields": [ { "id": "customer", "type": "text", "label": "Customer name", "required": true }, { "id": "priority", "type": "select", "label": "Priority", "options": [ { "value": "low", "label": "Low" }, { "value": "high", "label": "High" } ] }, { "id": "attachment", "type": "file", "label": "Ticket export", "accept": ["application/pdf"], "maxFiles": 2 } ] }, "starters": ["Triage this request"], "output": { "fields": [ { "id": "category", "type": "enum", "values": ["billing", "bug", "how_to"], "required": true }, { "id": "draft_reply", "type": "text", "required": true } ] }, "limits": { "maxSteps": 12, "maxToolCalls": 20, "maxUsd": 1, "maxWallMs": 300000 }, "approval": { "confirmWrites": "always" }, "art22": { "automatedDecisionMaking": "assistive", "humanOversightRequired": true }, "memory": { "perUser": false }, "skills": [] } ``` `ks_handbook` and `mail.send_email` are placeholders. Tool ids must exist and be enabled in the agent's workspace. ## Install and test ### Blueprint in a pack 1. Sign and import the pack. See [Packs](/developers/packs). Import checks the spec, the same-pack references and the web-search declaration. 2. Activate the pack. If it contains templates, deploy them in the workspace. 3. In **Agents**, choose **Create agent** from the blueprint, or call `POST /api/agents` with `{"workspaceId":"ws-ops","name":"Invoice clerk","blueprintId":"pack:acme.invoice-desk:invoice-clerk"}`. Check `blueprint.skipped[]` in the response. 4. Open the draft, test it, and publish it. ### Agent through the REST API ```bash # create curl -X POST https://aancer.example.com/api/agents \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d '{"workspaceId":"ws-support","name":"Support triage","description":"Classifies requests and drafts replies"}' # save the draft configuration curl -X PUT https://aancer.example.com/api/agents/$AGENT_ID/draft \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \ -d @agent-config.json # {"config": {...}} # preview, then publish curl https://aancer.example.com/api/agents/$AGENT_ID/publish-preview -H "Authorization: Bearer $TOKEN" curl -X POST https://aancer.example.com/api/agents/$AGENT_ID/publish \ -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"changeNote":"First version"}' ``` | Call | Permission | Notes | |---|---|---| | `POST /api/agents {workspaceId, name, description?, icon?, blueprintId?}` | `agents.create_own` | `blueprintId` is `pack::` | | `PUT /api/agents/{id}/draft {config, ifUpdatedAt?}` | `agents.edit_own` | saves the configuration | | `PATCH /api/agents/{id}` | `agents.edit_own` | name, description, icon, up to 3 labels | | `GET /api/agents/{id}/publish-preview` | `agents.publish_own` | shows what publishing would certify | | `POST /api/agents/{id}/publish {changeNote?, modelEgress?}` | `agents.publish_own` | returns `{version, passportId, configHash, warnings}`. `modelEgress` is `{scope: "in-perimeter"}` or `{scope: "listed", destinations: [...]}` | | `GET /api/agents/{id}/versions`, `GET /api/agents/{id}/diff?from=&to=` | `agents.edit_own` | versions and differences | | `POST /api/agents/{id}/versions/{n}/restore {changeNote?, modelEgress?}` | `agents.publish_own` | publishes an older version again | | `POST /api/agents/{id}/export-for-submission` | `agents.publish_own` and edit access | see below | ### Export an agent as a blueprint pack `POST /api/agents/{id}/export-for-submission` with `{"packId":"acme.support-triage","licence":"Apache-2.0","ownsRights":true,"noProhibitedPractice":true}` returns a signed one-item blueprint pack, made from the published version. Add `"preview": true` to see the content first. Knowledge, workflow and agent tools become pack parameters. Connections, fixed field values, skills, the form, output, limits, memory and persona are not exported. A tool wildcard, a fixed model route, a code, MCP or `fn` tool, a missing description, empty instructions, or anything that looks like a credential stops the export with `AGENT_EXPORT_REFUSED` and a `reason`. ### Certified agents Publishing always issues a passport. In addition, an installation can require certification: then a run may only use the tools, model tier ceiling and budgets that the certificate covers. A knowledge set or workflow added after certification shows "Not certified" until you certify again. Workflows that start from a **webhook, schedule or event** run only for certified agents: "Only certified agents can run workflows that start from a web call, a schedule or an event." Workflows with a Manual or Form start work for every agent. Certificates are issued by the installation. You cannot write or edit one. ## Common errors Blueprint import errors appear as `PACK_SCHEMA_INVALID` details with the path `/items//spec/...`. | Code | Message | Fix | |---|---|---| | `AGENT_BLUEPRINT_MODEL` | must be a model tier, written as { "tier": "" }. A blueprint never names a model route | Use `{"tier": "local-advanced"}` | | `AGENT_BLUEPRINT_TOOL_KIND` | a blueprint cannot carry a tool of kind "code" | Remove `code` and `mcp` tools | | `AGENT_BLUEPRINT_TOOL_DUPLICATE` | this tool is listed twice | Remove the duplicate | | `AGENT_BLUEPRINT_REF` | must be a pack parameter, written as {{param.}} | Knowledge tools always use a parameter | | `AGENT_BLUEPRINT_REF` | names the template "...", which is not an item of this pack | Add the template item, or use a parameter | | `AGENT_BLUEPRINT_WEB_UNDECLARED` | web search needs a declared data flow with the destination "web-search" | Add the data flow to `declarations` | | (shape) | must NOT have additional properties / must NOT have more than 12 items | Fix shape errors first; the other checks run after them | | `AGENT_BLUEPRINT_NOT_AVAILABLE` | This blueprint is no longer available: its pack was retired or withdrawn. | Activate the pack again | | `AGENT_BLUEPRINT_INVALID` (422) | blueprintId must name a blueprint of an installed pack. | Use `pack::` of an active pack | | `AGENT_EXPORT_REFUSED` (422, 403, 503) | The agent cannot be exported: ... | Fix what `reason` names; 403 means you need edit access to the agent | | `COMPLIANCE_RULE_FAILED` (422) | Compliance rule failed: ... | Change the configuration so the installation's compliance rule passes | | `AGENT_DRAFT_INVALID` | Duplicate skill. / ... must be a whole number. / Draft exceeds 200000 bytes | Fix the configuration | | `AGENT_DRAFT_INVALID` | Instructions are required. / Choose exactly one of a model tier or a route. | Fix the configuration | | `AGENT_DRAFT_INVALID` | A wildcard is only allowed for all connectors, knowledge, workflows or MCP tools. | Name the tool | | `AGENT_DRAFT_INVALID` | This agent makes automated decisions or requires human oversight, so writes must be confirmed by a person. Set write confirmation to always. | `"confirmWrites": "always"` | | `AGENT_DRAFT_INVALID` | Decisive automated decisions require human oversight. | `"humanOversightRequired": true` | | `AGENT_TOOL_UNAVAILABLE` | This tool is not available to you in this workspace. | Enable the connector or knowledge set in that workspace | | `AGENT_VERSION_CONFLICT` | (409) | Reload and retry with the new `ifUpdatedAt` | | `CLOUD_TIER_NOT_ALLOWED` | | The workspace policy refuses `cloud-reasoning`; use a local tier | ## Limits and editions - Up to 64 tools and 12 starters per blueprint. Up to 50,000 characters of instructions. - Certified agents need the Certified Agents licence feature. Without it, agents still publish with a passport, but they cannot use webhook, schedule or event workflows as tools. - The `cloud-reasoning` tier can be switched off by workspace policy. - Check your edition on [aancer.ai/pricing](https://aancer.ai/pricing). --- Source: https://aancer.ai/developers-skills --- title: Skills | AANCER Developers description: Write AANCER skills: reusable instructions that shape how chat and agents work. SKILL.md format, the skill pack item, enable and mandate rules. --- ## Skills A skill is a named block of instructions, with optional reference files and preferred connectors, that changes how the AI works in chat and in agents. For example, a "Vendor review" skill lays down the method, scoring and output format for a supplier review. Skills live in the skills library of a workspace. In chat, the model sees an index of enabled skills (name and description) and loads the one it needs. An administrator can also **mandate** a skill in a workspace, so its instructions apply to every chat there. Agents can attach skills that always load for that agent. Skills come from three places: users (a form or a SKILL.md upload), skill ZIP files, and signed packs. Skills from a pack arrive switched off in every workspace until an administrator enables or mandates them. ## Quick start Write a `SKILL.md` file and upload it under **Library > Skills**. ```markdown --- name: Vendor review description: Structured review of a new supplier: risk, contract terms, data protection. connectors: [google-drive] --- # Vendor review 1. Identify the vendor and the service. 2. Score financial, operational and data-protection risk (low, medium, high) with one reason each. 3. List contract terms to negotiate. 4. End with a recommendation: proceed, proceed with conditions, or stop. ``` To ship the same skill in a pack, use this item: ```json { "kind": "skill", "schemaVersion": 1, "id": "vendor-review", "scope": "install", "spec": { "id": "vendor-review", "name": "Vendor review", "description": "Structured review of a new supplier: risk, contract terms, data protection.", "instructions": "# Vendor review\n\n1. Identify the vendor and the service.\n2. Score financial, operational and data-protection risk (low, medium, high) with one reason each.\n3. List contract terms to negotiate.\n4. End with a recommendation: proceed, proceed with conditions, or stop.", "connectors": ["google-drive"], "triggers": ["vendor review", "new supplier"] } } ``` ## File layout ### SKILL.md ```text --- name: description: connectors: [, ] # optional, inline list or "- item" list, at most 20 --- ``` - The file starts with a `---` front matter block. - `name` and `description` are single lines. Multi-line values (`|` or `>`) are refused. - Values may be in double or single quotes. - Other keys in the front matter are ignored on upload. ### Skill ZIP `SKILL.md` at the root, or inside one top-level folder, plus reference files next to it. ```text vendor-review.zip vendor-review/ SKILL.md scorecard-template.xlsx checklist.md ``` Allowed file types: `md`, `txt`, `csv`, `json`, `pdf`, `png`, `jpg`, `jpeg`, `docx`, `xlsx`. Every file is scanned for malware. ### Skill pack ```text acme-business-skills/ manifest.json content/ vendor-review.json # skill spec contract-check.json # another skill spec ``` Pack skills cannot carry reference files. Put everything the model needs into `instructions`. ## Field reference JSON Schema: [skill.schema.json](https://aancer.ai/dev/schemas/skill.schema.json) ### Skill spec (pack item) | Field | Type | Required | Rules | |---|---|---|---| | `id` | string | yes | `^[a-z0-9][a-z0-9._-]{0,63}$`. Use the same value as the item id | | `name` | string | yes | 1 to 120 characters, not blank | | `description` | string | yes | 1 to 1000 characters, not blank. The model reads it to decide when to load the skill | | `instructions` | string | yes | 1 to 20,000 characters, Markdown | | `connectors` | string[] | no | at most 20 connector names, each `^[a-z0-9@][a-z0-9@/._-]{0,99}$` | | `triggers` | string[] | no | at most 10 phrases, each 1 to 80 characters | | `workspace` | string | no | a workspace id or `{{param.}}` | No other fields are allowed. At install, `triggers` are added to the description as ` Use when: a; b; c.` Keep `description` plus the `Use when:` text under 1000 characters in total, or that skill will not install. `connectors` are a hint. They tell the model which connectors suit the skill. They grant no access. ### JSON body for the REST API `POST /api/skills?workspaceId=` with `{ name, description, instructions, connectors?, scope? }`. `scope` is `private` (default) or `workspace`. ## Full examples ### A complete SKILL.md ```markdown --- name: Vendor review description: Runs a structured due-diligence review of a supplier or software vendor, tiered by how critical it is, with a weighted scorecard across security, privacy, financial health, contract, service and exit risk. --- # Vendor review ## Purpose Help a buyer decide whether a vendor is fit to rely on, and on what terms, with effort proportional to the risk. ## Inputs to ask for 1. The vendor, the product or service, and what it will be used for. 2. Spend per year, contract length and how many users or processes depend on it. ## Method 1. **Tier the vendor** (tier 1 critical, tier 2 important, tier 3 low). 2. **Review each area** and score it 1 to 5 with the evidence. 3. **Weight the areas** by tier and compute the weighted score out of 5. 4. **Recommend** approve, approve with conditions, or reject. ## Output format 1. **Recommendation** with tier and weighted score. 2. **Scorecard:** Area, Weight, Score, Evidence, Gaps. ## Limits The review relies on what the vendor and the user provide; it does not verify claims independently. ``` ### The same skill as a pack `manifest.json`: ```json { "v": 2, "kind": "bundle", "id": "acme.business-skills", "version": "1.0.0", "title": "Acme business skills", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "items": [ { "kind": "skill", "schemaVersion": 1, "id": "vendor-review", "scope": "install", "spec": { "$ref": "content/vendor-review.json" } } ] } ``` `content/vendor-review.json`: ```json { "id": "vendor-review", "name": "Vendor review", "description": "Runs a structured due-diligence review of a supplier or software vendor, tiered by how critical it is, with a weighted scorecard across security, privacy, financial health, contract, service and exit risk.", "instructions": "# Vendor review\n\n## Purpose\nHelp a buyer decide whether a vendor is fit to rely on, and on what terms, with effort proportional to the risk.\n\n## Method\n1. **Tier the vendor**.\n2. **Review each area** and score it 1 to 5 with the evidence.\n3. **Recommend** approve, approve with conditions, or reject.\n\n## Output format\n1. **Recommendation** with tier and weighted score.\n2. **Scorecard:** Area, Weight, Score, Evidence, Gaps.", "triggers": ["vendor review", "supplier due diligence", "should we use this vendor", "third-party risk", "vendor scorecard", "compare these suppliers"] } ``` ## Install and test ### User skills | Action | API | Permission | |---|---|---| | Create from JSON | `POST /api/skills?workspaceId=` with the JSON body, returns 201 | `skills.manage_own` | | Upload SKILL.md or ZIP | `POST /api/skills?workspaceId=` as multipart: one file, optional field `scope=workspace`, at most 20 MB | `skills.manage_own` | | List | `GET /api/skills?workspaceId=` returns items with `enabled`, `mandated`, `locked`. Admins add `&all=1` to see pack skills that are off | `chat.use` | | Edit, delete | `PUT /api/skills/{id}`, `DELETE /api/skills/{id}` | `skills.manage_own` | | Export | `GET /api/skills/{id}/export.zip?workspaceId=` | `chat.use` | | Switch on or off for me | `PUT /api/me/skills/{id} {enabled, workspaceId}` | `chat.use` | UI: **Library > Skills**. ```bash curl -X POST "https://aancer.example.com/api/skills?workspaceId=ws-procurement" \ -H "Authorization: Bearer $TOKEN" \ -F "file=@SKILL.md" -F "scope=workspace" ``` ### Pack skills 1. Sign, import and activate the pack. See [Packs](/developers/packs). 2. Enable the skill per workspace: `PUT /api/skills/{id}/workspaces {"workspaces": ["ws-procurement"]}`. The installed skill id is `pack::`. 3. Or mandate it: `PUT /api/skills/{id}/mandate {"workspaces": ["ws-procurement"], "alsoInAgents": true}`. A mandated skill applies to every chat in that workspace, and to agents when `alsoInAgents` is true. Both need `skills.mandate` and admin rights in every changed workspace. Users cannot edit pack skills. A new pack version updates the content and keeps the enable and mandate choices. Retiring the pack removes the skill. ### Test it Open a chat in the workspace and ask something that matches the description or a trigger phrase. If the answer does not follow the skill, make the description say more clearly when the skill applies, or mandate the skill in a test workspace to check the instructions on their own. ## Common errors | Code | Message | Fix | |---|---|---| | `SKILL_INVALID` | the skill needs a name / the name is longer than 120 characters | | | `SKILL_INVALID` | the skill needs a description / the description is longer than 1000 characters | For pack skills, count the `Use when:` text too | | `SKILL_INVALID` | the skill has no instructions / the instructions are longer than 20000 characters | | | `SKILL_INVALID` | invalid connector name: "..." / at most 20 connectors | Lower-case connector names, for example `google-drive` | | `SKILL_INVALID` | SKILL.md must start with a front matter block between --- lines | | | `SKILL_INVALID` | multi-line name is not supported; keep it on one line | | | `SKILL_INVALID` | the ZIP has no SKILL.md at its root / file type not allowed / the ZIP is larger than 20 MB / the ZIP holds more than 200 files | | | `SKILL_INVALID` | the skill was refused by content screening | Remove text that tries to override system rules or hide instructions | | `SKILL_INVALID` | a workspace skill needs a workspace | Pass `workspaceId` | | `SKILL_INVALID` | only skills installed from a pack are enabled per workspace | Use mandate, or ship the skill in a pack | | `SKILL_NAME_TAKEN` | a skill named "..." already exists in this workspace | Names are unique per scope, ignoring case | | `SKILL_MANDATE_LIMIT` | workspace ... already has 8 mandated skills | Remove a mandate first | | `FORBIDDEN` | this skill is mandated in this workspace and cannot be switched off | | | Pack import | `/items//spec: must NOT have additional properties` | Only the six fields in the table. There is no `files` field | ## Limits and editions - Name 120 characters, description 1000, instructions 20,000. Up to 20 connectors and 10 triggers. - ZIP upload: at most 20 MB and 200 files. - The chat index shows up to 30 enabled skills. Up to 8 skills can be mandated per workspace. - Skills are controlled by permissions: `skills.manage_own`, `skills.mandate`, `chat.use`. - Check your edition on [aancer.ai/pricing](https://aancer.ai/pricing). --- Source: https://aancer.ai/developers-themes --- title: Themes and branding | AANCER Developers description: Brand AANCER with a theme pack: colour tokens, fonts, logos, login page and e-mail colours, plus locale overlays that rename UI words. --- ## Themes The look of AANCER is a set of design tokens such as `--bg`, `--ac` and `--t0`, defined for seven theme blocks: `light` (default), `dark`, `midnight`, `high-contrast`, `trust-authority`, `legal` and `terminal`. A **theme pack** is a signed pack with one `theme` item. It overrides those tokens and sets the platform name, tagline, fonts, logos, login page and e-mail colours. It is corporate identity as data: no code, no redeploy, nothing loaded from the internet. Fonts and logos ship inside the pack. A theme can apply to the whole installation (including the login page and invitation e-mails) or to one workspace (the app shell only). A `locale` item in the same pack can rename UI words to match your organisation's vocabulary. Without a pack, an administrator can set simple branding by hand under **Platform Settings > Branding**. ## Quick start A theme with tokens only, no files. Use schema version 2. ```json { "v": 2, "kind": "bundle", "id": "acme.ci", "version": "1.0.0", "title": "Acme corporate identity", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "items": [ { "kind": "theme", "schemaVersion": 2, "id": "acme-ci", "scope": "install", "spec": { "id": "acme-ci", "platformName": "Acme Cloud", "tagline": "Sovereign AI for Acme", "defaultTheme": "light", "typography": { "ui": "system-ui, sans-serif" }, "themes": { "light": { "--bg": "#FAFAF7", "--s1": "#FAFAF7", "--s2": "#FFFFFF", "--t0": "#1B2430", "--ac": "#0F6E74", "--aci": "#FFFFFF", "--pr": "#0B1F3A" }, "dark": { "--bg": "#0E1420", "--s1": "#0E1420", "--s2": "#151C2A", "--t0": "#E9EDF3", "--ac": "#5CC6C9", "--aci": "#0B1F22" } }, "login": { "backgroundColor": "#0B1F3A", "tagline": "Welcome to Acme Cloud", "legalFooter": "Acme Example Ltd" }, "email": { "headerBackground": "#0B1F3A", "buttonColor": "#0F6E74" } } } ] } ``` Keep the item `id` and `spec.id` equal. ## File layout ```text acme-ci/ manifest.json # one theme item, "spec": {"$ref": "content/theme.json"} content/ theme.json # the theme document fonts/.woff2 # woff2 only, at most 2 MiB each logos/.png # png, svg, jpg or ico, at most 2 MiB each ``` File names under `fonts/` and `logos/` use lower-case `[a-z0-9._-]` only. `aancer-pack sign` lists every file in `assets` with its hash. ## Field reference JSON Schema: [theme.schema.json](https://aancer.ai/dev/schemas/theme.schema.json). The root is the version 2 theme. `$defs/themeV1` is the simple branding form and `$defs/locale` is the locale overlay. ### Theme item | Field | Type | Required | Rules | |---|---|---|---| | `kind` | string | yes | `"theme"` | | `schemaVersion` | integer | yes | `2`. Version `1` is the simple six-field branding form | | `id` | string | yes | `^[a-z0-9][a-z0-9._-]{0,63}$`, equal to `spec.id` | | `scope` | string | no | `install` (default) or `workspace`. One active theme per installation and one per workspace | | `workspace` | string | if scope is `workspace` | a workspace id or `{{param.}}` | | `spec` | object | yes | the theme document, or `{"$ref": "content/theme.json"}` | ### Theme document (version 2) | Field | Type | Required | Rules | |---|---|---|---| | `id` | string | yes | `^[a-z0-9][a-z0-9._-]{0,63}$` | | `platformName` | string | yes | 1 to 64 characters. Replaces "AANCER" in the shell and on the login page | | `tagline` | string | no | at most 120 characters | | `defaultTheme` | string | no | the block a new user sees first: `light`, `dark`, `midnight`, `high-contrast`, `trust-authority`, `legal`, `terminal` | | `fonts` | array | no | at most 12 font files | | `fonts[].family` | string | yes | 1 to 64 characters, the name you use in `typography` | | `fonts[].src` | string | yes | `content/fonts/.woff2`, a real woff2 file | | `fonts[].weight` | string | no | for example `"400"` or `"400 700"`. Default `"400"` | | `fonts[].style` | string | no | `normal` or `italic` | | `fonts[].display` | string | no | `swap` (default), `block`, `fallback`, `optional`, `auto` | | `fonts[].unicodeRange` | string | no | at most 200 characters | | `typography` | object | no | CSS font stacks: `ui`, `mono`, `display`, `label`, each at most 200 characters | | `logos` | object | no | `light`, `dark`, `monochrome`, `favicon`, `emailHeader`. Each a path under `content/logos/` | | `themes` | object | yes | keys are theme block ids; `light` is required. Each block maps token to value | | `login` | object | no | `backgroundColor`, `backgroundImage` (path under `content/logos/`), `tagline` (120), `legalFooter` (500). Install scope only | | `email` | object | no | `headerBackground`, `bodyBackground`, `textColor`, `buttonColor`, each a colour. Install scope only | Every family in `typography` must be declared in `fonts` or be a generic family such as `system-ui`, `sans-serif`, `serif`, `monospace`, `ui-monospace`, `ui-sans-serif`, `-apple-system`, `'segoe ui'`, `roboto`, `'helvetica neue'`, `arial`, `menlo` or `consolas`. Colour values: `#rgb`, `#rrggbb`, `rgb(r,g,b)` or `rgba(r,g,b,a)` with `a` written as `0`, `1` or a decimal such as `0.3` or `.3`. No `var()`, `hsl()` or colour names. `--shadow-card` takes free CSS of at most 200 characters. The theme document must not contain `http:`, `https:`, `//`, `data:` or `url(` anywhere. This includes text fields such as the tagline and the legal footer. Ship files in `content/` instead. SVG logos must not contain `": "" } }`. | Field | Rules | |---|---| | `locale` | `en`, `de`, `es` or `ar` | | `keys` | 1 to 2000 entries. Each key must be an existing UI string key. Each value at most 500 characters | Values cannot contain `<` or `>` or the names of third-party products. Keys starting with `_meta` are not overridable. Placeholders such as `{{count}}` must match the original string. A locale overlay applies to the whole installation: use install scope, one overlay per locale. ## Full examples ### Theme with a font and logos, scoped to one workspace, plus a locale overlay for the installation `manifest.json`: ```json { "v": 2, "kind": "bundle", "id": "acme.workspace-ci", "version": "1.0.0", "title": "Acme workspace identity", "publisher": { "name": "Acme Example Ltd", "keyId": "pub-0123456789ab" }, "requires": { "platform": ">=1.0.0" }, "parameters": [ { "id": "target_workspace", "type": "workspace", "label": "Workspace", "required": true } ], "items": [ { "kind": "theme", "schemaVersion": 2, "id": "acme-ws-ci", "scope": "workspace", "workspace": "{{param.target_workspace}}", "spec": { "$ref": "content/theme.json" } }, { "kind": "locale", "schemaVersion": 1, "id": "de-words", "scope": "install", "spec": { "locale": "de", "keys": { "nav.knowledge": "Wissen" } } } ] } ``` `content/theme.json`: ```json { "id": "acme-ws-ci", "platformName": "Acme", "tagline": "Your data. Your AI.", "defaultTheme": "light", "fonts": [ { "family": "Acme Sans", "src": "content/fonts/acme-sans.woff2", "weight": "400 700", "style": "normal", "display": "swap" } ], "typography": { "ui": "'Acme Sans', system-ui, sans-serif", "display": "'Acme Sans', system-ui, sans-serif" }, "themes": { "light": { "--bg": "#ffffff", "--s0": "#f3f6f7", "--s1": "#ffffff", "--s2": "#ffffff", "--s3": "#f3f6f7", "--s4": "#e6ecee", "--t0": "#14232a", "--t1": "#3c4f57", "--t2": "#5b6c73", "--ac": "#0f6e74", "--aci": "#ffffff", "--acs": "#e3f2f2", "--acb": "rgba(15,110,116,0.30)", "--pr": "#14232a", "--prs": "#e9eef0", "--prb": "rgba(20,35,42,0.30)", "--b": "#d3dcdf", "--bm": "#b8c5ca", "--bs": "#8a9aa0", "--scrollbar": "#b8c5ca", "--anchor": "#14232a", "--anchor-raised": "#22343c", "--ink-on-anchor": "#ffffff", "--ink-on-anchor-dim": "#c3cfd3", "--shadow-card": "0 1px 3px rgba(20,35,42,0.08), 0 4px 14px rgba(20,35,42,0.06)" }, "dark": { "--bg": "#0f1a1f", "--s0": "#0a1317", "--s1": "#0f1a1f", "--s2": "#17252b", "--s3": "#1f2f36", "--s4": "#2a3c44", "--t0": "#eef3f4", "--t1": "#c3cfd3", "--t2": "#9fb0b6", "--ac": "#5cc6c9", "--aci": "#0a1317", "--acs": "#12343a", "--acb": "rgba(92,198,201,0.35)", "--pr": "#c3cfd3", "--prs": "#1f2f36", "--prb": "rgba(195,207,211,0.35)", "--b": "#2a3c44", "--bm": "#3a4f58", "--bs": "#4e646d", "--scrollbar": "#3a4f58", "--anchor": "#081014", "--anchor-raised": "#1f2f36", "--ink-on-anchor": "#eef3f4", "--ink-on-anchor-dim": "#9fb0b6", "--shadow-card": "0 1px 3px rgba(0,0,0,0.45), 0 4px 14px rgba(0,0,0,0.3)" } }, "logos": { "light": "content/logos/logo.png", "dark": "content/logos/logo-dark.png", "favicon": "content/logos/mark.png" } } ``` The folder also holds `content/fonts/acme-sans.woff2`, `content/logos/logo.png`, `content/logos/logo-dark.png` and `content/logos/mark.png`. `login` and `email` are left out because they apply to install-scoped themes only. ## Install and test ### In the UI 1. **Platform Settings > Extensions > Trust keys > Add trust key**, once per publisher. 2. **Import pack**. The summary lists items, fonts, logos and contrast warnings. 3. **Activate**. Pick the workspace if the theme is workspace-scoped. 4. Reload the browser. Under **Platform Settings > Look & feel**, an administrator can switch between stock and imported themes, and offer themes for users to choose. Retiring the pack returns to the stock look, or to the manual branding if one was set. ### With the REST API | Call | Permission | |---|---| | `POST /api/extensions/packs/import` (raw bytes) | `extensions.manage` | | `POST /api/extensions/packs/{packId}/activate {version, parameters}` | `extensions.manage` (`extensions.manage_own` for workspace-only packs) | | `GET /api/extensions/themes` | lists stock and imported themes | | `POST /api/extensions/themes/apply {packId or null, version?}` | switch the active theme | | `PUT /api/extensions/themes/{packId}/offer {offered: true}` | let users choose it | | `PUT /api/appearance/me {packId or null}` | a user picks an offered theme (`appearance.choose`) | | `GET /api/branding` | public, the active branding | | `GET`, `PUT /api/admin/branding` | manual branding without a pack (`platform.configure_branding`) | While an install-scoped theme pack is active, manual branding is read-only. Test in an EVAL or test installation first: import shows every contrast warning before anything changes. ## Common errors | Message | Fix | |---|---| | external or inline resources are not allowed (no http, //, data:, url() anywhere) (`THEME_EXTERNAL_ASSET`) | Ship files in `content/`. Remove URLs and `//` from every text, including tagline and footer | | `/themes/`: unknown theme id | Use one of the seven block ids | | `/themes//`: not a themable token | Use a token from the table. Fonts go in `typography` | | colour must be #rgb, #rrggbb or rgba(r,g,b,a) | No `var()`, `hsl()` or names | | `/typography/`: font family '...' is not declared in fonts[] and is not a generic family | Declare the font in `fonts` | | must be a pack file under content/fonts or content/logos | Fix the path. Lower-case file names only | | fonts must live under content/fonts/ / logos must live under content/logos/ | Move the file | | `` is not in the pack (`PACK_SIGNATURE_INVALID`) | Add the file and sign again | | `` is not a woff2 font (`THEME_ASSET_MIME`) | Convert the font to woff2 | | ``: contains `