Skip to main content

Agents

@cachehit/agentsv2026.10.26.1· Apache-2.0· 1d agoBEHAVIORSACCEPTED WARNINGS
01README

Run AI coding agents headless from swamp workflows and record what each run did and cost, so a workflow can hand simple subtasks to a cheaper model and keep the expensive one for planning and review. Supports Kiro CLI (@cachehit/agents/kiro).

Each run stores an invocation record (model, success, failure class, Kiro credits, duration, tool calls, answer preview) and a transcript with the full prompt and answer. The readonly tool profile, the default, limits the agent to reading and searching files; actor gives it every tool of a Kiro agent without permission prompts.

Quick Start

swamp extension pull @cachehit/agents
swamp model create @cachehit/agents/kiro kiro \
  --global-arg defaultModel=claude-haiku-4.5

swamp model method run kiro listModels
swamp model method run kiro invoke \
  --input prompt="Summarise what src/ does" --input cwd=/path/to/repo
swamp model method run kiro invokeAndParse \
  --input prompt='List the TODOs in src/ as JSON [{"file":..,"line":..}]' \
  --input model=claude-sonnet-4.6

Methods

  • invoke: run Kiro with a prompt; fails the step if the run fails.
  • invokeAndParse: like invoke, and the answer must contain JSON, which is stored as parsed; asks again when it does not.
  • listModels: store Kiro's models with their credit rate multipliers.
02Release Notes

First release with @cachehit/agents/kiro. invoke, invokeAndParse and listModels run Kiro CLI headless and record the model, credits, duration, tool calls and failure class of every run.

03Behaviors1
@cachehit/agents/kirov2026.10.26.1kiro/kiro.ts

Global Arguments

ArgumentTypeDescription
kiroPath?stringkiro-cli executable, resolved on PATH unless absolute
defaultModel?stringKiro model ID used when invoke omits model; see listModels
defaultAgent?stringKiro agent (context profile) for the actor profile; Kiro's default agent when unset
maxRetries?numberRetries for rate limits, killed processes and, in invokeAndParse, unparseable answers
retryDelayMs?numberBase backoff; attempt n waits n times this
fn invoke(prompt: string, model?: string, agent?: string, cwd?: string, invocationId?: string, tags?: record)
Run Kiro headless with a prompt and record the answer, credits and duration
ArgumentTypeDescription
promptstringTask for the agent; sent on stdin
model?stringKiro model ID, for example claude-haiku-4.5; defaults to defaultModel
agent?stringKiro agent for the actor profile; overrides defaultAgent
cwd?stringWorking directory for the agent; defaults to the swamp process directory
invocationId?stringNames the invocation-<id> and transcript-<id> data; a random UUID when unset
tags?recordKey-value labels stored with the invocation, for example a task role
fn invokeAndParse(prompt: string, model?: string, agent?: string, cwd?: string, invocationId?: string, tags?: record)
Like invoke, but the answer must contain JSON; stores it as parsed and retries when it does not
ArgumentTypeDescription
promptstringTask for the agent; sent on stdin
model?stringKiro model ID, for example claude-haiku-4.5; defaults to defaultModel
agent?stringKiro agent for the actor profile; overrides defaultAgent
cwd?stringWorking directory for the agent; defaults to the swamp process directory
invocationId?stringNames the invocation-<id> and transcript-<id> data; a random UUID when unset
tags?recordKey-value labels stored with the invocation, for example a task role
fn listModels()
Store the models Kiro offers with their credit rate multipliers

Resources

models(infinite)— Models Kiro offers, with their credit rate multipliers
04Stats
A
100 / 100
Downloads
3
Archive size
22.3 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned

06Platforms
07Labels