AnyaSelf Docs

Artifacts & Audit

Mission plan generation, transcripts, browser recordings, and immutable audit trail.

The artifacts-audit service is the central intake for mission artifacts, browser session recordings, and the immutable audit event trail. It generates deterministic plans, aggregates transcripts, and maintains a chronological ledger of high-value system events.

Endpoints

Artifact Generation

MethodPathDescription
POST/api/v1/households/{id}/artifacts/mission-planGenerate a structured mission plan
POST/api/v1/households/{id}/artifacts/outcome-summaryGenerate a mission outcome summary
POST/api/v1/households/{id}/artifacts/recordingRegister browser recording metadata
POST/api/v1/households/{id}/artifacts/transcriptAggregate a conversation transcript

Artifact Retrieval

MethodPathDescription
GET/api/v1/households/{id}/artifacts/{artifactId}Get a specific artifact
GET/api/v1/households/{id}/missions/{mId}/artifactsList artifacts for a mission (filter: artifact_type)

Audit Events

MethodPathDescription
POST/api/v1/households/{id}/audit/eventsAppend an immutable audit event
GET/api/v1/households/{id}/missions/{mId}/auditGet audit trail (params: limit, offset)

Artifact Types

TypeDescriptionData Shape
MissionPlanDeterministic execution plangoal, constraints, steps, toolCallsExpected, stopConditions, assumptions
OutcomeSummaryPost-mission structured outcomefinalState, totalTurns, toolCallsMade, keyDecisions, resultItems
BrowserRecordingHyperbeam session recordingsessionId, storagePath, signedUrl, durationSeconds, actionLog
TranscriptAggregated voice + text historymissionId, entries[], totalMessages, hasVoice
AuditLogInternal audit log artifactevent data

Generate Mission Plan

// POST /households/{id}/artifacts/mission-plan
{
  "missionId": "msn_123",
  "missionType": "STYLE",
  "goal": "Find a casual spring outfit under $200",
  "constraints": { "maxPrice": 200, "season": "SPRING" },
  "contextData": { "wardrobeItemCount": 12 }
}

Audit Event Model

Every audit event is an immutable ledger entry with severity classification:

// POST /households/{id}/audit/events
{
  "missionId": "msn_123",
  "category": "PURCHASE_GATE",
  "severity": "CRITICAL",
  "action": "USER_APPROVED_PURCHASE",
  "detail": { "requestId": "req_456", "amount": 250 },
  "sourceService": "api-gateway"
}

Event Categories:

CategoryDescription
MISSION_LIFECYCLEMission created, completed, failed
TOOL_CALLAgent tool execution (wardrobe, commerce, etc.)
PURCHASE_GATEApproval, intent creation, checkout confirmation
SAFETY_VIOLATIONPolicy or safety rule breach
USER_ACTIONExplicit user actions (likes, takeover, etc.)
SESSION_EVENTHyperbeam session state changes
DATA_ACCESSReads of sensitive household data
SYSTEMInternal system events

Severity Levels: INFO | WARNING | CRITICAL

Configuration

VariableDefaultDescription
PERSISTENCE_BACKENDinmemoryfirestore or inmemory
ARTIFACT_STORAGE_BACKENDlocalgcs or local
ARTIFACT_LOCAL_DIR/tmp/anyaself-artifactsLocal artifact storage path
ORCHESTRATOR_BASE_URLhttp://orchestrator:8003/api/v1For cross-references
INTERNAL_API_TOKENdev-internal-tokenInternal service token

On this page