Skip to content

Documentation / @agentick/core / ContextMetrics

Interface: ContextMetrics ​

Defined in: kernel/src/context.ts:130

Metrics accumulated during procedure execution.

Metrics are automatically propagated from child procedures to parents when execution completes.

Example ​

typescript
// In a procedure
addMetric(ctx, 'tokens.input', 100);
addMetric(ctx, 'api_calls', 1);

// After execution, parent has accumulated metrics
const totalTokens = ctx.metrics['tokens.input'];

See ​

Extends ​

  • Record<string, any>

Extended by ​

Indexable ​

[key: string]: any

Released under the ISC License.