aamp Docs — Architecture, RBAC, Deployment & Security
aamp Docs
Intro/What is aamp?

What is aamp?

aamp is a self-hosted control layer for LLM agents. It runs as a single Go binary against a local SQLite database, on infrastructure you operate.

The aamp console with Mission Control: token totals, top models and daily token consumption
ConsoleThe administration console. Every module (Chat, Apps, Inbox, Assistant, Agents, Scripts, Integrations, Tool Profiles, Guardrails, Knowledge, Data & ML, Ingress, Scheduler, Budget, Logs and Settings) is reachable from one navigation surface. See Platform elements.

The host retains authority

The architecture rests on one principle: the host keeps authority. Provider credentials, policy evaluation, tool attachment, audit logging and retrieval all execute host-side. The model chooses among tools the host has exposed — it does not define its own execution policy.

An agent gets capability. The host keeps the keys, the policy, and the record of what happened.

Five defining properties

Five properties distinguish the design. They are the shape of everything else in these docs.

Agent / Ingress separation

An Agent defines behaviour — model binding, system prompt, attached tools, knowledge, session state. An Ingress defines exposure — transport, authentication, network rules, firewalls. They are separate records with a foreign-key relationship, so the same Agent can be exposed through different transports under different policies, or exist with no external exposure at all.

Depth of governance

Role-based access scoped to individual resources, with groups mapped from your identity provider and additional OPA policies, LLM safety firewalls at two independent boundaries, and fourteen log domains covering every runtime path. This is the property that separates aamp from self-hosted automation platforms, which offer the deployment model without the control surface.

Selective isolation

Isolation is spent where the risk or dependency surface justifies it — browser control, document rendering, retrieval indexing and Python scripts run as isolated Firecracker workloads; host-native tool profiles handle everything else. The engineering judgement is where the boundary is drawn, not that one exists.

Layered policy enforcement

Five independent boundaries — host admin auth, transport ingress controls, LLM safety firewalls, isolated helper execution, and proxy-level network filtering — each enforced by host code, each independently logged.

Audit as a by-product

Fourteen log tables record agent turns, tool calls, model requests with token accounting, firewall verdicts, helper executions, job events, proxy traffic, remote commands, knowledge usage, script runs and authorization decisions. Traceability is a property of running the system, not a documentation exercise layered on top.

In short

One process, one database, on hardware you control. The model gets tools; the host keeps authority — and everything it does is recorded as it happens.

Intro/Architecture overview

Architecture overview

The entire control plane is one process. There is no message broker, no container orchestrator, no external cache, no separate vector database. State lives in SQLite and the filesystem.

Deployment shape

┌────────────────────────────────────────────────┐
│ Linux host (KVM required)                        │
│  ┌─────────────────────────────────────────────┐ │
│  │ aamp — single Go binary                      │ │
│  │   GUI (chi + templ + HTMX)      :3000        │ │
│  │   Ingress API (OpenAI-compatible)            │ │
│  │   Python scripting (isolated VMs)            │ │
│  │   Scheduler (cron)                           │ │
│  │   Egress proxy + DNS filter                  │ │
│  │   Secrets (AES-GCM, Argon2id)                │ │
│  └─────────────────────────────────────────────┘ │
│         │                       │                 │
│   ┌─────┴──────┐        ┌───────┴────────┐        │
│   │ SQLite     │        │ Isolated       │        │
│   │ 74 tables  │        │ helper         │        │
│   │ + FTS5     │        │ workloads (3)  │        │
│   └────────────┘        └────────────────┘        │
└────────────────────────────────────────────────┘
                 │
          ┌──────┴───────┐
          │ chatwidget   │  optional edge binary (DMZ)
          └──────────────┘

This is a deliberate trade. It rules out horizontal scaling of the control plane, and it makes single-node deployment, backup and audit trivial — the correct trade for the regulated on-premise environments the platform targets.

Control planes

Separation is structural, not conceptual. Each plane has its own tables, its own service package and its own permission set.

PlaneResponsibility
AgentBehaviour, model binding, prompts, session state, tool and knowledge attachment
TransportExternal exposure, authentication, IP rules, transport firewalls
ToolTool profiles, integrations and isolated runtimes, attachment contracts
PolicyFirewall evaluation, network filtering, RBAC, sandbox rules
OrchestrationSessions, Python scripts, Apps, the Scheduler, background jobs
AuditStructured logs across every runtime domain
The Python script editor in Scripting with syntax checking and the Run, Agents & Integrations, Settings and Versions tabs
OrchestrationScripting. A Python program with validated parameters runs in an isolated VM and calls Agents as bounded steps, so the model is one step rather than the pipeline itself.

The Agent / Ingress model

This is the central architectural decision. An Agent is a host-side configuration record — not a running process — carrying its own provider and model binding, system prompt, context-window and compaction settings, a tool-iteration limit, and firewall bindings. Tools and knowledge attach through explicit join tables, so an agent's surface is enumerable rather than inferred at runtime.

An Ingress binds an Agent to a transport. Two kinds exist: an api ingress exposes an OpenAI-compatible endpoint at POST /ingress/{slug}/v1/chat/completions with a bearer key, IP allowlist and firewall bindings; a webwidget ingress delivers a browser chat surface through a tunnel to the separate edge service.

Separating the two produces the properties regulated deployment needs: an Agent can exist with no external exposure; one Agent can be exposed through several ingresses under different policies; revoking exposure is deleting an ingress while agent history survives; and transport policy and behaviour policy are audited separately.

A WebWidget ingress with session limits, widget URLs and embed code
IngressTwo ingress kinds bind an Agent to a transport: an OpenAI-compatible API endpoint, and a public WebWidget tunnel — each with its own keys, network rules and firewalls.

Technology stack

LayerChoice
LanguageGo 1.27.1
HTTPnet/http + chi v5
Templatingtempl (compiled Go templates)
FrontendHTMX + Tailwind, server-rendered; CodeMirror for editors
DatabaseSQLite via modernc.org/sqlite — pure Go, no cgo
Data accesssqlc-generated from sql/queries.sql
SearchSQLite FTS5
Data planeDuckDB + DuckLake, local Parquet storage
ScriptingPython in Firecracker helper VMs
Proxy / DNSgoproxy · miekg/dns
Cryptogolang.org/x/crypto — AES-GCM, Argon2id
LLMOpenAI-compatible HTTP

The pure-Go SQLite driver is worth noting: the binary builds without cgo and carries no external database dependency at runtime.

Intro/Platform elements

Platform elements

Every module in the aamp console, in the order it appears in the navigation. Each entry says what the module is for, what it contains and who can reach it.

aamp Mission Control with token totals, top models and providers, and daily token consumption
ConsoleThe navigation on the left groups every module described below. Search across aamp (Ctrl/Cmd+K) jumps to any screen, resource, document name or setting field, and opens creation forms; it understands English and Polish and respects each user's grants. It is navigation search, not RAG. The overview covers the Mission Control summary of Agents, activity, usage and App schedules, including the Mission Control overview of Agents, activity, usage and App schedules.

Console map

The navigation has a short main group, three expandable groups and four standalone pages. What a user sees depends on their role assignments: platform administrators see everything, and other users see Chat, Apps, Inbox and the resources their roles cover. See Access & identity.

GroupModules
MainChat · Apps · Inbox · Assistant
BuildAgents · Scripts · Apps · Integrations · Tool Profiles · Guardrails
Data SourcesKnowledge · Data & ML (Ontologies are not in the navigation yet)
OperationsIngress · Scheduler · Budget · Logs
SettingsGeneral · Providers · Users · Secrets
AccountProfile · Log out

Apps appears twice on purpose. Under Main it is where everyone uses published dashboards; under Build it is where administrators create them.

Main

Chat

The authenticated host chat and the default start page. Users talk to the Agents they have access to in persisted, scoped sessions, with file attachments and a visible activity trail of tool calls. Context compaction keeps long sessions inside the model's context window. Microphone dictation is available when a speech-to-text model is configured.

Apps

The catalogue of published dashboards, open to every active signed-in user, including the user role. A dashboard opens at full width with no layout or editing controls. Each tile has its own form, Run and Run again, execution state, error and result. One failed tile does not block the others, and two users, or two instances of the same process, never share results. A window keeps the dashboard release it was opened with; the next visit loads the latest one. Administrators can jump to Edit in Build.

A published dashboard under Main → Apps with a running sales tile and a Sum two numbers form
AppsA dashboard opened by a user. Each tile has its own state: the sales tile is running and can be stopped, the next one waits for input.

Inbox

A per-user message box. Agents and scripts deliver results here through the Inbox Delivery tool profile, and budget alerts arrive here too. The navigation shows the unread count. Every user can reach their own inbox.

Assistant

A host-side administration assistant with its own identity, configuration and private conversations per administrator. It is not a hidden Agent and cannot be exposed through an ingress. It shares the Agent turn engine and the Chat presentation, so every tool call, change and result stays visible after a reload.

AreaWhat the Assistant can do
AgentsInspect and configure models, integrations, tool profiles, guardrails and attached data; run private test turns and check readiness
Scripts & AppsFind or create scripts, edit drafts with diff and undo, run an exact draft snapshot, read logs and results, then fix and rerun; carry processes and dashboards through to a tested release
Knowledge & dataCreate Links sources, import URLs, index and refresh, build Rolling knowledge bases and test retrieval
ResearchSearch documentation through pinned Brave Search and Jina Reader revisions
DiagnosticsRead-only view of system state, queues, usage, budgets, logs, Ingress and WebWidget

Changes to egress or bindings, publishing, scheduling, runs of published versions and draft runs that need network access are proposed as approval cards in the conversation and wait for the administrator's decision. Every mutation re-checks permissions and the resource version first. Turns can be stopped; closing the browser does not interrupt work. Ontology editing, Ingress changes, Inbox and user management are out of the Assistant's scope.

An Assistant conversation with an applied dashboard release, an approval and a summary of the script, process and dashboard it built
AssistantThe Assistant built and tested a script, wrapped it in a process and published a dashboard. The publish step waited for approval.

Build

Agents

An Agent is a host-side configuration record that defines behaviour. It is not a running process. Each Agent carries:

SettingWhat it controls
ModelLLM provider and model binding, reasoning effort where the model supports it, output-token cap, tool-iteration limit
PromptSystem prompt, context window and compaction: Priority (keeps constraints, compacts low-value tool context first), Summary or Naive, starting at a set share of the window (80% by default)
Internal toolsHost-side knowledge tools (knowledge_search, knowledge_read_document, read_chunk) and the optional Knowledge Reranker, which ranks files found across several searches and bases before the Agent reads them, using an OpenRouter reranking model or a TypeSafe Decision Model
ResourcesAttached integrations (Brave Search, Jina Reader, each pinned to a version), tool profiles, knowledge bases, datasets, Data Products and ontologies. Each is attached explicitly, so the Agent can only use what is listed.
SecurityInbound guardrails and outbound PII filters per surface: Internal Chat, WebWidget, API and Content Processing. Results from tool profiles and knowledge are scanned before they enter the model context, in Balanced mode (all content) or Fast mode (cached, sampled for long results)
ReleasesChanges are edited as a draft and published as a release; earlier releases stay unchanged

The agent flow canvas shows the resulting topology: which ingresses, guardrails, tools and data sources sit around the Agent.

Scripts

Non-interactive Python that runs in a fresh Firecracker VM with no network card attached. A script declares validated JSON input parameters and keeps versions, run history and console output. Runs are admitted as durable background jobs; stopping, timing out or finishing tears the VM down. Scripts can call Agents and use integrations such as Jina Reader, SSH and TypeSafe. To give a script a form, a result view or a schedule, wrap it in an App. Script access follows role assignments: resource_viewer can inspect a script and its runs, resource_editor can edit it, and resource_publisher can publish it.

The Python script editor in Scripting with syntax checking and the Run, Agents & Integrations, Settings and Versions tabs
ScriptsA Python script with the Agents and integrations it is allowed to call. The Assistant can write the draft, run it and fix errors from the logs.

Apps

Where administrators build what users later open under Main → Apps. New offers two types.

TypeDescription
ProcessWraps one published Script or Agent version in a typed input form and output blocks, with an output schema validated host-side. An Agent process gets task instructions and runs to completion without follow-up questions; a form can accept up to eight files of 20 MiB each. Result blocks include Text, Files (with PDF preview), Line and Bar charts, and Alerts. Each run has its own session and a timeout of 1–3600 seconds. Tabs: Widget, Runs, Settings, Versions.
DashboardComposes process widgets on a 12-column grid: drag, resize or set position by keyboard. Each tile has a title, pinned process release, start mode (manual or on_open) and default parameters. Tabs: Layout, Preview, Settings, Versions. On a phone the grid collapses to one column.

Versions chain explicitly: Dashboard release → Process release → Script release. A new script or process release never changes a published App on its own; the author picks it in the draft, sees it in the diff and publishes. Editing and Preview never execute code; running is always an explicit action. Restore publishes an earlier release as a new version.

Build → Apps with Agents, Scripts and Dashboards lists and an agent app open on the Steps tab
AppsAn agent app in goal-driven mode. Steps can be verified before the run continues; tabs cover Run, Params & Widget, Settings and Versions.

Integrations

Connections to external services whose credentials stay on the host.

IntegrationUsed by
Jina ReaderAgents, Python scripts, linked knowledge sources and the Assistant. Reads web pages as text.
Brave SearchAgents, Python scripts and the Assistant. Web search.
SSHPython scripts only. Remote commands with host-managed keys and audited connections.
TypeSafePython scripts only. Classification, yes/no questions and scoring; up to 64 HTTP calls per run, audited without bodies or credentials.

Tool Profiles

A tool profile is a configured tool with its own policies, credentials and instructions. It is created once and attached from Agent settings.

ToolDescription
HTTP ClientOutbound HTTP requests under host network policy, with URL rules and injected headers
Browser ControlA full Chromium browser in a Firecracker session, headed or headless. The only browser that supports saved website logins: the host fills them in, the Agent never sees them
Browser Control LightA lighter Obscura browser for public websites, with screenshots and PDF output and no login tools
Inbox DeliverySend results to a user’s Inbox
Isolated runtimeCatalogued Firecracker workloads, such as RAG indexers and the document renderer

Guardrails

Reusable safety policies, attached to an Agent per surface. A failed evaluation fails closed.

TypeHow it evaluates
InternalStructural scanner for suspicious input shape and obfuscation, then the Wolf Defender Small v2 prompt-injection classifier, running offline in a local sidecar. A structural hit blocks without calling the model.
Generic JudgeYour own natural-language policy, evaluated by any OpenAI-compatible model, with a custom refusal message
System 1 ClassifierTypeSafe classifier answering six independent risk questions; blocks at probability 0.70 or higher
Outbound PII FilterRuns after generation and before delivery. Replaces personal data with typed placeholders such as [REDACTED_EMAIL]. Internal engine (deterministic patterns plus a multilingual model) or LLM engine; responses are buffered, not streamed.

Data Sources

Knowledge

Knowledge bases for retrieval-augmented generation (RAG). Sources are uploaded files or linked pages read through Jina Reader. They are indexed by isolated RAG indexers and retrieved host-side when an Agent answers. A knowledge base keeps versions: Publish activates a frozen copy of the current source states, and sources can be shared between bases. Access is granted per base, read-only or read-write.

Data & ML

Versioned tabular data and the products built from it. Administrators only.

ElementDescription
DatasetCSV or XLSX (up to 100 MiB) uploaded, previewed and published as a version in DuckLake, stored as local Parquet. Column types are inferred from the full file and reviewed before publishing. Agents get bounded, read-only query access.
AppA published dashboard that users open under Main → Apps. Built by administrators from processes under Build → Apps.
AssistantThe host-side administration assistant. It configures and tests Agents, scripts, Apps and knowledge, and asks for approval before risky changes.
Association RecommenderA Data Product: deterministic basket analysis that recommends complementary products. Built from a dataset, versioned, and exposed to selected Agents as a typed recommendation tool.
Customer SegmentationData Product that groups customers by behaviour and commercial value. Coming soon.
ProcessA published Script or Agent version wrapped in a typed form and result view. The building block of dashboards.
Programmable Data ProductControlled transformations and isolated custom implementations. Coming soon.
The Data and ML catalogue with datasets and data products
Data & MLDatasets and Data Products in one catalogue. Deletion is blocked while a dataset is attached to an Agent or used by its published release.

Ontologies

Not in the navigation yet

Ontologies are being prepared for release and are hidden from the menu in the current version. The description below covers how the module works.

A model of business concepts (object types, their properties and the relations between them) described before any data is connected. Ontologies describe schema only; they do not store records. Publish creates an immutable version. An Agent that has an ontology pinned gets four read-only tools: ontology_list, ontology_search, ontology_get_type and ontology_explore. Administrators only.

Operations

Ingress

An Ingress exposes one Agent to the outside. Agents without an ingress are reachable only through the host chat.

KindDescription
APIOpenAI-compatible endpoint at POST /ingress/{slug}/v1/chat/completions, with API keys, network access rules and its own guardrails
WebWidgetA browser chat widget served by the separate chatwidget edge service through a tunnel, with session limits, theming and embed code

Scheduler

Scheduled tasks run published Apps. A task holds a name, the App, its parameters, a five-field cron expression and a timezone, and can be enabled or paused. Instead of writing cron by hand you can describe the schedule in plain language (“every Monday at 10:00”) and the Assistant fills in the form; saving applies it.

  • Missed runs coalesce to the latest due time; overlapping executions of the same task are skipped.
  • Future runs use the latest published App and the saved parameters. Editing cancels queued executions; running ones continue.
  • Run now uses the saved configuration and does not move the next cron time.
  • Tasks run with the permissions of the administrator who last saved them. The Activity list links every execution to its logs.
A new Scheduler task with App, cron expression, timezone and the Describe your schedule field
SchedulerA new task: pick the App, enter cron or describe the schedule, then preview the next runs before saving.

Budget

Two dashboards: LLM Token Spent by Agent, ingress and knowledge source, and Other Usage for filters, the Assistant, audio and retrieval requests. Monthly budgets cap input tokens, output tokens and requests for the whole installation or selected scopes, with a month-end forecast and alerts delivered to chosen recipients. Before every paid model call the host records a conservative pre-charge, then corrects it with the real counters when the response arrives. Calls with missing or estimated usage are counted separately.

The LLM Token Spent dashboard with tokens in, cached input, tokens out, total and the daily consumption chart
BudgetLLM Token Spent for a selected period, with the cache-hit rate and daily consumption split into uncached, cached and output tokens.

Logs

Structured logs for every runtime path: LLM calls, tool calls, guardrail verdicts, RAG indexing and inference, ingress and widget sessions, script, App and scheduled runs, and operational configuration changes. Entries link to each other, so a blocked request leads to its ingress, session and model call.

Chat Sessions logs with date, agent, session, status and search filters
LogsLogs are grouped by domain: Chat Sessions, Agent Apps, RAG Inference and Indexing, Tool Profiles, Scripts, Guardrails, LLM Gateway and Operational Changes.

Settings

PageDescription
GeneralSub-pages listed below
ProvidersOpenAI-compatible model providers for generation, embeddings, reranking and transcription, plus TypeSafe for classification
Users, Groups, Roles, PoliciesAccounts and their SSO identity, local and directory-mapped groups, built-in and custom roles with their assignments, and additional OPA policies. See Access & identity.
SecretsEncrypted credentials (AES-GCM). A stored value is never displayed; it can only be rotated in place or deleted.
ProfilePersonal preferences: theme, chat width and send-on-enter behaviour

General

Sub-pageDescription
Main SettingsGlobal default model and output-token limit, chat title and speech-to-text models, and the shared local sidecars: Prompt Guard (the Wolf Defender Small v2 model), the internal PII filter and the token counter
Knowledge BaseEmbeddings and chunking defaults
AssistantAssistant provider and model, and pinned research integrations
WebWidgetSession limits shared by all public widgets
Background jobsExecution history, queues, worker limits, pause and resume
LicenseActivation and automatic renewal of the technical token
System StatusStorage usage and running isolated runtimes
In short

Agents define behaviour and Apps turn scripts into tools for the whole team; Ingress defines exposure; Guardrails, Tool Profiles and Integrations define what an Agent may touch; Knowledge, Data and Ontologies are what it may read; the Scheduler runs Apps on time; the Assistant helps administrators set all of it up; Budget and Logs record what happened.

How to start/Login & authentication

Login & authentication

The host GUI is the administration console. Access to it is the first boundary in the platform, and it is enforced entirely by host code.

Reaching the console

aamp binds to 127.0.0.1:3000 by default, overridable with -http-listen. On first run you create the initial host user; subsequent access is through the sign-in form, which establishes a session.

The Settings area with the LLM provider configuration form
SettingsBehind the session boundary sits the host settings area — global settings, users, LLM providers and secrets. Provider keys entered here stay host-side.

Password storage

Host user passwords are hashed with Argon2id — one-way, never recoverable — with parameters m=65536, t=3, p=2. A password is a credential, not a secret: it can be verified but never decrypted.

Sessions

  • Session token hashes are stored in host_sessions; the raw token lives only in the browser cookie.
  • CSRF tokens are required on all browser mutations.
  • Same-origin checks apply on unsafe methods.

These four controls — hashed passwords, hashed session tokens, CSRF protection and same-origin enforcement — are the host admin boundary. Everything an administrator does in the console passes through it.

Single sign-on

With an OpenID Connect provider configured, the sign-in page offers Sign in with … next to local login. SSO accounts have no local password. Critical changes, such as publishing a role or activating an access proposal, ask for fresh authentication: a password for local accounts, or Confirm with SSO, which sends the user back to the identity provider. Signing out of aamp does not sign the user out of the provider. Configuration and group mapping are described in Access & identity.

Note

The console is bound to localhost by default. Exposing it beyond the host is a deliberate deployment choice, not the default — front it with your own reverse proxy and network controls when you do.

How to start/Access & identity

Access & identity

Access in aamp is a set of role assignments. Each one gives a user or a group a role on a scope. Identities and group memberships can come from your directory through single sign-on, while additional policies and knowledge reader rules can only narrow what roles allow.

Roles, scopes and assignments

An assignment binds one role to one scope: a concrete resource, or the whole installation where the role permits it. Assignments to a user and to the user's groups add together. Every protected route, stream and background job is checked host-side by an embedded Open Policy Agent (OPA) engine. Errors, timeouts and unknown operations deny.

Built-in roleScopeAllows
platform_adminInstallationEvery operation, including users, groups, providers, secrets, budgets, audit and system settings
agent_userAgentUsing the Agent: chat, stop a turn, read and attach chat files, read the Agent’s knowledge
workflow_runnerWorkflowRunning it, reading runs and results, stopping runs, writing inputs
resource_viewerAny of the 11 scope typesViewing configuration
resource_editorAny of the 11 scope typesEditing drafts; importing into datasets
resource_publisherAgent, Script, Workflow, knowledge source and collection, dataset, data productPublishing versions, refreshing sources, rebuilding data products
access_adminInstallation, within a ceilingRoles, role assignments and group membership
policy_adminInstallation, within a ceilingAdditional policies and their attachments

Scope types are agent, workflow, script, ingress, tool_profile, knowledge_source, knowledge_collection, dataset, data_product, integration and provider. Every signed-in user can also manage their own profile, personal library and Inbox.

The installation root is a protected local account whose status is independent of role assignments. It cannot be disabled, deleted or replaced through user administration, and a forgotten root password is reset offline with aampctl auth recover-root, without the identity provider.

Custom roles

Open Settings → Roles. Built-in roles are read-only; Create a copy starts a custom draft. A new role has a name, a description, allowed scope types and an explicit list of actions. For example, an Agent reviewer can hold agent.view and agent.test without agent.edit or agent.publish.

  • Save draft changes no access.
  • Validate and preview lists added and removed actions, scope changes and the affected users, including current members of affected groups.
  • Publication is confirmed with your local password or Confirm with SSO. The proof is single-use, valid for five minutes and bound to that exact change.
  • Assign the published role from Users → Access or Groups → Access. A later publication updates every existing assignment of the role.
  • Wildcards and unknown actions are rejected. New application actions are never added to custom roles automatically.
  • Restoring a prior version creates a new immutable revision.

Single sign-on (OIDC)

aamp signs users in through an OpenID Connect provider, using the Authorization Code flow with mandatory PKCE (S256). Microsoft Entra ID, or Keycloak in front of Active Directory, are typical choices. The host operator configures one active provider in a JSON file passed with --oidc-config-file; the client secret is referenced from the encrypted secret store and never written into the file. The sign-in page then offers the provider next to local login.

  • Admission rules combine: allowed_tenants (Entra tid), allowed_subjects and allowed_email_domains. allow_signup must be set explicitly to create accounts on first login.
  • A new SSO account has no password and no direct roles; access comes from mapped groups or explicit assignments.
  • An existing local account is linked explicitly from Profile → Single sign-on, keeping its ID, memberships and grants.
  • session_seconds defaults to 8 hours. aamp does not request offline access and does not keep access or refresh tokens.
  • A local block is authoritative: a successful IdP login does not undo it. Local root login keeps working when the IdP is unavailable.

Mapping directory groups and App Roles

Group membership stays where you govern it today: Active Directory, Entra ID, or an IAM or IGA system that manages directory groups. In aamp you create local groups under Settings → Groups, give them role assignments, and map stable external identifiers to them:

{
  "account_max_age_seconds": 900,
  "membership_max_age_seconds": 900,
  "group_mappings": [
    {"claim": "groups", "external_id": "EXTERNAL-GROUP-ID", "group_id": 12},
    {"claim": "roles",  "external_id": "Reports.Reader",    "group_id": 13}
  ]
}
  • A groups value or an Entra App Role in the roles claim maps to a local group, whose assignments decide the permissions. Entra directory roles (wids) are ignored.
  • Mappings use stable identifiers, not display names. Up to 200 mappings and 200 values per claim.
  • External memberships are stored apart from manual ones and shown with the oidc source. Removing one never removes a local membership or a direct grant.
  • A missing, null or malformed claim, or a group overage indicator, refuses login instead of being read as an empty list.
  • Account and membership evidence is valid for 15 minutes by default (60 s to 24 h). After that, new requests and running work stop until the user signs in again.
  • A newly observed administrative membership requires authentication no older than five minutes.
  • Mapping changes apply at startup and require affected users to sign in again. Logs → Access Audit records mappings, reconciliations and incomplete observations.
What the mapping covers

Memberships are read from the token at each sign-in. aamp does not call Microsoft Graph and does not accept SCIM provisioning. Joiner, mover and leaver changes made in your directory or IGA tool take effect at the user’s next sign-in, and at the latest when the freshness window expires.

Additional policies (OPA / Rego)

Open Settings → Policies to write restrictions on Agent use in Rego. The contract is aamp.policy.agent-use/v1, of kind additional_restriction: a policy can deny what roles allow, never grant. The subject is a user or an Ingress, and the channel is one of gui, api, webwidget, script, scheduler, assistant or internal. This policy restricts members of group 7 to the GUI and leaves other users unchanged:

package aamp_custom
import rego.v1

default allow := false
restricted if { some m in input.memberships; m.group_id == 7 }
allow if { not restricted }
allow if { input.context.channel == "gui" }
  • Up to 64 test cases with expected results. Compilation and every test must pass before publication.
  • Under Attachments you attach the policy to specific Agents. The preview evaluates current users and real API and WebWidget Ingresses, up to 2,000 decisions.
  • The policy applies to the Agent’s current and historical releases, and to Script and Scheduler calls of that Agent.
  • Limits: 32 KiB of Rego, 100 rules, 20 ms evaluation. Only deterministic built-ins are available, with no access to secrets.

Knowledge reader restrictions

Open a knowledge source and choose Readers to restrict the entire source or a single file to selected users or groups, optionally per channel. A file must satisfy its own rule and the source rule. A reader rule never grants Agent access.

  • Full-text and semantic search filter unauthorized chunks before ranking, so they never reach the model.
  • Citations, linked chunks, previews and original downloads check the same rules.
  • A file rule follows the stable document ID and survives reindexing and restores.
  • A conversation keeps the union of the knowledge it has used. Losing a required reader right blocks further turns in that conversation.

Delegated administration

access_admin and policy_admin grant nothing until a platform administrator sets a ceiling under Roles → Delegations: concrete resources, allowed role keys, delegable operations, editable groups and manageable definitions. Empty lists grant nothing. A delegated administrator cannot grant a broader role, edit a group that carries broader grants, manage their own delegation, or grant root or platform administration. Holding an action never implies permission to grant it.

Describe access with the Assistant

Describe access with Assistant in Roles or Policies turns a sentence such as “Finance can use the Reports Agent only through the GUI” into a proposal of assignments, roles, Rego and tests. The host validates every reference and simulates the result on real users, groups and Ingresses. The proposal is private to its author and is activated as a whole, in one transaction, only after fresh password or SSO confirmation. Account and SSO changes, global administrative roles and the author’s own access remain manual.

Audit and revocation

  • Logs → Access Audit records drafts, publications, restores, attachments, delegations and mappings with the actor and before and after state.
  • Access explanations and simulations show which assignment or policy revision produced a decision.
  • Running Agent turns, streams and background workers recheck access every 250 ms. Unauthorized work stops within two seconds of the change.
  • At startup aamp verifies active role and policy versions. Invalid active state stops startup instead of falling back to an older, less restrictive revision.
How to start/Deployment

Deployment

A single Go binary, a SQLite database and local file state. Backup is a file plus two directories; migration is copying them.

Requirements

  • Linux host with KVM (/dev/kvm)
  • Guest kernel image and helper images for isolated workloads
  • Go 1.27.1 and Node.js / npm to build
  • A 32-byte secrets key: a keyring in a systemd credentials directory, or AAMP_SECRETS_MASTER_KEY for development
  • Optional: an OpenID Connect provider for single sign-on

Runtime state

PathHolds
aamp.sqlite3All application data
data/DuckLake catalog, Parquet data and original dataset uploads
isolated-runtimes/Isolated-workload runtime state
blobs/Kernel, helper images, runtime binaries

Default bind is 127.0.0.1:3000, overridable with -http-listen. For a regulated on-premise deployment, that operational simplicity is a feature, not an omission.

The Scheduler with a new task form
SchedulerThe host scheduler runs published Apps on a cron schedule, with a natural-language schedule assistant and a preview of the next run times.

Where it fits

Suited to: dedicated on-premise servers; private cloud with nested virtualisation; isolated lab and staging environments.

Not suited to: managed container platforms without KVM; macOS or Windows hosts; any environment where /dev/kvm is unavailable.

Read this before you install

KVM is mandatory. A prospect who discovers the requirement halfway through an install blames the product; one who reads it first makes an informed choice. State requirements plainly and early.

How to start/Security & compliance

Security & compliance

Five independent boundaries, each enforced by host code and each independently logged. Compliance evidence is a by-product of running the system.

Secrets

Two distinct policies, correctly separated:

  • Recoverable secrets (provider keys, SSH credentials) — AES-256-GCM with a 12-byte nonce, sealed under AAMP_SECRETS_MASTER_KEY, which must decode to exactly 32 bytes. Ciphertext and nonce are stored in separate columns.
  • Credentials (host user passwords) — Argon2id, one-way, never recoverable.

Secrets referenced by helpers use ON DELETE RESTRICT: a secret in use cannot be deleted out from under a live integration.

The stored-secrets form in Settings
SecretsSecrets are encrypted on the host and never shown again after storage. SSH private keys are host-only credentials and are never mounted into guest workloads.

LLM safety firewalls

Firewalls are model-based evaluators applied at message boundaries. Three kinds exist — generic_judge (custom prompt), llama_guard and shield_gemma — each with a direction (inbound or outbound), its own provider and model binding, a policy prompt and a refusal message.

Firewalls attach at two levels: embedded chat on the Agent, and transport on the Ingress. A public widget can therefore run stricter evaluation than the same agent's internal use. Verdicts are logged to firewall_logs, and a test endpoint lets you tune policy before deployment.

The Guardrail Catalog with inbound guardrail and outbound PII filter
FirewallsCreating a firewall: pick a direction and evaluator, write the policy prompt, and set the refusal message shown to end users. Detailed model reasons stay in admin logs.
A defence layer, not a guarantee

Firewalls are model-based evaluators and inherit the reliability characteristics of the models running them. Treat them as one layer among five, not as a promise.

Network controls

Egress passes through a host-controlled proxy with a DNS filter and a domain policy in network_domains supporting default-allow or default-block. HTTP traffic is logged to http_proxy_logs. A controlled subset of host APIs — /llm, /knowledge, /helpers, /environment — is exposed to guests, with provider keys injected host-side at that boundary. This is the mechanism by which a guest can use a model without ever holding a credential.

Knowledge & retrieval

Knowledge bases are host-owned. Documents are ingested and chunked in an isolated one-shot workload, then indexed for host-side retrieval; the chunk and inference prompts are configurable per corpus. Retrieval executes no guest code, and knowledge_usage_logs records which documents answered which query.

The Knowledge Catalog with rolling and strict bases and knowledge sources
KnowledgeA new knowledge base carries its own provider binding, chunk prompt and inference prompt — so indexing strategy is set per corpus rather than globally.

The public edge

The chatwidget edge service is a separate binary intended for DMZ deployment. It holds no database access and no credentials. Its controls include HMAC-derived slugs, a shared-key authenticated tunnel, origin checks, request and message size limits and a per-IP ban window. The tunnel is outbound from the aamp host — the public edge cannot initiate a connection inward.

Observability

Fourteen log domains record runtime activity: agent turns, tool calls, every model request (with token counts split into prompt, cached, completion and total), firewall verdicts, helper executions, job events, knowledge retrieval and sync, workflow runs and steps, proxy traffic, remote commands and authorization decisions. For any answer an agent gives, the retrieved context and the spend behind it are recoverable.

Chat Sessions logs with date, agent, session, status and search filters
LogsSystem Logs, queryable per domain: Chat Sessions, Agent Apps, RAG inference and indexing, Tool Profiles, Scripts, Guardrails, LLM Gateway and Operational Changes, filterable by date, agent and session.

Compliance posture

aamp gives your compliance team full data lineage without a documentation project: what entered the prompt, what was retrieved, what the model returned, which tools ran and what it cost — recorded as a by-product of operation.

Under the EU AI Act, Article 50 transparency duties take effect 2 August 2026. Annex III high-risk obligations now run to December 2027. Building the evidence base into the architecture — rather than bolting it on later — is what these dates reward.

On compliance claims

No tool delivers regulatory compliance on its own; compliance is an organisational obligation. What aamp provides is the evidence base — lineage, attribution and audit — that a compliance programme is built on.

Setup/03.1 Basic Setup

Basic Setup: Models, Providers, Agent

Before an agent can answer, the host needs a provider (an endpoint plus a credential), a main model that agents inherit, and the integrations the agent may call. This walks the whole path once, using OpenRouter as the provider, then creates the first agent on top of it.

Where the keys live

The provider key and every integration secret are stored host-side and used host-side. Agents never receive them; they receive capability. Nothing in this procedure moves a credential into a model context.

Before you start

  • An account with the platform_admin role, or a custom role covering providers, integrations and Agents.
  • An OpenRouter account. Any supported provider works the same way; only the provider type and key change.
  • Outbound network access from the host to the provider endpoint. If the host is air-gapped, add a local provider instead.
  • Optional: a Brave Search API key, if the agent should search the web.

Step one · Add the provider

A provider record is a provider type and a credential. Nothing about behaviour; that belongs to the agent.

aamp console

Open Settings → Providers

Providers are host configuration, so they sit in Settings rather than on an agent.

Open Settings → Providers
settings · providers

Click New Provider

The form opens with the list of supported provider types.

Click New Provider
new provider

Select the provider type

This example uses OpenRouter. Then click into the API key field.

Select the provider type
openrouter.ai · api keys

Generate a key at the provider

In the OpenRouter workspace, click New Key. Name it after where it will be used, for example aamp-host-prod, so it is easy to find and revoke later.

Generate a key at the provider
openrouter.ai

Copy the new key

OpenRouter shows a key once. If you lose it, delete it and make another.

Copy the new key
new provider

Paste the key and Save

The key is written to host storage and redacted wherever it is displayed afterwards.

Paste the key and Save

Step two · Choose the main model

The provider says where requests go. The main model says which one answers when an agent has no binding of its own.

settings · general · main settings

Select the provider and click Select model

The model list is loaded live from the provider, so it changes when the provider does.

model picker

Search and pick a model

Type part of the name to filter. The recording types luna and selects openai/gpt-5.6-luna.

Search and pick a model
main settings

Click Save Main Settings

The default takes effect on the next agent turn. No restart.

Click Save Main Settings

Step three · Model for the Assistant (optional)

The Assistant has its own model setting. Skip this step if you will not use it.

settings · general · assistant

Select the Assistant provider

Usually the provider you added in step one.

Select the Assistant provider
assistant

Click Select model and pick one

Same picker as in step two. The recording again types luna and selects openai/gpt-5.6-luna.

assistant

Adjust the token limit

Sets the output-token ceiling for Assistant replies.

Adjust the token limit
assistant

Click Save Assistant Settings

The Assistant uses the new model from its next conversation.

Click Save Assistant Settings

Step four · Add a TypeSafe provider (optional)

Recommended if your agents will use TypeSafe. It is added the same way as the first provider.

settings · providers

Click New

Opens the same provider form as in step one.

Click New
new provider

Select TypeSafe, paste the key, click Add Provider

The provider appears in the list next to OpenRouter.

Select TypeSafe, paste the key, click Add Provider

Step five · Add Brave Search

Integrations are the external systems an agent may call. Each one references its credential through a secret, so the value itself is never written into the integration.

build · integrations

Click New and choose Brave Search

Add it if the agent should search the web.

Click New and choose Brave Search
new integration

Type a name and description

The description tells administrators and the agent what this connection is for.

Type a name and description
new integration

Select the API key secret

Pick the secret that holds the Brave Search key, or click Create a Secret to add it without leaving the form.

Select the API key secret

Step six · Create the agent

With a provider, a model and integrations in place, the agent itself is a short form.

build · agents

Click New

Opens the agent form.

Click New
new agent

Type the agent name

The name appears in Chat, in Apps and in every log entry for this agent.

Type the agent name
new agent

Select an icon and a colour

They help users tell agents apart in the chat list.

Select an icon and a colour
new agent

Select the LLM provider, then click Model

Binding a model here overrides the main model from step two for this agent only.

Select the LLM provider, then click Model
model picker

Pick the model

The recording types luna and selects openai/gpt-5.6-luna.

Pick the model
new agent

Tick Accepts images

Turn it on if users will attach images and the chosen model supports them.

Tick Accepts images
new agent

Add the system prompt

Describe the agent’s role, scope and tone. The prompt is versioned with the agent.

Add the system prompt

What happens next

The agent is available in Chat. Every request is attributed: Logs → LLM Gateway for the request and response, Budget for tokens and cost per agent. If the provider rejects the key, the failure appears there rather than in the agent's reply.

Rotating the key

Replace the credential on the provider record and save; agents pick it up on their next turn. Delete the old key at the provider afterwards, not before. A key revoked mid-run surfaces as a failed turn in the log.

Setup/03.2 Ingress

Configure chat widget ingress

How to set up a chat widget as the interface — the ingress — for your agent. Thirteen steps: configure the connection to the widget server, save the widget's look and copy, then test it on a page and check the theme and size options.

Why the widget is a separate service

The widget server runs as its own binary, intended for DMZ deployment. It holds no database access and no credentials — the shared key below authenticates a tunnel that is outbound from the aamp host, so the public edge can never initiate a connection inward.

Before you start

  • An account that can create and edit Ingresses, for example platform_admin.
  • An agent that already answers — see Basic Setup: Models, Providers, Agent if it has no model bound yet.
  • The URL the chat widget server is reachable on, and a shared key you have chosen for it.

Step one · Configure the ingress

An ingress defines exposure, not behaviour. Everything set here — transport, authentication, widget copy — leaves the agent record untouched.

mission control

Open your agent

Choose your agent in Mission Control to view its chat and configuration context.

Step 1 of the chat widget ingress walkthrough
agent

Click Ingress

Open the Ingress section to start configuring the web chat widget integration.

Step 2 of the chat widget ingress walkthrough
ingress · new

Give it a name, then open Chatwidget Server URL

Enter an instance name, then focus the Chatwidget Server URL field to provide the URL the widget will work on.

Step 3 of the chat widget ingress walkthrough
ingress · new

Type the shared key

Paste the server URL, then enter the shared key — the password that enables connecting with the widget on that server URL, pre-shared between the two instances.

Step 4 of the chat widget ingress walkthrough
ingress · webwidget

Configure the look, feel and welcome messages

Type the Title, then the Subtitle and the Welcome Message shown when the panel opens.

Step 5 of the chat widget ingress walkthrough
ingress · webwidget

Save WebWidget Settings

Check all inputs and settings, then save the WebWidget Settings to finalize the configuration and establish the widget connection.

Step 6 of the chat widget ingress walkthrough

Step two · Test the widget

Two links appear once the connection is live: the widget itself, and a standalone test page. Use both — one proves the tunnel, the other proves the embed.

ingress · links

Test the widget

Go to Links and open Open Widget or Open Test Page, to preview and verify that it loads and shows basic controls.

Step 7 of the chat widget ingress walkthrough
your site

Check the widget on your URL

Go to your URL once the agent is added. In the bottom-right corner of the page you should see the bubble; if you don't, refresh the page. Click the bubble to open the chat panel inside the widget and start asking questions.

Step 8 of the chat widget ingress walkthrough
ingress · links

Click Open Test Page

Open the test page to try the widget end-to-end in a standalone environment.

Step 9 of the chat widget ingress walkthrough
test page

Type a chat message

Type a test question in the chat textarea to confirm the widget responds correctly.

Step 10 of the chat widget ingress walkthrough

Step three · Theme and size

The widget's own settings panel switches theme and size at runtime, so you can check the styling against the page it will live on.

widget · settings

Customize your chat widget

Choose Settings and switch the widget theme to Dark to check the chat UI styling.

Step 11 of the chat widget ingress walkthrough
widget · settings

Click Big

Increase the widget size to Big to validate layout and readability.

Step 12 of the chat widget ingress walkthrough
widget · settings

Click Normal

Return the widget size to Normal after verifying the Big layout.

Step 13 of the chat widget ingress walkthrough

What is now exposed

The agent is reachable through one transport, under one policy, with the host still holding the credentials. Add a second ingress for a different audience rather than loosening this one — the same agent can be exposed twice under different rules.

Rotating the shared key

Change the key on both sides in the same maintenance window. The tunnel drops until the values match again, and the widget shows its offline state to end users while it does.

Solutions/04.1 Chat with your data

Agent Chat with Your Data

Upload a spreadsheet, build an Association Recommender on it, attach both to an Agent and ask questions about the data in Chat. Five steps, from an empty catalogue to the first answer.

Dataset and data product

A dataset is versioned tabular data with a name and a SQL slug; the Agent gets bounded, read-only query access to it. A data product, such as the Association Recommender used here, is a model built on a dataset that the Agent calls as a typed tool.

Before you start

  • An administrator account. Data & ML is visible to administrators only.
  • An Agent with a working model. See Basic Setup: Models, Providers, Agent.
  • A CSV or XLSX file of up to 100 MiB. For the recommender it needs a transaction ID and a product ID column.

Step one · Create the dataset

The name and the SQL slug are set once. The slug becomes the dataset's identity in SQL and cannot be changed later.

aamp console

Open Data Sources → Data & ML

Data & ML holds datasets and the data products built on them.

Open Data Sources → Data & ML
data & ml

Click New

Opens the catalogue of things you can create.

Click New
new

Click New Dataset

Starts an empty dataset; the file comes in the next step.

Click New Dataset
new dataset

Type the name, SQL slug and description

The slug takes lowercase letters, digits and underscores. The description tells the Agent what the data contains.

Type the name, SQL slug and description
new dataset

Click Create Dataset

The dataset is created without data and opens on its own page.

Click Create Dataset

Step two · Upload and publish a version

Each upload becomes a version. The Agent only sees a version once it is published.

dataset · versions

Choose the file to upload

CSV or XLSX.

Choose the file to upload
dataset · versions

Select the file from your disk

The file name appears in the upload field.

Select the file from your disk
dataset · versions

Click Upload and preview

aamp reads the whole file and infers the column types. Nothing is published yet.

Click Upload and preview
preview

Review the columns, then Import and publish

Check the inferred types before importing. The data is stored as local Parquet.

Review the columns, then Import and publish
dataset

Publish the current version

The published version is what Agents query. Earlier versions stay in the history.

Publish the current version

Step three · Build an Association Recommender

The recommender runs deterministic basket analysis on the dataset and suggests products that are often bought together.

data & ml

Click New

Back in the catalogue.

Click New
new

Add an Association Recommender

Choose the data product type.

Add an Association Recommender
new data product

Type the name and slug

As for the dataset, the slug is set once.

Type the name and slug
new data product

Map the columns

Select the Transaction ID and Product ID columns, and optionally Category.

Map the columns
new data product

Click Create & Build

aamp builds the product from the published dataset version. The build appears in the product's history.

Click Create & Build

Step four · Attach to the Agent and publish

An Agent can only use data that is attached to it explicitly. Changes are made in the draft and take effect after publishing.

build · agents

Open Build → Agents and pick the Agent

Open the Agent that should answer questions about the data.

Open Build → Agents and pick the Agent
agent

Open the Data Sources tab

Lists the datasets and data products you can attach.

Open the Data Sources tab
agent · data sources

Select the dataset

Gives the Agent bounded, read-only query access to the published version.

Select the dataset
agent · data sources

Select the Basket analysis product

Adds the recommender as a typed tool the Agent can call.

Select the Basket analysis product
agent

Open the release menu

Click Draft · published v1 next to the Agent name.

Open the release menu
release

Click Publish

Publishing creates a new release with the attached data.

Click Publish
agent

Check that the Agent is published

The new release is what Chat and every ingress use from now on.

Check that the Agent is published

Step five · Ask about your data

chat

Open Chat with the Agent

Start a new conversation with the Agent you just published.

Open Chat with the Agent
chat

Ask a question

For example, which products sell best, or what to recommend with a given product. The tool calls behind each answer are visible in the conversation.

Ask a question

What happens next

Every query the Agent runs is recorded in Logs. When you upload and publish a new version of the dataset, rebuild the recommender so it uses the new data. A dataset cannot be deleted while it is attached to an Agent or used by its published release.

Solutions/04.2 RAG step by step

Launch a RAG knowledge base

The full click-by-click path from an empty Knowledge tab to an indexed base an agent can cite. Five stages, twenty-six clicks — create the base, add the two helpers indexing depends on, attach them, upload documents, then index and monitor.

Before you start

  • An account that can manage knowledge sources and providers, for example platform_admin.
  • At least one LLM provider already configured — see Basic Setup: Models, Providers, Agent if you have not done this yet.
  • The documents you want indexed. This walkthrough uses a single PDF as the example source.

Step one · Create the knowledge base

A knowledge base does not inherit the host default model. It binds its own — because the model that chunks a 200-page manual is rarely the model that should answer a support ticket.

aamp console

Open Knowledge

Open the Knowledge section to start creating and configuring a knowledge base.

Step 1 of the RAG knowledge base walkthrough
knowledge

Click New

Starts a new, empty knowledge base.

Step 2 of the RAG knowledge base walkthrough
new base

Name it, describe it, open the chunking model field

Fill in name and description, then open the Chunking & processing Model selector to pick the model that will process documents.

Step 3 of the RAG knowledge base walkthrough
new base

Set the LLM provider and the processing model

Pick the LLM provider, search the model list — for example type lun — and select the match, such as openai/gpt-5.6-luna, for processing.

Step 4 of the RAG knowledge base walkthrough
new base

Click Create

Creates the base with the configuration set so far. Helpers and prompts are attached next.

Step 5 of the RAG knowledge base walkthrough
Settings → General with Main Settings open and the Knowledge Base, Sandbox, Assistant, WebWidget, Background jobs, License and System Status sub-pages
SettingsSettings → General. Knowledge Base holds the embeddings and chunking defaults; Main Settings holds the output-token limit and the helper models, each loaded live from the assigned provider.

Step two · Add the indexing helpers

Indexing does not run in the host process. It runs in one-shot helper VMs, so a malformed PDF or a hostile document cannot reach anything else on the host. A base needs at least two tools: one to index, one to fetch and read links.

aamp console

Open Helpers

Go to the Helpers section to add the tools this base will index and read links with.

Step 6 of the RAG knowledge base walkthrough
helpers · new

Select Scratch FS

The first tool needed is Scratch FS — grep, jq, slicing, stats and file management. It is built in for every agent, and the RAG Indexer helper is configured on top of it.

Step 7 of the RAG knowledge base walkthrough
new helper

Name it "RAG indexer"

Naming it clearly makes it easy to recognise later, when you attach it to a base.

Step 8 of the RAG knowledge base walkthrough
new helper

Click Create

Saves and creates the RAG indexer helper.

Step 9 of the RAG knowledge base walkthrough
helpers

Click New again

Add a second helper — a reader for fetching content from the web.

Step 10 of the RAG knowledge base walkthrough
helpers · new

Select Jina Reader from the list

Jina Reader fetches URL content and scrapes pages, for sources that live outside your uploaded files.

Step 11 of the RAG knowledge base walkthrough
new helper

Configure it and click Create

Give it a name and, optionally, a prompt, then create the Jina Reader helper.

Step 12 of the RAG knowledge base walkthrough
The Helpers catalogue showing RAG Indexer and RAG Indexer VLM helper cards
HelpersTwo indexer variants exist: the standard RAG Indexer used here, and a VLM variant that adds Docling and GraniteDocling for scanned or image-based documents.

Step three · Attach the helpers to the base

Creating a helper does not attach it to anything. The base needs to be told which helpers to use.

knowledge

Return to Knowledge

Go back to the base to pin the helpers you just created.

Step 13 of the RAG knowledge base walkthrough
base

Open Settings

Configures the helpers and processing parameters for this specific base.

Step 14 of the RAG knowledge base walkthrough
settings

Select the RAG Indexer Helper VM and the Jina Reader Helper

Pick the RAG Indexer helper VM as required, and the Jina Reader helper as optional — together they give the base a structure to extract into and a way to reach URLs.

Step 15 of the RAG knowledge base walkthrough
settings

Click Save

Saves the attached helpers to the base's settings.

Step 16 of the RAG knowledge base walkthrough

Step four · Upload documents

knowledge · base

Open the Knowledge tab

Switch to the tab where raw files are added to the base.

Step 17 of the RAG knowledge base walkthrough
knowledge · base

Click Upload

Starts adding documents to the knowledge base. Documents can come from disk or from other sources.

Step 18 of the RAG knowledge base walkthrough
upload

Choose RAW files to upload

Pick the raw file from disk to queue it for upload.

Step 19 of the RAG knowledge base walkthrough
upload

Click Upload to confirm

Confirms sending the selected file to the base.

Step 20 of the RAG knowledge base walkthrough
upload

Repeat file selection for additional documents

Point the file picker at another file to queue it as well.

Step 21 of the RAG knowledge base walkthrough
upload

Click Upload again

Confirms adding the next file to the base.

Step 22 of the RAG knowledge base walkthrough
raw files

Select an uploaded file to confirm it landed

Click the uploaded file in the RAW files list — its name, type and size confirm it is queued for indexing.

Step 23 of the RAG knowledge base walkthrough

Step five · Index and monitor

base

Click Index Full Base

Sends every raw file to the RAG helper VM for indexing, now that documents are uploaded.

Step 24 of the RAG knowledge base walkthrough
base

Watch the progress bar

The green bar tracks raw, processed and doc counts. Run Index Full Base again after adding or changing documents.

Step 25 of the RAG knowledge base walkthrough
base · docs

Open an indexed file to check it

Click any processed document to view its markdown chunks and confirm indexing worked as expected.

Step 26 of the RAG knowledge base walkthrough
A knowledge base at 100% indexed, with raw files, upload and Index Full Base controls
KnowledgeIndexing status is explicit — raw count, processed count, doc count — so a stalled or partial index is visible rather than silent.

After indexing · monitor and fine-tune

The base is not a set-and-forget asset. Two places to watch it:

  • Logs → RAG Inference and RAG Indexing — per-query retrieval and per-document indexing events, filterable by date, agent and session.
  • Logs → Token Spend — chunking and query-time inference cost, broken down by provider and by model.

If answers come back thin, revisit the chunk prompt before the inference prompt — most retrieval quality problems are extraction problems wearing a query problem's clothes.

On re-indexing

Changing the chunk prompt does not retroactively rewrite existing chunks. Re-run Index Full Base after a prompt change to apply it to documents already in the base.

Setup/03.3 Guardrails

Configure and test guardrails

Create a guardrail, attach it to an Agent's chat surface and prove that it blocks. Then add an outbound PII filter and check that personal data is anonymised. Every verdict lands in the logs, where you can compare the raw classifier output with the exact content it judged.

Inbound guardrail vs. outbound PII filter

A guardrail evaluates the user's message before it reaches the Agent's model and blocks it with a refusal. A PII filter works on the other boundary: it runs after generation and anonymises identifiers before the answer is delivered. Both are reusable policies: create once, attach per Agent and per surface.

Before you start

  • An Agent that already answers. See 03.1 Basic Setup.
  • A provider with a model the guardrail can use to judge messages.

Step one · Create the guardrail

build · guardrails

Click New Guardrail

Open Build → Guardrails and click New Guardrail.

Click New Guardrail
guardrails · new

Click New

Starts the guardrail form.

Click New
new guardrail

Type the guardrail name

Name it after what it protects. This is the name you pick when attaching it to an Agent.

Type the guardrail name
new guardrail

Select the LLM provider and model

As in the basic setup: select the provider, click Select model, type part of the name and pick it. The recording selects openai/gpt-5.6-luna.

Select the LLM provider and model
new guardrail

Click Create Guardrail

The guardrail is saved and can now be attached.

Click Create Guardrail

Step two · Attach it to the Agent

Guardrails are attached per surface, so the same Agent can be stricter in the public widget than in internal chat.

aamp console

Open Build → Agents

Pick the Agent to protect.

Open Build → Agents
agent

Open the Agent settings

The surface options are on the Agent's security settings.

Open the Agent settings
agent · security

Select the guardrail for Chat

Choose the guardrail you just created for the Chat surface.

Select the guardrail for Chat
agent · security

Click Save Security

The guardrail applies from the next message.

Click Save Security
agent · flow

Check the Agent flow

On Chat and Flow, the guardrail appears as a new box in front of the model.

Check the Agent flow

Step three · Test the block

chat

Start a new conversation

Click New in Chat.

Start a new conversation
chat

Type a test question

Use a message the policy should stop, such as an attempt to override the Agent's instructions.

Type a test question
chat

See the Agent refuse

The reply starts with I can't help with that request. The message never reached the Agent's model.

See the Agent refuse

Step four · Change the guardrail type

build · guardrails

Open the guardrail

Go back to Guardrails and open the guardrail.

Open the guardrail
guardrail · settings

Select another type and click Save Settings

The next test runs against the new type.

Select another type and click Save Settings
aamp console

Open Settings

Before testing again, check that the services behind the guardrail are up.

Open Settings
settings · general

Open System Status

Lists the host services and local sidecars, including the internal guardrail classifier.

Open System Status

Step five · Test again from the Inbox

aamp console

Open Inbox

The Inbox shows recent Agent conversations, including blocked ones.

Open Inbox
inbox

Open the Agent

Pick the Agent you tested.

Open the Agent
inbox · conversation

Copy the blocked message and start a new session

Open the refused reply, copy the original message and click New session.

Copy the blocked message and start a new session
chat

Paste the message

Paste it into the message field.

Paste the message
chat

Click Send

The new guardrail type judges the same message.

Click Send

Step six · Inspect the verdict

aamp console

Open Logs

Every guardrail decision is logged.

Open Logs
logs

Open Guardrails

The guardrail log lists each verdict with its Agent, surface and time.

Open Guardrails
logs · guardrails

Click Inspect

Opens the full record of one decision.

Click Inspect
logs · inspect

Compare the raw output with the content

Raw classifier output shows what the model returned; Inspected content shows exactly what it judged.

Compare the raw output with the content

Step seven · Outbound PII filter

The PII filter anonymises personal data in the Agent's answers before they are delivered.

build · guardrails

Click New

Create a new filter in the same section.

Click New
new pii filter

Select the type and click Create PII Filter

The filter is saved as a reusable policy.

Select the type and click Create PII Filter
aamp console

Open Build → Agents

Pick the Agent.

Open Build → Agents
agent

Open Security

The outbound filters are configured next to the guardrails.

Open Security
agent · security

Select the PII filter for Chat

Choose the filter for the Chat surface.

Select the PII filter for Chat
agent · security

Click Save Security

The filter applies from the next answer.

Click Save Security
agent

Click Test

Opens a test chat with the Agent.

Click Test
test chat

Click New session

Starts a clean conversation.

Click New session
test chat

Type a message with personal data

For example a name, e-mail address or phone number.

Type a message with personal data
test chat

See the anonymised answer

Identifiers in the reply are replaced before delivery.

See the anonymised answer
agent · flow

Check the Agent flow

The PII filter appears as a box after the model.

Check the Agent flow
agent · flow

Click Close

Back to the Agent.

Click Close
Solutions/04.3 Build an App with the Assistant

Build an App with the Assistant

Describe what you need in one message. The Assistant writes and tests a Python script, wraps it in a process App and adds it as a widget to a dashboard, asking for approval before each change is published. This example builds a calculator that sums two numbers.

Nothing is published without approval

The Assistant prepares drafts and runs them, but every publication waits for Approve. Each change it makes is a normal draft or release that you can review, edit or restore later in Build.

Before you start

  • An administrator account and a model set for the Assistant. See 03.1 Basic Setup, step three.
  • A dashboard to attach the App to. The example uses dashboard 997.

Step one · Ask the Assistant

assistant

Describe the App and click Send

The example asks for a script that takes two numbers, sums them and displays the result, as an App attached to @dashboard 997. Use @ to reference existing resources.

Describe the App and click Send

Step two · Approve each step

assistant

Approve the script

The Assistant checks for reusable resources, writes the script, runs it with test values (12 + 30) and asks to publish it.

Approve the script
assistant

Approve the process run

It creates the process App from the published script and runs the draft before publishing.

Approve the process run
assistant

Approve the dashboard change

Adding the widget changes a published dashboard, so it asks again.

Approve the dashboard change
assistant

Read the summary

The final message lists what was created and published: script, process App and dashboard version.

Read the summary

Step three · Review what was built

aamp console

Open Build → Scripts

Everything the Assistant made is an ordinary resource in Build.

Open Build → Scripts
scripting

Check the script code

The Python script with typed inputs and a typed result.

Check the script code
scripting · run

Run it yourself

On Run, enter values and run the saved draft or a published version. The console shows the result.

Run it yourself
build · apps

Open Build → Apps

The new App is listed under Scripts.

Open Build → Apps
app · params & widget

Check the form and preview

Params & Widget shows the form fields and a preview with the result.

Check the form and preview

Step four · Adjust and publish the dashboard

build · apps · dashboard

Open the dashboard

The new widget sits next to the existing ones. Drag the header to move it, drag a corner to resize.

Open the dashboard
dashboard

Click Save draft

Saves the layout as a draft.

Click Save draft
dashboard · versions

Review the versions

Each version lists the settings that changed, with values before and after.

Review the versions
dashboard · versions

Click Publish

Users see the new layout. Restore and publish brings back any earlier version.

Click Publish

Step five · Run it from Apps

main · apps

Open the dashboard

Published dashboards are listed under Apps for users.

Open the dashboard
dashboard

Enter the numbers

Fill in the form fields of the widget.

Enter the numbers
dashboard

Click Run

Each widget runs independently.

Click Run
dashboard

See the result

The result appears in the widget. Run again repeats it with new values.

See the result
Tips/05.1 Monitor the cost of every interaction

Instantly monitor the cost of every interaction

Every Agent reply in Chat and in the Assistant shows what it cost, without opening Budget or Logs.

chat · assistant

Read the line under the reply

Under each reply: (B) the time it was generated, (C) the tokens used, input and output (for example 13419 in / 569 out), and (A) the cost of that reply. Click the time or the token count for details.

The line under an Agent reply with time, tokens in and out, and cost

For totals per Agent, model or period, use Budget. For the full request and response of a single call, use Logs → LLM Gateway.

Tips/05.2 Type a question to a selected @agent

Type a question to a selected @agent

In the Assistant, type @ to point a question at a particular Agent or other system resource.

assistant

Type @ and pick the resource

While typing the question, add @. A list opens; select System resources and pick the Agent. The reference is inserted into the message, so the Assistant works on exactly that resource.

Typing @ in the Assistant opens the list of system resources

The line under the reply shows its cost, time and tokens. See 05.1 Monitor the cost of every interaction.

Reference/Glossary

Glossary

Terms used in the aamp console and in these docs, in alphabetical order.

A – C

TermMeaning
Access assistantTurns a plain-language access request into a reviewed proposal of assignments, roles and policies, activated only after fresh confirmation.
Additional policyA Rego rule attached to Agents that can only restrict access allowed by roles, for example to one channel.
AgentA host-side configuration record defining behaviour: model, prompt, tools, knowledge and safety settings. Not a running process.
Agent releaseA published, immutable snapshot of an Agent draft. Ingresses serve the published release.
API ingressAn OpenAI-compatible endpoint exposing one Agent, protected by API keys and network rules.
AssistantThe built-in administrator assistant that builds and changes scripts, Apps and dashboards in chat, and asks for approval before publishing.
Association RecommenderA Data Product that finds products bought together and recommends complements.
Audit logThe structured record of what happened: model calls, tool calls, verdicts, changes.
Background jobA durable queued task (data builds, scripts, knowledge indexing) with retries and history.
Browser ControlA tool profile that runs a full Chromium browser for an Agent inside a Firecracker session. The only browser profile that supports saved website logins, which the host fills in without the Agent seeing them.
Browser Control LightA lighter tool profile with the Obscura browser for public websites, with screenshots and PDF output and no login tools.
BudgetMonthly limits and accounting of token usage per provider and Agent.
CeilingThe limits within which a delegated access or policy administrator may act.
ChatwidgetThe separate edge service that serves the public WebWidget, typically in a DMZ.
ChunkingSplitting documents into passages before they are indexed for retrieval.
Context compactionShrinking a long session to fit the model’s context window. Three modes: Priority (keeps constraints, compacts low-value tool context first), Summary and Naive.

D – I

TermMeaning
DashboardA grid of process widgets with pinned versions, start modes and default parameters. Published dashboards are Apps.
Data ProductA versioned, publishable model built from a dataset and exposed to Agents as a typed tool.
DatasetVersioned tabular data (CSV, XLSX) stored in DuckLake and queryable read-only by Agents.
DuckLakeThe catalogue format aamp uses to version datasets on top of DuckDB and Parquet files.
Egress proxyThe host-controlled proxy through which isolated workloads reach the network, with domain rules.
EmbeddingA numeric vector representing text, used to find relevant passages in a knowledge base.
Fail closedWhen a check cannot complete, the request is blocked rather than let through.
Firecracker microVMA lightweight virtual machine (KVM) used to isolate risky work such as browsing, rendering and scripts.
Generic JudgeA guardrail type that evaluates a natural-language policy with an LLM.
Group mappingA configured link from an identity provider group or App Role to a local aamp group.
Guardrail (inbound)A policy that checks input before it reaches the Agent and returns a refusal message when it fails.
InboxA per-user message box that Agents and scripts deliver results to.
Indirect prompt injectionInstructions hidden in content an Agent fetches (a web page, email or PDF) rather than typed by the user.
IngressThe record that exposes an Agent through a transport: API or WebWidget.
IntegrationA host-side connection to an external service (Brave Search, Jina Reader, SSH, TypeSafe) whose credentials never leave the host. Brave Search and Jina Reader can be attached to Agents; all four are available to Python scripts.
Internal guardrailA guardrail type that runs locally: a structural scanner, then the Wolf Defender Small v2 prompt-injection classifier on CPU in a local sidecar. No external model call.
Isolated runtimeA catalogued Firecracker workload, such as a RAG indexer or the document renderer.

J – P

TermMeaning
Jina ReaderA service that reads a web page and returns clean text, available as an integration.
Knowledge baseA versioned collection of sources indexed for retrieval by Agents.
Knowledge RerankerAn optional Agent tool that ranks files found across several searches and knowledge bases before the Agent reads them, using an OpenRouter reranking model or a TypeSafe Decision Model.
LLM providerAn OpenAI-compatible model endpoint configured in Settings → Providers, with its key stored as a secret.
Mission ControlThe console start page for administrators: Agents, activity, token usage and App schedules.
OIDCOpenID Connect: the single sign-on protocol aamp uses with identity providers such as Entra ID or Keycloak.
OntologyA published model of business object types, their properties and relations. Schema only, no records. Hidden from the navigation in the current version.
OpenAI-compatibleUsing the same HTTP request format as the OpenAI Chat Completions API, so existing clients work unchanged.
PII filter (outbound)A check that masks personal data in a response before it is delivered.
Pre-chargeA conservative usage estimate recorded before a paid model call and corrected afterwards.
ProcessA published Script or Agent version wrapped in a typed form and result view. The building block of dashboards.
Prompt injectionAn attack that tricks a model into ignoring its instructions through crafted input.

R – Z

TermMeaning
RAGRetrieval-augmented generation: the model answers using passages retrieved from a knowledge base.
RBACRole-based access control: built-in and custom roles, each assigned to a user or group on a specific scope.
Reader restrictionA rule limiting which users, groups and channels may read a knowledge source or file.
Refusal messageThe text returned to the user when a guardrail blocks a request.
RerankingRe-ordering retrieved passages with a dedicated model so the most relevant come first.
Role assignmentOne role given to a user or group on one scope.
RootThe protected local installation account, independent of roles and of the identity provider.
SchedulerRuns published Apps on a cron expression and timezone, with run history and Run now.
ScopeWhat a role assignment applies to: the installation or one resource such as an Agent, workflow or dataset.
Scratch FSThe temporary file workspace of an Agent session, also used for pinned Agent files.
ScriptA Python program run in an isolated VM with validated parameters and run history. Wrapped in an App to get a form, a result view and a schedule.
SecretAn encrypted credential stored on the host. It can be rotated but never displayed.
SSOSingle sign-on with a company account through an OIDC identity provider.
SurfaceA channel an Agent is used through: Internal Chat, WebWidget, API or Content Processing. Guardrails are set per surface.
System 1 ClassifierA guardrail type backed by TypeSafe that scores six risk categories in one request.
Tool ProfileA configured tool with its own policy and credentials, attached to Agents: HTTP Client, Calculator, Inbox Delivery, Browser Control or Browser Control Light.
TypeSafeA classification provider added under Settings → Providers. Used by the System 1 Classifier, the Knowledge Reranker and Python scripts.
WebWidgetA public browser chat surface for one Agent, served through the chatwidget edge service.