Artifacts
Artifacts are the persistent records produced by reasoning execution. They include traces, evidence, metrics, and validation results.
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 protocol execution. You can configure which artifacts to capture using the artifact configuration.
artifacts.ts typescript
import { Runtime, Artifact } from '@r-think/core';
const runtime = Runtime.create({
protocol,
artifacts: [
Artifact.trace({ includeInput: true, includeOutput: true }),
Artifact.evidence({ store: 's3://evidence-bucket' }),
Artifact.metrics({ includeTiming: true })
]
});
const result = await runtime.execute(input);
// Access artifacts
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.