Concepts
Artifacts
EDM artifacts come in two forms: stateless for ephemeral session context, and persistent for sovereign, governed emotional records. Understanding when to use each is fundamental to building compliant emotional AI systems.
Two Artifact Modes
Every extraction produces an EDM artifact with 96 fields across 10 domains. How that artifact is used depends on whether you need session coherence or permanent governance.
Stateless
Ephemeral artifacts for session coherence. No identity binding, no permanent storage, no governance trail. Used to maintain emotional context within a conversation without creating permanent records.
- Session-scoped emotional memory
- No PII stored or transmitted
- Cannot be sealed or certified
- Expires with session
Persistent
Sovereign artifacts sealed into .ddna envelopes. Cryptographically signed, identity-bound, and governed by consent. Creates an immutable record that can be verified, shared, and audited.
- Cryptographic integrity (W3C Data Integrity)
- Consent-bound via VitaPass or authority
- Verifiable certificate trail
- Subject-controlled retention
When to Use Each
The choice between stateless and persistent depends on your jurisdiction, data storage requirements, and whether emotional context needs to survive beyond the current session.
| Use Case | Mode | Rationale |
|---|---|---|
| Chatbot emotional coherence | Stateless | Session context only, no need for permanent record |
| Therapy session notes | Persistent | Clinical record, consent required, HIPAA governance |
| Anonymous feedback analysis | Stateless | No identity binding needed, aggregate insights only |
| Employee wellness check-in | Persistent | Longitudinal tracking, consent-based, audit trail |
| Real-time sentiment routing | Stateless | Routing decision only, no storage requirement |
| Legal testimony archive | Persistent | Evidence integrity, chain of custody, verification |
Jurisdiction matters: Some jurisdictions require explicit consent for any emotional data processing. When in doubt, use stateless mode and upgrade to persistent only when consent is obtained.
Code Examples
Both paths start with the same extraction. The difference is what you do with the artifact.
Stateless Path
Extract and convert to stateless mode. Use within session, discard after.
// 1. Extract the artifact
const response = await fetch("https://www.deepadata.com/api/v1/extract", {
method: "POST",
headers: {
"Authorization": "Bearer dda_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
content: "User expressed frustration about the delayed response...",
jurisdiction: "GDPR",
consent_basis: "none", // No consent needed for stateless
}),
});
const { data } = await response.json();
const artifact = data.artifact;
// 2. Convert to stateless (strips identity-sensitive fields)
const stateless = {
...artifact,
milky_way: {
...artifact.milky_way,
location_context: null,
associated_people: [],
},
gravity: {
...artifact.gravity,
recall_triggers: [],
},
meta: {
...artifact.meta,
stateless: true,
},
};
// 3. Use within session for context
// Store in session memory, pass to LLM, etc.
// Artifact expires when session ends - no sealing possiblePersistent Path
Extract, validate, and seal into a governed .ddna envelope.
// 1. Extract with consent basis
const extractResponse = await fetch("https://www.deepadata.com/api/v1/extract", {
method: "POST",
headers: {
"Authorization": "Bearer dda_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
content: "Client discussed progress with anxiety management...",
jurisdiction: "HIPAA",
consent_basis: "consent", // Explicit consent obtained
}),
});
const { data: extractData } = await extractResponse.json();
const artifact = extractData.artifact;
// 2. Validate before sealing
const validateResponse = await fetch("https://www.deepadata.com/api/v1/validate", {
method: "POST",
headers: {
"Authorization": "Bearer dda_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ artifact }),
});
const { data: validateData } = await validateResponse.json();
if (!validateData.valid) {
throw new Error("Artifact validation failed");
}
// 3. Seal into .ddna envelope
const sealResponse = await fetch("https://www.deepadata.com/api/v1/issue", {
method: "POST",
headers: {
"Authorization": "Bearer dda_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
artifact,
pathway: "subject", // Subject-initiated sealing
authority: "user:vp_12345", // VitaPass ID or user reference
}),
});
const { data: sealData } = await sealResponse.json();
// Result: Cryptographically signed, verifiable, governed
console.log("Envelope ID:", sealData.envelope.id);
console.log("Certificate ID:", sealData.certificate_id);
console.log("Verification URL:", sealData.verification_url);Stateless Artifact Structure
Stateless artifacts retain emotional structure but strip identity-binding fields. The meta.stateless flag indicates the artifact cannot be sealed.
Preserved Fields
- • constellation (emotions, valence)
- • core (intensity, themes)
- • impulse (behavioral patterns)
- • telemetry (confidence scores)
- • system (processing metadata)
Stripped Fields
- • milky_way.location_context → null
- • milky_way.associated_people → []
- • gravity.recall_triggers → []
- • governance.data_controller → null
- • crosswalks (external references) →
Persistent Envelope Structure
A sealed .ddna envelope wraps the artifact with cryptographic proof and governance metadata.
{
"@context": ["https://www.w3.org/ns/credentials/v2", "https://deepadata.com/ns/edm/v0.5.0"],
"type": ["VerifiableCredential", "EmotionalDataEnvelope"],
"id": "urn:ddna:envelope:abc123",
"issuer": "did:web:deepadata.com",
"validFrom": "2024-01-15T10:30:00Z",
"credentialSubject": {
"id": "urn:ddna:subject:user_12345",
"artifact": { /* Full EDM artifact */ }
},
"proof": {
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"verificationMethod": "did:web:deepadata.com#key-1",
"proofPurpose": "assertionMethod",
"proofValue": "z3FXQje..."
}
}The envelope can be verified independently using the DeepaData registry or any W3C Data Integrity-compatible verifier. The proof ensures the artifact has not been modified since sealing.