R-Think

Artifacts

Artifacts are the persistent records produced by reasoning execution. They include traces, evidence, metrics, and validation results. Every step in the cognitive cycle must produce an artifact or evidence according to the mission's adaptive depth.

Artifact Types

R-Think provides several built-in artifact types:

  • Trace — A step-by-step record of the reasoning execution.
  • Evidence — The data and metadata that support each decision.
  • Metrics — Performance and quality metrics for each step.
  • Validation — Records of all validation checks performed.

Capturing Artifacts

Artifacts are captured automatically during mission execution. You can configure which artifacts to capture using the artifact configuration on the mission.

artifacts.ts typescript
import { Runtime, Protocol, Rule, Artifact } from '@r-think/core';

const mission = Runtime.create({
  protocol,
  rules: [Rule.required('observation')],
  artifacts: [
    Artifact.trace({ includeInput: true, includeOutput: true }),
    Artifact.evidence({ store: 'local' }),
    Artifact.metrics({ includeTiming: true })
  ]
});

const result = await mission.execute(input);

console.log(result.trace.steps);     // Step-by-step execution record
console.log(result.evidence);        // Evidence records
console.log(result.metrics);         // Timing and quality metrics

Artifact Storage

Artifacts can be stored in memory, written to files, or persisted to external storage. Use artifact adapters to customize storage behavior without changing the runtime.