shivankarnitish

Paste Agent — AI skill for Claude Code

AI community

Pattern-aware speculative tool execution for LLM agents — open implementation of PASTE (arXiv:2603.18897).

How to install Paste Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open shivankarnitish/paste-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Paste Agent does

Pattern-aware speculative tool execution for LLM agents — open implementation of PASTE (arXiv:2603.18897). Mines tool-call patterns from agent traces and runs predicted calls while the LLM is still thinking. 10-34% latency reduction in live benchmarks with Claude.

Alternatives in AI

  • Deepreasoning — A high-performance LLM inference API and Chat UI that integrates DeepSeek R1's CoT reasoning traces with Anthr 5.4k ★
  • Debug Skill — Give your AI agent a real debugger — breakpoints, stepping, variable inspection, and stack traces via CLI 218 ★
  • Generate Clip — Generate AI video clips for your Remotion project 113 ★

README

PASTE — Pattern-Aware Speculative Tool Execution

An open-source implementation of **[Act While Thinking: Accelerating LLM Agents via Pattern-Aware Speculative Tool Execution](https://arxiv.org/abs/2603.18897)** (arXiv:2603.18897). The paper's authors have not released code; to our knowledge this is the only implementation of the paper's specific design — PrefixSpan pattern mining, symbolic value-mapping inference, probabilistic validation, utility-ranked scheduling, and promotion. See Related Work below for concept-sibling projects that implement speculative tool execution with different designs.

LLM agents are slow because they serialize: the model thinks, calls a tool, waits, thinks again. PASTE borrows speculative execution from CPU design — it mines recurring tool-call patterns from an agent's past runs, predicts the next tool invocation *while the LLM is still generating*, runs it in the background, and serves the result instantly if the prediction was right. Wrong guesses are discarded in isolation and never reach the model.

Results (mock benchmark, deterministic)

20 tasks across two demo agents, paired baseline-vs-PASTE runs, simulated tool latencies, identical LLM behavior in both arms:

Domain E2E latency Tool wait Hit rate Answer divergence
Research 18.9% faster 47.8% less 70% 0
Coding 24.4% faster 82.9% less 75% 0

(The paper reports 48.5% average E2E reduction on production-scale workloads with much longer tool latencies; the mock setup here is intentionally conservative.)

Results (live, Claude Haiku 4.5 as the agent brain)

Same tasks and simulated tool latencies (search 1.5s, fetch 2.5s, tests 4s), but a real LLM deciding every tool call, with patterns mined from that same LLM's recorded traces:

| Domain | E2E latency | Tool wait |