## 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. Next part: https://aancer.ai/dev/parts/pages/07-install-and-test.md