Use composable middleware behaviors for provider/tool execution: retry, caching, timeout, telemetry, and budget guards.
Scanned 6/5/2026
Install via CLI
openskills install tuanle96/agent-harness-kit---
name: middleware-pipeline
description: >-
Use composable middleware behaviors for provider/tool execution: retry, caching, timeout, telemetry, and budget guards.
allowed-tools: Read, Bash(node .harness/scripts/middleware-demo.mjs:*)
suggested-turns: 5
---
# Middleware Pipeline
Provides five composable behaviors via `src/core/middleware/pipeline.mjs`:
- `withRetry()`
- `withCaching()`
- `withTimeout()`
- `withTelemetry()`
- `withBudget()`
## Example
```js
const run = composeMiddleware(baseRun, [
withTelemetry({ sink }),
withBudget({ maxInputTokens: 100000 }),
withTimeout({ ms: 30000 }),
withRetry({ attempts: 2 }),
withCaching(),
]);
```
## Smoke test
```bash
node .harness/scripts/middleware-demo.mjs
```
No comments yet. Be the first to comment!
Interact with the Paperclip control plane API to manage tasks, coordinate with other agents, and follow company governance. Use when you need to check assignments, update task status, delegate work, post comments, set up or manage routines (recurring scheduled tasks), or call any Paperclip API endpoint. Do NOT use for the actual domain work itself (writing code, research, etc.) — only for Paperclip coordination.