#[non_exhaustive]pub enum Profile {
Auditable(Arc<AuditLog>),
Production,
MultiTenant,
LocalDevelopment,
DurableProduction,
RegulatedData,
}Expand description
A deployment profile, applied with
RequestHandlerBuilder::with_profile.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auditable(Arc<AuditLog>)
audit only.For a deployment whose records must stand up to an audit — the EU AI Act’s logging duties for a high-risk system (Articles 12, 19, 26(6)), or a customer’s.
Applies:
- the audit trail, with this log (
with_audit); - an
ApprovalGatewith its defaults, unless one is already set, so no unchecked approval reaches an executor.
And makes build() refuse, naming what is missing, unless:
- the log is required (
AuditLog::require_record): a call it cannot record is refused rather than served unrecorded; - the log signs checkpoints (
AuditLog::with_signer): without them the end of a chain can be cut off without trace; - an interceptor that authenticates is installed: records otherwise name no caller;
- the builder says how callers relate to each other’s tasks. The
gate’s default approver is someone other than the requester, who
cannot reach the requester’s task when tasks are isolated by caller,
which is the default with an authenticating interceptor. Call
share_tasks_across_callers, give the approvers a narrow grant, or set a gate that allows self-approval.
Retention is not configured here — purging is a job the deployment
schedules (AuditLog::purge), with a floor it chooses.
Production
For a deployment other agents delegate to, at scale (ADR 0025).
Applies nothing: which stores to use is the deployment’s choice. It
makes build() refuse, naming what is missing, unless:
- an interceptor that authenticates is installed: otherwise any caller reaches every method, and tasks are not isolated by caller;
- a halt store is set
(
with_halt_store): otherwise a halt reaches only the process it was given to, and a restart forgets it (ADR 0019); - a lease store is set
(
with_lease_store): otherwise a task delegated here runs on after the agent that delegated it has stopped (ADR 0020); - a content signer is set (
with_content_signer, featuresigning): otherwise nothing the agent sends says it made it, and an intermediary can alter it unseen (ADR 0027). Without the feature the profile cannot be met, andbuild()says to enable it.
Over a task store several processes share (one that hands out turn
claims, as the SQL stores do), build() also refuses a halt, lease,
push-config (when the card declares push notifications) or audit store
that keeps its state in this process, naming the store to use: a halt
given to one replica would not reach the tasks another runs.
allow_process_local_stores
accepts them for a deployment that routes every request for a task to
one replica (ADR 0025, amended 2026-11-01).
The listener has its own half,
ServeConfig::production,
which refuses plaintext beyond loopback and a binding the agent card
does not declare. A handler built without this profile keeps the
defaults it always had.
MultiTenant
For a deployment that serves several tenants and must not let one reach another’s work, or take its capacity (adversarial review, 2026-11-12).
Applies:
isolate_tasks_by_caller, unlessshare_tasks_across_callerswas called: every caller is named, and a request nothing named is refused, rather than kept in the tenant’s shared records;require_resolved_tenant: a request no tenant can be found for is refused, rather than served from the shared default partition.
And makes build() refuse, naming what is missing, unless:
- an interceptor that authenticates is installed;
- the tenant resolver was given through
with_authorized_tenant_resolver, which asserts it names a tenant only from what the server verified or a gateway sets, never from what the client chose; - the task and push-config stores partition by tenant, and
accept_unisolated_tenantswas not called; - sharing across callers, if chosen, comes with a tenant-aware task store you supply (the default for a sharing handler is one set of records for every tenant);
- every tenant has a concurrency limit
(
with_tenant_config,TenantLimits::with_max_concurrent_tasks), the default and each override: a tenant without one can take every executor slot a replica has.
What it cannot see, and leaves to you: that the resolver really is
authorized (you asserted it); the limits are per replica, not for the
fleet (see TenantLimits); a tool-using agent’s own strictness
(ToolLoop::strict, ArgumentCheck, AuditedPolicy); and retention
and erasure of what the stores hold.
LocalDevelopment
For a developer’s machine, a test or a demonstration: says that keeping everything in this process, and losing it at exit, is intended (adversarial review of 2026-11-13).
Applies nothing and requires nothing. What it changes is what the
handler says of itself: RequestHandler::profile_report
lists it as giving up durability and sharing between processes, so a
configuration that keeps its tasks in memory says so instead of being
read as a production one. build() refuses it together with
Production or
DurableProduction, which claim the
opposite.
DurableProduction
For a single service whose tasks, webhooks, halts, leases and audit records must survive a restart (adversarial review of 2026-11-13: “a footgun when silently combined with a durable-production claim”).
Applies nothing. Makes build() refuse, naming what is missing, unless:
- an interceptor that authenticates is installed;
- a task store is set
(
with_task_store) and it does not keep its tasks in this process alone (TaskStore::is_process_local); - when the agent card declares push notifications, a push-config store and a push outbox are set and neither is process-local: otherwise a webhook registered, or a delivery owed, is lost with the process;
- a halt, lease or audit store, when one is set, is not process-local.
The bundled in-memory stores, and the SQLite stores over
sqlite::memory:, are process-local; the SQLite stores over a file and
the PostgreSQL stores are not. A store of your own is taken to be
durable unless it says otherwise.
For several replicas, combine it with Production,
which also refuses a store only one replica can see, and with
MultiTenant when tenants must be kept apart.
What it cannot see, and lists in
RequestHandler::profile_report:
backups and their restore, the database’s own availability, a tool
loop’s step journal (the executor’s, not the handler’s), where keys are
kept, and whether retention jobs are scheduled.
RegulatedData
For a deployment that holds personal or otherwise regulated data, and must show how it is protected (adversarial review of 2026-11-13: audit privacy, URL and egress policy, proxy trust, key management and retention).
Applies nothing. Makes build() refuse, naming what is missing, unless:
- an interceptor that authenticates is installed;
- an audit log is set that is required
(
AuditLog::require_record) and seals what records say about people (AuditLog::with_privacy): it needs theauditandencryptionfeatures; - the task store seals task content
(
TaskStore::seals_content, asEncryptedTaskStoredoes), or the deployment declaredExternalControl::EncryptionAtRest; - file URLs naming a private address are refused
(
refuse_private_file_urls); - a push sender, when one is set, refuses private addresses and plain
HTTP (
PushSender::allows_private_urls,PushSender::requires_https); - the deployment declared, with
declare_external_control, its trusted proxies, key custody, backups and retention. These are carried intoRequestHandler::profile_reportas declared, not verified.
It does not require durable stores: combine it with
DurableProduction for that, and with the
Auditable profile (feature audit) for signed audit checkpoints and
an approval gate. build() refuses it beside
LocalDevelopment. What it cannot see: that a
declaration is true, what an executor or a tool sends out (a tool’s own
egress is the tool’s), and lawful basis, purpose or any other legal duty.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Profile
impl !UnwindSafe for Profile
impl Forget for Profile
impl Freeze for Profile
impl Move for Profile
impl Send for Profile
impl Sync for Profile
impl Unpin for Profile
impl UnsafeUnpin for Profile
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].