Status: draft, reference-implementation-driven
This document defines Dina as a protocol rather than a single product implementation.
The goal is:
This document is intentionally broader than the current Go/Python/TypeScript reference implementation. Where the implementation already behaves consistently, the document is normative. Where the implementation still contains multiple active profiles or migration-era behavior, the document calls that out explicitly so the protocol can be frozen cleanly later.
Dina the product is a sovereign personal AI.
Dina the protocol is the standard for how humans and their software:
This protocol is not only a wire format. It is a layered interoperability contract.
The protocol exists so that:
This protocol is grounded in the interaction architecture already defined for Dina:
Those documents answer:
This protocol document answers a different question:
The keywords MUST, SHOULD, MAY, MUST NOT, and SHOULD NOT are used in the RFC sense.
This document distinguishes:
The Dina protocol should be strict only where interoperability actually requires strictness.
Its shape is:
The core protocol should freeze only the pieces that must be identical across implementations:
Everything else should remain profile-based or extensible.
Profiles are named bundles of additional behavior on top of the core protocol.
Examples include:
Profiles allow an implementation to be fully Dina-compatible without pretending to support every optional behavior.
The protocol SHOULD allow growth through explicit extension points.
Extensions SHOULD be:
Unknown optional extensions MUST NOT cause protocol failure by themselves.
Failure should occur only when:
Conforming implementations SHOULD support both:
Static capability advertisement answers:
Live capability negotiation answers:
At minimum, a capability advertisement SHOULD declare:
Capability advertisement MAY be published through:
The protocol should standardize the semantics of capability discovery, not require one single UI or deployment shape.
Draft machine-readable artifacts for this layer live in:
schemas/capability-advertisement.jsonschemas/capability-negotiation.jsonLive negotiation SHOULD choose, for a given interaction:
Two Dina-compatible implementations MUST be able to fall back to their common subset whenever possible.
An implementation MUST be able to say:
without forcing the remote side to guess.
Dina has six core protocol layers and one cross-cutting interoperability layer.
The first six are the infrastructure core.
The seventh is the application interoperability layer that makes all higher-level scenarios portable across implementations.
The protocol recognizes the following principal types:
The protocol also recognizes the following counterparty classes:
These matter because the same user request may route through different fulfillment topologies while preserving the same external contract.
Every conforming implementation SHOULD also expose enough capability metadata for another Dina-compatible implementation to determine:
Identity defines who a sovereign participant is and how other implementations recognize that participant.
A Dina-compatible identity system MUST define:
The intended Dina identity model is:
The Dina-specific HD namespace is:
m/9999'/0'/... root identity signingm/9999'/1'/... persona and sub-identity signingm/9999'/2'/... PLC recovery / rotationm/9999'/3'/... service-to-service authenticationThis prevents collision with wallet ecosystems such as BIP-44.
The current Dina reference implementation already uses:
m/9999'/...Concrete derivation paths in the current implementation include:
m/9999'/0'/0' root signing generation 0m/9999'/0'/<generation>' subsequent root signing generationsm/9999'/1'/<personaIndex>'/<generation>' persona signingm/9999'/2'/<generation>' PLC recovery / rotationm/9999'/3'/<serviceIndex>' service authenticationA Dina-compatible Home Node SHOULD expose a did:plc identity.
Device and service principals MAY use:
did:keydid:plcdid:webThe current reference implementation accepts all three DID prefixes at the domain layer, while using did:plc as the primary Home Node identity and did:key for CLI device identities.
A Dina-compatible DID document SHOULD expose:
The reference implementation currently uses:
0xed01 multicodec prefixDinaMsgBoxHome Node identities MUST support key rotation.
For did:plc, rotation SHOULD be driven through a recovery key distinct from the root signing key.
The current reference implementation derives PLC recovery keys from the dedicated m/9999'/2'/... subtree and supports PDS/PLC-backed DID lifecycle operations.
The reference implementation currently has an unresolved identity-root question:
Before Dina Protocol 1.0 is frozen, the protocol MUST standardize one root key material profile for downstream derivation.
Recommended direction:
Authentication defines how a participant proves who it is.
A Dina-compatible authentication profile MUST support signed requests using Ed25519.
The canonical signing payload is:
METHOD
PATH
QUERY
TIMESTAMP
NONCE
SHA256_HEX(BODY)
The current reference implementation signs exactly this payload.
A draft normalized schema for signed-request interoperability lives in:
schemas/auth-envelope.jsonA signed HTTP request SHOULD carry:
X-DIDX-TimestampX-NonceX-SignatureX-Signature is the Ed25519 signature over the canonical payload.
A conforming implementation MUST protect against replay.
The reference implementation currently enforces:
A Dina-compatible Home Node SHOULD support device pairing as a bootstrap flow.
The reference implementation currently uses:
Pairing MAY result in either:
Internal or peer services MAY authenticate with distinct service Ed25519 keypairs.
This is already present in the reference implementation for Core-to-Brain and similar service paths.
The Dina protocol recognizes at least these auth modes:
The protocol SHOULD treat signature-based authentication as the primary interoperable profile.
Paired bearer tokens are acceptable as a bootstrap or compatibility profile, but SHOULD NOT be the normative long-term cross-implementation trust model.
A Dina-compatible implementation SHOULD propagate caller context containing at least:
This becomes important for:
Encrypted Storage defines how personal data is protected and made portable across implementations.
A Dina-compatible storage system MUST provide:
The protocol persona tiers are:
defaultstandardsensitivelockedThese tiers are already present in the reference implementation.
Expected semantics:
default: always open, minimal frictionstandard: open by policy, agent access requires scoped grantssensitive: closed by default, requires approvallocked: passphrase or explicit unlock, agent access denied or highly restrictedA Dina-compatible Home Node SHOULD use an encrypted SQL store per persona.
The reference implementation uses SQLCipher-backed SQLite databases, one per persona, with encrypted-at-rest FTS and embedding storage.
A Dina-compatible vault item model MUST be able to express:
The reference implementation's persona schema currently includes logical fields such as:
idtypesourcesource_idcontact_didsummarybodymetadatatagstimestampcreated_atupdated_atsendersender_trustsource_typeconfidenceretrieval_policycontent_l0content_l1The protocol SHOULD freeze the logical schema, not the exact SQL DDL.
The protocol SHOULD support:
The reference implementation currently provides:
Important storage rule:
Base Dina storage interoperability is logical, not file-format-level.
At minimum, conforming implementations MUST support:
Implementations MUST NOT create silent plaintext backups as a side effect of normal backup or migration.
Safe profiles therefore separate:
The current implementation has more than one active DEK derivation style:
dina:vault:<persona>:v1 with a user saltdina:persona:<name>:dek:vN with deterministic persona-scoped saltThis matters only if the protocol wants to guarantee one of the following:
Those guarantees are useful, but they are not required for base Dina interoperability.
Therefore Protocol 1.0 MAY defer canonical DEK derivation at the core layer, provided it freezes:
If an encrypted vault portability profile is later standardized, it SHOULD define:
Agent Safety defines how agents interact with personal data and external systems without collapsing user sovereignty.
A Dina-compatible safety layer MUST provide:
The reference implementation already models:
An interoperable session model SHOULD include:
idnameagent_didstatuscreated_atlast_activity_atended_atAn interoperable access grant SHOULD include:
idclient_didpersona_idsession_idscopeexpires_atgranted_byreasonGrant scopes SHOULD at least distinguish:
An approval request MUST be portable across implementations.
Minimum approval fields SHOULD include:
idtypeclient_didpersona_idsession_idactionscopestatusreasonpreviewgranted_byexpires_atcreated_atupdated_atThe reference implementation already exposes this shape.
A draft machine-readable schema for this contract lives in:
schemas/approval-request.jsonApproval types currently include:
persona_accessaction_intentA Dina-compatible agent safety layer MUST require agents to declare intent.
The current reference intent model is:
agent_didactiontargetpersona_idtrust_levelconstraintsThe current reference decision model is:
allowedreasonauditA draft machine-readable schema for executor intent declaration lives in:
schemas/agent-intent.jsonAt protocol level, Dina safety has four core principles:
The reference gatekeeper already treats actions such as:
send_emailtransfer_moneyshare_dataas risky actions that require explicit user review.
A Dina-compatible implementation MUST support PII scrubbing before cloud or third-party egress.
The reference implementation currently provides:
The protocol SHOULD allow additional tiers, but MUST preserve the contract that scrubbed text can be safely passed onward and later rehydrated only within an authorized local context.
Every approval, denial, sensitive access, or denied egress SHOULD be auditable.
This is already present in the reference implementation and should remain a required interoperability expectation for serious implementations.
D2D defines how two sovereign identities coordinate securely.
It is not just a transport channel. It is a policy-aware, trust-aware coordination layer between two human-centered systems.
A Dina-compatible D2D layer MUST provide:
The reference implementation currently uses:
The current transport wrapper is effectively:
{
"c": "<base64 ciphertext>",
"s": "<hex ed25519 signature over plaintext>"
}
The plaintext message model is currently:
{
"id": "msg-123",
"type": "coordination.request",
"from": "did:plc:sender",
"to": ["did:plc:recipient"],
"created_time": 1710000000,
"body": { ... }
}
The current Dina D2D v1 families are:
presence.signalcoordination.requestcoordination.responsesocial.updatesafety.alerttrust.vouch.requesttrust.vouch.responseThese are the transport-level v1 families the current implementation accepts as its strict D2D surface.
The current scenario policy model is:
standing_policyexplicit_oncedeny_by_defaultDefault scenario families in the reference implementation currently map roughly to:
safety.alert is treated as a special always-pass inbound case.
D2D interoperability requires more than cryptography.
It also requires:
The reference implementation already models:
This is critical for person-to-person interoperability because "can I reach this Dina" and "what may I disclose to this Dina" are different questions.
A conforming implementation SHOULD support durable offline delivery.
The reference implementation already has:
Outbox states currently include:
pendingpending_approvalsendingdeliveredfailedA D2D implementation MUST reject replayed messages.
The reference implementation uses senderDID|messageID replay tracking and verifies inbound signatures against resolved verification methods.
This is where interaction learnings materially expand the protocol.
A remote Dina is not just a mailbox. It may act as an orchestrator.
Therefore the protocol MUST allow the following D2D fulfillment patterns:
Example:
For this reason, D2D interop SHOULD standardize a generic request-state plane.
Recommended request modes are:
inline_preferredasyncsubscriptionRecommended lifecycle states are:
acceptedwaiting_approvalwaiting_inputrunningpartialcompletedfailedcancelledexpiredRequired fields in a generic D2D request-state object SHOULD include:
request_idcorrelation_idrequested_capabilityresponse_modestatuscreated_atupdated_atOptional fields SHOULD include:
resulterrorretryableprogresspercentetaexpires_atprovenancerequires_humannext_actionSupport for request modes, lifecycle states, and optional fields SHOULD be advertised through the capability discovery layer so that remote peers know the highest common lifecycle they can use.
The current v1 transport families do not yet fully freeze this generic request-state plane. That is an open standardization task before Protocol 1.0.
Draft machine-readable artifacts for D2D interop live in:
schemas/d2d-envelope.jsonschemas/capability-advertisement.jsonschemas/capability-negotiation.jsonTrust defines how Dina-compatible systems publish verifiable outcomes and query world trust.
A Dina-compatible trust layer MUST support:
The intended Dina trust write model is:
The current reference implementation already has:
did:plc-backed repo writesThe protocol trust namespace is com.dina.trust.*.
The current broader design already includes a large set of collections, including families such as:
The protocol MUST freeze at least a minimal required subset for 1.0.
Recommended minimal core subset:
com.dina.trust.attestationcom.dina.trust.vouchcom.dina.trust.flagcom.dina.trust.revocationcom.dina.trust.verificationA Dina-compatible AppView SHOULD expose read-side queries for:
The reference implementation already exposes local Home Node handlers that proxy profile resolve and search to an AppView.
The protocol MUST separate:
Write interoperability requires a stable record namespace and shape.
Read interoperability requires that a trust profile can at least expose:
Exact scoring algorithms, including EigenTrust-style convergence, SHOULD be published as profile definitions rather than assumed to be globally frozen at the protocol core.
The Trust Network MUST NOT become a backdoor for private vault disclosure.
Only explicitly publishable, signed, public trust records belong in the trust layer.
This is the missing interoperability layer most systems ignore.
Without it, two implementations may share identity, auth, D2D, and trust but still fail to behave similarly from the user's point of view.
The Interaction Contract layer standardizes:
The protocol SHOULD standardize semantic operation types, not command spellings.
The registry itself is already part of the protocol design. The remaining 1.0 work is to freeze:
Implementations SHOULD advertise their supported semantic operations through the capability discovery layer rather than forcing remote peers to infer them from product-specific UI or command names.
Recommended primary semantic operations are:
remember_contextanswer_nowpropose_plancommunicate_personrequest_servicedelegate_taskwatch_conditionControl operations:
approve_operationinspect_statusmodify_existingcancel_operationrecover_operationResource operations:
manage_contactmanage_configmanage_devicemanage_sessioninspect_auditTrust operations:
query_trustpublish_reviewpublish_vouchpublish_flagOutbound delivery operations:
deliver_briefingdeliver_alertdeliver_updatedeliver_completiondeliver_failurerequest_clarificationescalate_attentionThese are protocol semantics, not command names.
One implementation might expose:
/ask/plan/send/requestAnother might expose:
/query/advise/message/serviceAnother might expose no slash commands at all and use only buttons, forms, or plain language.
All of them remain interoperable if they preserve the same semantic contracts.
The interaction protocol is not only human -> Dina.
It must also standardize when Dina speaks to the human without a fresh inbound command.
At minimum, a conforming implementation SHOULD support these proactive delivery semantics:
deliver_briefing: aggregated, priority-ranked summarydeliver_alert: immediate fiduciary or harm-preventing noticedeliver_update: non-terminal progress or state changedeliver_completion: solicited work reached a useful terminal pointdeliver_failure: solicited work failed or became invalidrequest_clarification: Dina cannot proceed safely without more inputescalate_attention: a previously lower-priority item now requires interruptionThese are semantic contracts, not UI prescriptions.
One implementation may show a push notification.
Another may add a notification center item.
Another may surface the item only in a daily briefing.
The current Dina reference product maps its external command surface approximately as follows:
/remember -> remember_context/ask -> answer_now/plan -> propose_plan/send -> communicate_person/request -> request_service/task -> delegate_task/watch -> watch_condition/approve -> approve_operation/status -> inspect_status/edit -> modify_existing/cancel -> cancel_operation/recover -> recover_operationResource examples:
/contact ... -> manage_contact/config ... -> manage_config/device ... -> manage_device/session ... -> manage_session/audit ... -> inspect_auditTrust examples:
/trust -> query_trust/review -> publish_review/vouch -> publish_vouch/flag -> publish_flagThis mapping is explicitly non-normative.
This is the key interaction rule:
Examples:
answer_now operation may internally decompose into answer_now + request_service + propose_plan + context_resolutionpropose_plan operation may internally decompose into answer_now + compare + synthesizedelegate_task operation may internally decompose into propose_plan + answer_now + request_service + watch_conditionwatch_condition operation may internally decompose into request_service + subscribe + status_trackingThis rule is required to handle real scenarios such as:
The protocol SHOULD model interactions as frames, not isolated stateless turns.
An interaction frame SHOULD carry at least:
Follow-up turns SHOULD remain within the existing outer contract unless the user clearly pivots.
Examples:
The interaction protocol SHOULD distinguish:
This distinction matters because:
communicate_person is different from request_serviceThe interaction protocol SHOULD treat persona scope as part of routing, not merely storage.
At minimum, a conforming implementation SHOULD evaluate:
This is necessary for interoperable governance because:
Before fulfillment, a Dina-compatible implementation SHOULD resolve:
This is what allows phrases like:
to become structured interoperable requests.
The interaction protocol SHOULD also standardize how work completion and failure are surfaced back to the human.
At minimum, implementations should distinguish:
This is the outbound half of Silence First.
The response layer SHOULD support a portable envelope with a small, typed set of response kinds:
summarylisttablecomparisonstatuserrorrawThis is not just UI polish. It is part of protocol interoperability because agents, Dinas, bridges, and clients need a stable result contract.
At minimum, the response envelope SHOULD freeze these core fields:
schema_versiontypetitletextdatametaThe response layer SHOULD also remain explicitly extensible. A conforming envelope MAY include:
annotationsdisclosuresextensionsThis is important because different Dina-compatible ecosystems may allow different downstream behaviors while still remaining interoperable.
Examples:
The protocol should require that such additions be explicit and machine-readable rather than hidden inside arbitrary text.
A draft machine-readable schema for this contract lives in:
schemas/response-envelope.jsonImplementations SHOULD advertise supported response kinds, envelope versions, and extension namespaces through the capability discovery layer.
Email, chat apps, and provider APIs remain important, but they are not the same thing as Dina-to-Dina communication.
The interaction protocol therefore distinguishes:
This preserves the qualitative difference between:
without requiring every implementation to expose those differences through the same UI.
Not every implementation must implement every layer.
The protocol SHOULD define conformance profiles.
Implementations SHOULD advertise their supported profile identifiers through the capability discovery layer.
Implements:
This is the fullest Dina implementation.
Implements:
May delegate storage and D2D authority to a Home Node.
Implements:
May act only through a Home Node and does not own Dina identity or vault authority.
The protocol SHOULD be explicit about what it means for an agent to be Dina-protocol-compliant.
Not every agent that can call a Dina endpoint is Dina-protocol-compliant.
At minimum, the protocol distinguishes:
agent-executor profileconsumes or produces supported interaction semantics through a Home Node
Dina-aware agent
is integration-capable, not protocol-conformant
Sovereign Dina implementation
home-node, provider-dina, or mobile-home-nodeAn agent therefore SHOULD NOT be described simply as \"Dina-compatible\" without a profile qualifier.
Recommended language is:
This avoids conflating:
To claim the agent-executor profile, an agent implementation SHOULD at minimum:
agent-executor profile through capability discoveryAn agent executor MAY be narrow.
For example, an implementation may legitimately support only:
delegate_taskanswer_nowrequest_servicestatusprovided it advertises that subset honestly and negotiates against the remote common subset.
Implements:
May satisfy requests through direct lookup, internal tools, or delegated execution.
Implements:
Does not need to implement vault storage or agent safety.
Implements:
communicate_person, request_service, and watch_condition semanticsThis preserves interoperability without making bridges the protocol center.
Implements:
Delegates to hosted infrastructure:
This profile enables zero-cost sovereign operation
on a mobile device with no user-managed server.
The protocol should be judged against scenario families, not only transport primitives.
Pattern:
answer_now or propose_planPattern:
Example:
Pattern:
Example:
Pattern:
Example:
Pattern:
Pattern:
Example:
Pattern:
deliver_briefingdeliver_alertdeliver_completiondeliver_failureExamples:
Pattern:
answer_now or propose_planExample:
Pattern:
publish_review, publish_vouch, or publish_flagAt protocol level, Dina aims to guarantee:
These should be resolved before calling the core protocol frozen:
recommended 1.0 choice: 24-word BIP-39 mnemonic as recovery secret,
PBKDF2-expanded BIP-39 seed as canonical root key material,
with SLIP-0010 downstream derivation from that seed
D2D generic request-state plane
recommended 1.0 choice: request modes inline_preferred, async, subscription;
lifecycle states accepted, waiting_approval, waiting_input, running,
partial, completed, failed, cancelled, expired;
required fields request_id, correlation_id, requested_capability,
response_mode, status, created_at, updated_at
Trust core collection subset
recommended 1.0 choice: com.dina.trust.attestation,
com.dina.trust.vouch, com.dina.trust.flag,
com.dina.trust.revocation, com.dina.trust.verification
Capability discovery and negotiation
recommended 1.0 choice: static capability advertisement plus live negotiation,
with profile identifiers at least for home-node, device, agent-executor,
provider-dina, trust-appview, bridge, and mobile-home-node
Interaction operation registry
recommended 1.0 choice: freeze semantic names and contracts for
remember_context, answer_now, propose_plan, communicate_person,
request_service, delegate_task, watch_condition, approve_operation,
inspect_status, modify_existing, cancel_operation, recover_operation,
deliver_briefing, deliver_alert, deliver_update, deliver_completion,
deliver_failure, request_clarification, escalate_attention
Response envelope schema
summary, list, table,comparison, status, error, raw; required envelope fieldsschema_version, type, text, data; optional standardized fieldstitle, meta, annotations, disclosures, extensionsThese affect optional profiles, not base protocol interoperability:
otherwise keep logical export/import as the required storage portability contract
Mobile storage profile
When this protocol is implemented correctly:
com.dina.trust.* can serve trust for any Dina-compatible identityThat is the transition from product to infrastructure.
The current Dina codebase already provides substantial pieces of this protocol:
m/9999' identity derivationdid:plc and did:key usageThe protocol document is therefore not speculative. It is extracted from a real system, while also identifying the exact points where the system still needs one canonical choice before the protocol can be declared stable.