| Internet-Draft | SAMP | September 2026 |
| Efstathiou | Expires 5 March 2027 | [Page] |
The Simple Agent Management Protocol (SAMP) defines a lightweight management-plane protocol for heterogeneous AI agents. SAMP allows a management system to discover agents, query their state, receive events, subscribe to event streams, and optionally configure or execute explicitly exposed operations under policy control.¶
SAMP is inspired by operational management protocols such as SNMP, but it is designed for AI-agent-specific concepts such as dynamic profiles, autonomy classes, enrollment, trust states, and policy-gated execution. It is not an agent-to-agent communication protocol, an agent tool-use protocol, or an agent framework specification.¶
This document defines SAMP version 0.1 as an Experimental protocol suitable for controlled environments and independent interoperability testing.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 5 March 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
AI agents are increasingly deployed as long-running services, assistants, automation workers, coding agents, operational copilots, and autonomous or semi-autonomous control loops. These agents are commonly built with different frameworks, runtime environments, model providers, memory systems, and tool interfaces. Operators need a consistent way to observe and manage these agents without depending on framework-specific APIs.¶
SAMP defines a management-plane interface between a SAMP Manager and a SAMP Agent. The protocol covers discovery, enrollment, heartbeat, state query, asynchronous event notification, subscription, configuration, and controlled execution.¶
SAMP deliberately does not define how agents reason, how models are selected, how tools are invoked, or how agents communicate with each other. Those concerns belong to other layers.¶
This document specifies SAMP version 0.1, intended for controlled environments such as private data centers, research labs, and operator networks where a management system needs visibility into and control of AI agents. SAMP v0.1 is not intended for untrusted networks without additional security mechanisms.¶
SAMP v0.1 defines:¶
SAMP v0.1 does NOT define:¶
SAMP occupies the AI agent management plane. It is intended to coexist with existing management, telemetry, tool, and agent-communication protocols.¶
| Layer | Protocol | Purpose |
|---|---|---|
| Tool use | MCP | Agent-to-tool invocation |
| Agent communication | A2A / ACP | Agent-to-agent collaboration |
| Observability | OpenTelemetry | Traces, metrics, logs |
| Telemetry agent management | OpAMP | Manage data-collection agents |
| AI agent management | SAMP | Manage autonomous/semi-autonomous AI agents |
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The following terms are defined for use in this document:¶
The basic SAMP architecture contains a manager and one or more agents:¶
+--------------+ SAMP +--------------+ | SAMP Manager | <-----------------> | SAMP Agent | | | | | | Registry | | Profile | | Policy | | State | | Scheduler | | Capabilities | +--------------+ +--------------+¶
A SAMP Agent maintains a SAMP Profile and exposes SAMP operations. A SAMP Manager maintains a registry, evaluates trust, applies policy, and initiates management operations.¶
SAMP is a management protocol. It does not require a specific agent framework, model provider, orchestration system, memory backend, or tool protocol.¶
SAMP Manager:¶
SAMP Agent:¶
The SAMP Agent is a logical protocol role and does not imply a particular deployment topology. A SAMP endpoint may be embedded in the managed-agent process, implemented by a sidecar or supervisor, placed in an AI Agent Gateway, or implemented by another independent infrastructure-control component.¶
These deployment models do not provide equivalent guarantees. An embedded endpoint may be suitable for cooperative management but can become unavailable or untrustworthy when the managed process fails or is compromised. An endpoint outside the managed agent's failure domain can provide stronger evidence delivery, isolation, quarantine, restart, and termination guarantees.¶
A profile SHOULD declare the endpoint deployment model, whether the endpoint shares the managed agent's process, host, or failure domain, whether its management and evidence paths survive managed-process failure, and whether each advertised control operation is cooperative or independently enforceable. A manager MUST NOT infer out-of-band enforcement merely from the existence of a SAMP endpoint.¶
Gateway deployment is a first-class SAMP deployment model and is RECOMMENDED for security-sensitive or higher-autonomy environments. The core protocol remains deployment-topology-neutral.¶
An agent announces itself with DISCOVER. The manager validates the identity, profile, authentication material, and any pre-registration data before assigning a trust state.¶
The following trust states are defined:¶
Trust transitions are controlled by the manager. Agents MUST NOT self-promote to trusted.¶
The following transitions are normative:¶
CONFIG and EXEC MUST NOT be accepted before trusted state is established. QUERY and PUSH MAY be accepted from quarantined agents at manager discretion.¶
Enrollment is the process by which a manager evaluates an announced agent and assigns an initial trust state. SAMP v0.1 supports the following enrollment methods:¶
The enrollment method is a manager-side policy decision. The agent supplies authentication material; the manager decides.¶
Agents need to locate a manager before sending DISCOVER. SAMP v0.1 supports the following bootstrap methods:¶
Bootstrap method selection is an implementation decision. The protocol does not mandate a specific bootstrap mechanism.¶
A SAMP Profile describes the agent as a managed entity. It includes:¶
The following fields MUST be present in every SAMP Profile:¶
| Field | Type | Description |
|---|---|---|
| agent_id | string | Unique agent identifier |
| name | string | Human-readable agent name |
| agent_version | string | Agent software version |
| profile_version | string | SAMP profile schema version |
| agent_type | string | Framework type (e.g., openclaw, hermes, custom) |
| autonomy_class | string | Autonomy classification (see Section 6) |
A profile organizes exposed data into categories. Each category contains named fields with declared types.¶
Supported field types in SAMP v0.1:¶
| Type | JSON representation |
|---|---|
| string | JSON string |
| int | JSON number (integer) |
| float | JSON number |
| boolean | JSON boolean |
| timestamp | JSON string in RFC 3339 format |
| object | JSON object |
| array | JSON array |
The internal structure of object and array values is opaque to the SAMP v0.1 core protocol unless a profile or field declaration supplies a schema identifier. A receiver MUST NOT infer a nested validation contract from the base type alone.¶
Every profile MUST include a system category with at least the following fields:¶
| Field | Type | Description |
|---|---|---|
| system.status | string | Current operational status |
| system.uptime | int | Uptime in seconds |
| system.version | string | Agent software version |
| system.last_seen | timestamp | Last heartbeat or interaction time |
Managers MUST validate a profile before trusting an agent. Validation includes:¶
Managers MUST NOT fetch arbitrary external profile URLs from untrusted DISCOVER payloads. Profiles SHOULD be sent inline or retrieved only from manager-approved locations.¶
Profiles are authored as TOML in SAMP version 0.1 for human readability. Implementations MAY represent the profile internally as structured JSON or another equivalent data model. The on-the-wire encoding of profile data in SAMP PDUs is JSON.¶
Implementations MUST enforce a configurable maximum profile size and SHOULD document the configured limit. A receiver MAY reject an oversized inline profile with a profile_invalid error.¶
A profile may advertise the protocol operations and optional features that an endpoint supports. Capability advertisement states implementation support only. It does not grant authority or enable CONFIG or EXEC.¶
DISCOVER SHOULD identify the protocol versions supported by the sender. The profile_version field identifies the profile representation and is distinct from the protocol version. A manager selects only a mutually supported protocol version and MUST reject an unsupported version with version_unsupported.¶
An endpoint advertising CONFIG MUST include a config_policy declaration. The declaration contains:¶
The agent's local config_policy and the manager's policy are both restrictive: an operation is permitted only when both allow it. The declaration does not prove that a particular configuration change is behaviourally safe.¶
An endpoint advertising EXEC MUST include an exec_policy declaration. The declaration contains at least enabled, allowed_commands, per-command typed parameter schemas, and audit fields. It MAY also contain cooldown and max_per_minute limits.¶
The agent's local exec_policy and the manager's policy are both restrictive. Static command and parameter declarations do not prove that a particular invocation is behaviourally safe. A deployment MAY require synchronous runtime evidence or an external verification decision for selected operations.¶
A profile MAY include a deployment object with the following fields:¶
These fields are declarations and MUST NOT be treated as proof of independence. A manager SHOULD validate them against deployment inventory, attestation, or other trusted configuration when stronger guarantees are required.¶
A profile MAY include parent_agent_id and relationship_type metadata. A related or subordinate agent enrolls independently and MUST NOT inherit trust or management authority solely from the declared relationship.¶
Every SAMP Agent declares an autonomy_class in its profile. The following initial classes are defined:¶
The autonomy class is an input to policy. It MUST NOT grant permission by itself. Manager policy remains authoritative.¶
An agent with advisory autonomy class SHOULD NOT advertise CONFIG or EXEC capabilities. A manager SHOULD reject CONFIG or EXEC attempts targeting an advisory agent.¶
SAMP version 0.1 defines the following PDU types:¶
Each PDU has a direction field indicating its role:¶
| Direction | Meaning |
|---|---|
| request | Initiates an operation |
| response | Responds to a request |
| notification | Unsolicited asynchronous message |
| error | Error response to a request |
| PDU Type | Pattern | Initiator |
|---|---|---|
| PING | request - response | Agent |
| DISCOVER | request - response | Agent |
| QUERY | request - response | Manager |
| PUSH | notification (no response) | Agent |
| SUBSCRIBE | request - response | Manager |
| UNSUBSCRIBE | request - response | Manager |
| CONFIG | request - response | Manager |
| EXEC | request - response | Manager |
All PDUs exchanged between a manager and an agent MUST be authenticated when authentication is enabled. QUERY, PUSH, SUBSCRIBE, UNSUBSCRIBE, CONFIG, and EXEC require an enrolled and authenticated peer. A manager MAY accept an unauthenticated DISCOVER only for bootstrap, in which case it MUST NOT create more than a discovered or pending registry entry. See Section 9 for details.¶
A successful PING exchange establishes only that the peer's SAMP endpoint is reachable and responsive at that time. It does not establish workload progress, behavioural correctness, successful scheduling, task completion, or continued trustworthiness. Workload-specific progress is outside the SAMP v0.1 core protocol.¶
Managers SHOULD rate-limit DISCOVER messages from unknown agents to prevent discovery flooding. A manager MAY maintain a pending-agent quota and reject excess discoveries with a rate_limited error.¶
When a manager sends SUBSCRIBE, the agent allocates a subscription and returns a subscription_id in the response. Subsequent PUSH PDUs related to that subscription include the subscription_id in the envelope.¶
Subscriptions have a manager-defined or agent-defined time-to-live (TTL). A subscription that is not renewed within its TTL expires automatically. Managers SHOULD renew subscriptions before expiry.¶
UNSUBSCRIBE cancels an active subscription. The agent stops sending PUSH PDUs for the cancelled subscription.¶
Subscription persistence across agent restarts is NOT required in SAMP v0.1. Subscriptions do not survive agent reconnect unless the agent implementation explicitly supports persistence.¶
All SAMP messages use a common PDU envelope encoded as UTF-8 JSON [RFC8259] in SAMP version 0.1.¶
The following table defines the envelope fields:¶
| Field | Type | Presence | Description |
|---|---|---|---|
| version | string | Required | Protocol version, e.g., "0.1" |
| type | string | Required | PDU type (see Section 7) |
| direction | string | Required | One of request, response, notification, error |
| agent_id | string | Required | Identifier of the managed agent |
| timestamp | string | Required | UTC timestamp in RFC 3339 format [RFC3339] |
| request_id | string | Required | UUID for correlation and replay protection [RFC9562] |
| payload | object | Required | PDU-specific JSON object. Empty payloads encode as {}. |
| auth_tag | string | Conditional | HMAC-SHA256 authentication tag (see Section 9). Required when authentication is enabled. |
| key_id | string | Optional | Opaque identifier for the configured shared secret. It is not an identity credential by itself. |
| sequence | int | Optional | Sequence number for ordered streams |
| subscription_id | string | Optional | Subscription identifier for SUBSCRIBE/UNSUBSCRIBE/PUSH |
A response or error PDU MUST include the same request_id as the request it corresponds to. This allows both parties to correlate requests and responses without relying on transport-level correlation.¶
The request sender generates request_id. It MUST be unique within that sender's authenticated identity for at least the replay-cache retention window. A notification uses its request_id as the identifier of that transmitted PDU; an event payload may additionally carry event_id and correlation_id with event-specific semantics.¶
Receivers SHOULD validate that timestamps are within an acceptable clock-skew window. The RECOMMENDED default is plus or minus 300 seconds and SHOULD be configurable. PDUs with timestamps outside the window SHOULD be rejected with a replay_detected error when replay protection is enabled.¶
The sequence field is OPTIONAL. When present, it provides ordering for streams of PDUs (e.g., subscription event streams). Sequence numbers are per-subscription and start at 1. Receivers MAY detect gaps but MUST NOT reject PDUs solely for sequence gaps in SAMP v0.1.¶
Request payload:¶
{}¶
Response payload:¶
{"status": "operational"}¶
The status field in the response is a free-form, self-reported endpoint status (e.g., "operational", "degraded"). It does not report workload progress or behavioural correctness.¶
Request payload:¶
{
"profile": {},
"endpoint": "https://agent.example/samp",
"capabilities": ["query", "push", "exec"]
}¶
The profile field contains the full SAMP Profile. The endpoint field contains the agent's SAMP endpoint URL. The capabilities array lists the PDU operations the agent supports.¶
Response payload (type: "discover", direction: "response"):¶
{
"state": "trusted",
"manager_version": "0.1",
"assigned_id": "agent-001"
}¶
The state field contains the manager-assigned trust state. The manager_version field contains the manager's SAMP version. The assigned_id field is optional and MAY be used when the manager assigns or overrides the agent identifier.¶
If assigned_id is present, the agent MUST use that value as agent_id in subsequent PDUs for this enrollment. The manager MUST bind the assigned identifier to the authenticated enrollment context and MUST NOT allow the reassignment to overwrite another enrolled identity.¶
If enrollment is rejected, the response payload contains:¶
{
"state": "rejected",
"reason": "profile_invalid"
}¶
Request payload:¶
{
"fields": ["system.status", "system.uptime", "model.primary"]
}¶
The fields array contains one or more dotted-path field identifiers from the agent's profile categories. The agent returns values for fields it supports and reports unknown_field for unsupported fields.¶
Response payload:¶
{
"values": {
"system.status": "operational",
"system.uptime": 86400
},
"unknown": ["model.primary"]
}¶
The values object contains the resolved field values. The unknown array lists requested fields that the agent does not expose. If all requested fields are unknown, the response is an error with code unknown_field.¶
Notification payload:¶
{
"event": "status_change",
"data": {
"old_status": "operational",
"new_status": "degraded"
},
"category": "system",
"severity": "warning",
"event_id": "d9df237c-f7cd-4fc8-b4e7-d35c676ad20f"
}¶
The event field is the event type. The data field is an arbitrary JSON object with event-specific content. The category field indicates the profile category the event relates to. The optional severity field is distinct from category and describes operational importance. The event_id field uniquely identifies the event. An optional correlation_id associates the event with an action, request, or state transition.¶
PUSH PDUs use direction: "notification". No response is expected unless the manager explicitly requests acknowledgment.¶
A PUSH event with event value "runtime_evidence" carries format-neutral evidence about an action, invocation, or state transition. Runtime evidence may also appear synchronously in a CONFIG or EXEC response when it gates the corresponding operation.¶
The runtime-evidence object contains:¶
The evidence issuer and SAMP sender are distinct roles. Transport authentication of the sender does not prove that the sender issued the verdict. Evidence-format profiles define issuer authentication and evidence validation.¶
An allow outcome with a processing_status other than verified MUST be treated as indeterminate. A manager MUST reject evidence whose correlation or freshness requirements do not match the relying context, regardless of evidence-format signature validity.¶
Pre-admission evidence that gates CONFIG or EXEC MUST be bound synchronously to that exchange. PUSH is suitable for post-execution evidence and independently generated notifications. On disagreement, the synchronous admission result controls the operation; subsequent evidence may inform a manager-controlled trust transition.¶
A manager MAY use validated runtime evidence as input to trust transitions. Evidence and recommended_action do not directly change trust state. Manager policy remains authoritative. The absence of expected evidence MUST NOT be interpreted as evidence of correct behaviour.¶
CCS receipts are one possible evidence-format binding. SAMP v0.1 neither requires CCS nor selects it as a preferred binding.¶
Request payload:¶
{
"event_types": ["status_change", "alert"],
"category": "system",
"ttl_seconds": 300
}¶
The event_types array filters the subscription to specific event types. An empty array or omitted field subscribes to all events in the specified category. The ttl_seconds field requests a subscription time-to-live.¶
Response payload:¶
{
"subscription_id": "sub-abc123",
"ttl_seconds": 300,
"renew_before": "2026-08-14T09:05:00Z"
}¶
Request payload:¶
{"subscription_id": "sub-abc123"}¶
Response payload:¶
{"cancelled": true}¶
Request payload:¶
{
"fields": {
"model.fallback": "kimi-k2.6",
"system.log_level": "debug"
},
"scope": "agent"
}¶
The fields object contains the configuration key-value pairs to apply. Keys are dotted-path identifiers. SAMP v0.1 defines only agent-wide scope. A session-scoped configuration requires a separately specified, transport-independent session model and is outside this document.¶
Response payload:¶
{
"applied": ["model.fallback", "system.log_level"],
"rejected": []
}¶
The applied array lists fields that were successfully changed. The rejected array lists fields that were rejected, with optional reasons:¶
{
"applied": ["system.log_level"],
"rejected": [
{"field": "model.fallback", "reason": "read_only"}
]
}¶
CONFIG is disabled unless explicitly supported by the agent profile and allowed by manager policy. The agent MUST validate each field against its profile-declared writable fields.¶
A response MAY include runtime_evidence as defined in Section 8.2.5. If manager policy requires pre-admission evidence, the agent MUST NOT apply the configuration before the required evidence has been synchronously validated.¶
Request payload:¶
{
"command": "session_reset",
"params": {
"session_id": "sess-001"
}
}¶
The command field names an executable operation from the agent's profile exec_policy.allowed_commands. The params object contains typed parameters matching the command's declared schema.¶
Response payload:¶
{
"result": "success",
"output": {
"reset": true
}
}¶
If the command is rejected, the response contains:¶
{
"result": "exec_disabled",
"detail": "EXEC is not enabled for this agent"
}¶
EXEC is disabled by default. It MUST be explicitly enabled per agent and per command in the profile. Parameters MUST have typed schemas; free-form arguments are not allowed.¶
A response MAY include runtime_evidence as defined in Section 8.2.5. If manager policy requires pre-admission evidence, the operation MUST NOT execute before the required evidence has been synchronously validated.¶
When an error occurs, the response PDU has direction: "error" and the payload contains an error object:¶
{
"version": "0.1",
"type": "query",
"direction": "error",
"agent_id": "agent-001",
"timestamp": "2026-08-14T09:00:01Z",
"request_id": "24f8587c-4c4b-4e41-9f47-222c0f5f8b8b",
"payload": {
"error": {
"code": "unknown_field",
"detail": "Field 'model.primary' is not exposed",
"timestamp": "2026-08-14T09:00:01Z"
}
}
}¶
The error payload object has the following fields:¶
| Field | Type | Presence | Description |
|---|---|---|---|
| code | string | Required | Error code (see Section 8.4) |
| detail | string | Optional | Human-readable error detail |
| timestamp | string | Required | UTC timestamp in RFC 3339 format |
The following error codes are defined for SAMP v0.1:¶
| Code | Description |
|---|---|
| malformed_pdu | The PDU is not valid JSON or is missing required envelope fields |
| unknown_type | The PDU type is not recognized |
| invalid_value | A field value is invalid (e.g., wrong type, out of range) |
| schema_mismatch | The payload does not match the expected schema for the PDU type |
| version_unsupported | The protocol version is not supported |
| profile_invalid | The profile is missing required fields or is otherwise invalid |
| auth_failed | Authentication failed (missing or invalid authentication tag) |
| replay_detected | The request_id was previously seen with different request content, or the PDU violates the replay-window policy |
| unknown_field | A requested field is not exposed by the agent |
| exec_disabled | EXEC is not enabled for this agent or command |
| config_disabled | CONFIG is not enabled for this agent |
| policy_denied | Manager policy denies the requested operation |
| rate_limited | The receiver is rate-limiting requests |
| back_pressure | The receiver is overloaded and cannot process the request |
| bootstrap_failed | Agent bootstrap or enrollment failed |
| internal_error | An internal error occurred on the receiver side |
When authentication is enabled, unknown fields remain covered by the PDU authentication tag even when their semantics are ignored. A future extension that requires rejection when unsupported must define an explicit critical-extension mechanism; none is defined in SAMP v0.1.¶
SAMP v0.1 uses shared-secret authentication with HMAC-SHA256 [RFC2104] [RFC6234].¶
SAMP distinguishes between:¶
When authentication is enabled:¶
SAMP v0.1 uses a shared secret per manager-agent pair. A deployment MAY assign an opaque key_id so that a receiver can select among locally configured secrets during manual rotation. A receiver MUST NOT silently fall back to an unrelated key when an unknown key_id is received. Automated key rotation and negotiation are not defined in v0.1.¶
Key distribution is out of band. Implementations SHOULD store shared secrets in a secrets manager, not in plaintext configuration files.¶
SAMP v0.1 uses the JSON Canonicalization Scheme (JCS) defined in [RFC8785] for computing HMAC authentication tags.¶
The auth_tag field contains the lowercase hex-encoded HMAC-SHA256 digest.¶
Example auth_tag value: a1b2c3d4e5f6... (64 hex characters).¶
SAMP does not apply Unicode normalization during authentication-tag generation or verification. JSON strings are preserved exactly as they appear in the PDU object. The sender MUST NOT modify or normalize JSON string values before applying JCS canonicalization. The receiver MUST NOT modify or normalize JSON string values before verifying the authentication tag.¶
Different Unicode code-point sequences produce different canonical bytes and therefore different HMAC authentication tags. If an implementation needs a specific normalization form (e.g., NFC) for application-level consistency, it MUST apply normalization before constructing the PDU object, not as an authentication step.¶
SAMP defines protocol semantics and message envelopes independently from the underlying transport.¶
SAMP v0.1 requires HTTP [RFC9110] as the baseline transport.¶
All SAMP PDUs are sent as HTTP POST requests with a JSON body containing the PDU envelope. Responses are returned in the HTTP response body.¶
For agent-to-manager PDUs (PING, DISCOVER, PUSH), the agent sends an HTTP POST to the manager's SAMP endpoint.¶
For manager-to-agent PDUs (QUERY, CONFIG, EXEC, SUBSCRIBE, UNSUBSCRIBE), the manager sends an HTTP POST to the agent's SAMP endpoint.¶
The Content-Type header MUST be application/json.¶
Implementations MAY choose any endpoint path. The agent's SAMP endpoint URL is advertised in the DISCOVER payload's endpoint field. The manager's SAMP endpoint URL is configured during agent bootstrap.¶
Recommended conventional paths: Manager: POST /samp (accepts all PDU types); Agent: POST /samp (accepts all PDU types).¶
SAMP uses HTTP status codes as follows:¶
| HTTP Status | Meaning |
|---|---|
| 200 OK | Successful request or response |
| 400 Bad Request | Malformed PDU or invalid JSON |
| 401 Unauthorized | Authentication failed |
| 403 Forbidden | Policy denied |
| 404 Not Found | Unknown agent or endpoint |
| 409 Conflict | Replay detected or state conflict |
| 429 Too Many Requests | Rate limited |
| 500 Internal Server Error | Internal error |
| 503 Service Unavailable | Back-pressure or overload |
The SAMP error envelope in the response body provides the precise error code. The HTTP status code is a transport-level indicator; the SAMP error code is authoritative.¶
WebSocket support is OPTIONAL in SAMP v0.1. WebSocket is primarily useful for:¶
When WebSocket is used:¶
WebSocket transport is NOT required for any conformance tier in v0.1.¶
Authentication requirements are unchanged by the WebSocket upgrade. If a connection carrying an active subscription is lost, the manager MUST re-establish the connection and re-subscribe unless both peers explicitly implement a persistence extension. Core v0.1 does not require event buffering or subscription persistence across reconnect.¶
Implementations MAY retry failed requests with exponential backoff. Retries of the same request MUST use the same request_id as the original attempt. The receiver SHOULD cache the request digest and the corresponding response for a limited time period.¶
The request digest is SHA-256 over the RFC 8785 canonical bytes of the PDU with the auth_tag field removed. This is the same canonicalization used for HMAC authentication (see Section 9.4), with the addition of a SHA-256 hash over the canonical bytes.¶
Non-idempotent operations, especially EXEC, SHOULD NOT be retried unless the receiver supports safe cached-response behavior for that operation type.¶
SAMP version 0.1 defines four conformance tiers:¶
All tiers MUST support:¶
Implementations claiming a conformance tier SHOULD be validated against a test suite covering:¶
A reference test suite is planned but not yet available. Implementers SHOULD publish interoperability test results.¶
SAMP v0.1 is designed for controlled environments. The following threats are identified:¶
A rogue manager could send unauthorized QUERY, CONFIG, or EXEC PDUs to an agent.¶
Mitigations in v0.1:¶
Future: Per-agent public key authentication and mTLS.¶
A rogue agent could announce itself with DISCOVER and provide false profile information.¶
Mitigations in v0.1:¶
Future: Signed profiles and certificate-based identity.¶
The shared secret used for HMAC authentication could be stolen.¶
Mitigations in v0.1:¶
Future: Per-agent public key authentication (Ed25519).¶
An attacker could capture and replay a valid PDU.¶
Mitigations in v0.1:¶
Limitations: Replay cache is in-memory in v0.1; persistence is future work. Cache size is implementation-defined.¶
An agent could advertise a profile with false capabilities or autonomy class to gain elevated permissions.¶
Mitigations in v0.1:¶
A manager with valid credentials could send unauthorized CONFIG or EXEC to an agent.¶
Mitigations in v0.1:¶
An operator could assume that a SAMP endpoint can enforce control independently when it actually shares the managed agent's process or failure domain. A compromised or failed agent could also suppress evidence when the evidence path depends on that same domain.¶
Mitigations in v0.1:¶
An attacker could attempt to force use of a weaker protocol version.¶
Mitigations in v0.1:¶
An agent could flood a manager with PUSH events or DISCOVER messages.¶
Mitigations in v0.1:¶
A rogue agent could attempt to overwrite or evict legitimate agent entries in the manager's registry.¶
Mitigations in v0.1:¶
Implementations SHOULD log all CONFIG and EXEC operations, including: Timestamp, Agent ID, Manager ID (if identifiable), Operation details (field changes, command, parameters), and Result (success/failure).¶
Audit logs SHOULD be tamper-evident and stored separately from the system being managed.¶
Managers and agents SHOULD implement rate limiting for incoming PDUs. Rate limiting MAY be applied per-agent, per-PDU-type, or globally. Excess requests SHOULD be rejected with rate_limited or back_pressure errors.¶
The initial trust establishment between a manager and an agent is a critical moment. SAMP v0.1 supports: Manual approval by the operator, Pre-shared enrollment tokens, and Public key thumbprint matching.¶
Future versions MAY support certificate-based enrollment and automated trust establishment.¶
Shared secrets SHOULD be rotated periodically. Rotation frequency is a deployment decision. Tokens SHOULD be stored in a secrets manager (e.g., HashiCorp Vault, AWS Secrets Manager) rather than plaintext files.¶
Token rotation in v0.1 requires out-of-band coordination between the manager and agent. Automated rotation is future work.¶
| Threat | v0.1 Mitigation | Future Enhancement |
|---|---|---|
| Rogue managers | Manager allow-list, HMAC | mTLS, per-agent keys |
| Rogue agents | Profile validation, enrollment | Signed profiles, cert identity |
| Credential theft | Secrets manager, rotation | Per-agent Ed25519 keys |
| Replay | request_id cache, timestamp | Persistent cache, sequence validation |
| Profile spoofing | Manager policy authoritative | Signed profiles |
| Unauthorized EXEC/CONFIG | Disabled by default, policy | RBAC, OPA integration |
| Version downgrade | Reject unsupported versions | Version negotiation |
| Flooding | Rate limiting, back-pressure | Flow-control protocol |
| Registry poisoning | Auth-required updates | Signed registrations |
| Failure-domain confusion | Deployment declarations, separated issuer and sender roles | Attestation and independently validated topology inventory |
SAMP profiles and query responses can expose sensitive information about an agent, including: Framework details and version, Model names and provider information, Configuration values, Active sessions, Tool availability, Memory backends, Operational state, and Uptime and availability patterns.¶
Managers and agents SHOULD minimize exposed fields. Profiles SHOULD include only fields necessary for management. QUERY responses SHOULD NOT include secrets, credentials, prompt contents, private user data, or tool outputs unless explicitly required and authorized.¶
PUSH events can contain operationally sensitive information, including: Status changes revealing operational patterns, Error details exposing internal architecture, Performance metrics revealing capacity or load, and Configuration changes revealing business logic.¶
Operators SHOULD classify and filter events before exporting them to telemetry, logging, or ticketing systems. Events containing user data MUST be handled according to applicable data protection regulations.¶
Runtime evidence may reveal action digests, policy decisions, verifier identities, or references to protected evidence stores. Evidence references MUST NOT embed reusable credentials. Managers MUST apply authorization and data-minimization policy before retrieving, storing, or exporting evidence.¶
Agents SHOULD expose the minimum profile data necessary for management. Managers SHOULD query only the fields they need. Bulk profile export or full-state queries SHOULD be restricted to authorized operators.¶
SAMP audit logs and event stores may contain sensitive operational data. Logs SHOULD be: Access-controlled, Retained according to a defined policy, Protected against tampering, and Sanitized before sharing or export.¶
SAMP deployments SHOULD place managers and agents on a dedicated management network or equivalent restricted trust boundary. Firewall rules SHOULD limit SAMP traffic to known managers and agents.¶
Agents SHOULD maintain an allow-list of authorized manager addresses. Managers SHOULD maintain an allow-list or pre-registration registry for expected agents.¶
SAMP v0.1 targets single-agent interactions. A single manager MAY manage multiple agents, but fleet-scale bulk operations are not defined in v0.1. Deployments needing fleet-scale operations SHOULD use external orchestration (e.g., scripts, configuration management) layered on top of SAMP.¶
Scaling approaches compatible with v0.1:¶
Federation, multi-manager conflict resolution, and transactional configuration are future work.¶
SAMP management traffic SHOULD itself be observable. Implementations SHOULD log: PDU counts and types, Error rates, Authentication failures, Latency metrics, and Agent registration and trust transitions.¶
This metadata MAY be exported to OpenTelemetry or similar observability systems.¶
This document requests the creation of a SAMP registry group under the "IANA Considerations" framework of [RFC8126].¶
Registry Name: SAMP PDU Types¶
Registration Policy: Specification Required¶
Expert Review Guidelines: The designated expert SHOULD verify that new PDU types include a clear name, description, payload schema, direction semantics, error handling, and security considerations.¶
Initial assignments:¶
| Value | Description | Reference |
|---|---|---|
| ping | Agent heartbeat | This document |
| discover | Agent self-announcement | This document |
| query | State query | This document |
| push | Asynchronous event notification | This document |
| subscribe | Event subscription | This document |
| unsubscribe | Cancel subscription | This document |
| config | Configuration change | This document |
| exec | Execute operation | This document |
Registry Name: SAMP Error Codes¶
Registration Policy: Specification Required¶
Expert Review Guidelines: The designated expert SHOULD verify that new error codes include a clear name, description, and handling guidance.¶
Initial assignments:¶
| Value | Description | Reference |
|---|---|---|
| malformed_pdu | Invalid JSON or missing required fields | This document |
| unknown_type | Unrecognized PDU type | This document |
| invalid_value | Invalid field value | This document |
| schema_mismatch | Payload schema validation failure | This document |
| version_unsupported | Unsupported protocol version | This document |
| profile_invalid | Invalid or incomplete profile | This document |
| auth_failed | Authentication failure | This document |
| replay_detected | Replay attack detected | This document |
| unknown_field | Unknown field requested | This document |
| exec_disabled | EXEC not enabled | This document |
| config_disabled | CONFIG not enabled | This document |
| policy_denied | Manager policy denies operation | This document |
| rate_limited | Rate limiting in effect | This document |
| back_pressure | Receiver overloaded | This document |
| bootstrap_failed | Enrollment/bootstrap failure | This document |
| internal_error | Internal receiver error | This document |
Registry Name: SAMP Autonomy Classes¶
Registration Policy: Specification Required¶
| Value | Description | Reference |
|---|---|---|
| advisory | Read-only observation only | This document |
| operational-readonly | Observation and self-configuration | This document |
| operational-write | Configuration allowed, limited execution | This document |
| critical-write | Configuration and execution under strict policy | This document |
Registry Name: SAMP Trust States¶
Registration Policy: Specification Required¶
| Value | Description | Reference |
|---|---|---|
| discovered | Agent announced, not yet evaluated | This document |
| pending | Manager awaiting trust decision | This document |
| trusted | Manager accepted agent | This document |
| quarantined | Isolated for observation | This document |
| rejected | Manager refused agent | This document |
| offline | Agent unreachable | This document |
| stale | Agent missed heartbeats beyond threshold | This document |
| revoked | Trust explicitly revoked | This document |
Registry Name: SAMP Profile Namespaces¶
Registration Policy: Specification Required¶
No initial assignments are made. The system category is defined in this document but is not a registry entry; it is a required profile category. Future profile namespaces (e.g., model, tools, memory) MAY be registered as implementations define them.¶
This document does NOT request a media type registration. SAMP PDUs use application/json [RFC8259] as the content type. A dedicated SAMP media type (e.g., application/samp+json) MAY be requested in a future version if warranted.¶
This section records implementation status for early review and will be removed before publication as an RFC.¶
At the time of writing, the following implementations exist:¶
The Python PoC authenticates raw request body bytes rather than RFC 8785 canonical JSON. This is a known deviation from the specification in this document. The PoC SHOULD be updated for interoperability.¶
SUBSCRIBE and UNSUBSCRIBE are defined in this specification but are not implemented in either the Rust or Python PoC as of the time of writing.¶
This initial draft leaves the following questions open:¶
The following items are definitively deferred for v0.1:¶
{
"agent_id": "selefkos-jr",
"name": "Selefkos Junior",
"agent_version": "2026.5.20",
"profile_version": "0.1",
"agent_type": "openclaw",
"autonomy_class": "operational-readonly",
"system": {
"status": "operational",
"uptime": 86400,
"version": "2026.5.20",
"last_seen": "2026-08-14T09:00:00Z"
},
"exec_policy": {
"enabled": false,
"allowed_commands": [],
"audit": true
},
"config_policy": {
"enabled": false,
"writable_fields": ["system.log_level", "model.fallback"],
"audit": true
},
"deployment": {
"endpoint_model": "sidecar",
"shared_process": false,
"shared_host": true,
"shared_failure_domain": true,
"management_path_survives_failure": true,
"evidence_path_survives_failure": true,
"independently_enforceable_operations": []
}
}
¶
agent_id = "selefkos-jr" name = "Selefkos Junior" agent_version = "2026.5.20" profile_version = "0.1" agent_type = "openclaw" autonomy_class = "operational-readonly" [system] status = "operational" uptime = 86400 version = "2026.5.20" last_seen = "2026-08-14T09:00:00Z" [model] primary = "glm-5.2" fallback = "kimi-k2.6" [exec_policy] enabled = false allowed_commands = [] cooldown = 60 max_per_minute = 5 audit = true [config_policy] enabled = false writable_fields = ["system.log_level", "model.fallback"] cooldown = 30 max_per_minute = 5 audit = true [deployment] endpoint_model = "sidecar" shared_process = false shared_host = true shared_failure_domain = true management_path_survives_failure = true evidence_path_survives_failure = true independently_enforceable_operations = []¶
Agent Manager
| |
|--- DISCOVER (request) ------->|
| {profile, endpoint, |
| capabilities} |
| |
|<-- DISCOVER (response) -------|
| {state: "trusted", |
| manager_version: "0.1"} |
| |
¶
Manager Agent
| |
|--- QUERY (request) ---------->|
| {fields: [ |
| "system.status", |
| "system.uptime"]} |
| |
|<-- QUERY (response) ---------|
| {values: { |
| "system.status": "ok", |
| "system.uptime": 3600}, |
| unknown: []} |
| |
¶
Manager Agent
| |
|--- SUBSCRIBE (request) ------>|
| {event_types: ["alert"], |
| category: "system", |
| ttl_seconds: 300} |
| |
|<-- SUBSCRIBE (response) ------|
| {subscription_id: "sub-1", |
| ttl_seconds: 300} |
| |
|<-- PUSH (notification) -------|
| {event: "alert", |
| subscription_id: "sub-1", |
| data: {...}} |
| |
|--- UNSUBSCRIBE (request) ---->|
| {subscription_id: "sub-1"} |
| |
|<-- UNSUBSCRIBE (response) ----|
| {cancelled: true} |
| |
¶
Manager Agent
| |
|--- CONFIG (request) --------->|
| {fields: { |
| "system.log_level": |
| "debug"}} |
| |
|<-- CONFIG (response) --------|
| {applied: [ |
| "system.log_level"], |
| rejected: []} |
¶
Manager Agent
| |
|--- EXEC (request) ---------->|
| {command: "session_reset",|
| params: {session_id: |
| "sess-001"}} |
| |
|<-- EXEC (error) -------------|
| {code: "exec_disabled", |
| message: "EXEC is not |
| enabled"} |
¶
Verifier/SAMP Endpoint Manager
| |
|--- PUSH (notification) ----->|
| {event: |
| "runtime_evidence", |
| event_id: "...", |
| data: { |
| issuer: "...", |
| phase: "post_execution",|
| policy_outcome: "deny", |
| processing_status: |
| "verified", |
| evidence_format: "...", |
| correlation: {...}, |
| freshness: {...}, |
| evidence: {...}}} |
¶
| Term | Definition |
|---|---|
| SAMP | Simple Agent Management Protocol |
| PDU | Protocol Data Unit |
| Manager | System that manages agents via SAMP |
| Agent | AI agent exposing a SAMP interface |
| Profile | Structured declaration of agent identity and capabilities |
| Trust State | Manager-assigned state for an agent |
| Autonomy Class | Advisory risk classification for an agent |
| Enrollment | Process of evaluating and accepting an agent |
| Conformance Tier | Level of protocol support claimed by an implementation |