An agent is your code with the spredr SDK, with its own image and deployment: it takes tasks, asks before it acts, remembers and learns. You bring the model and your key; spredr brings the rest.
terminal
$npm install @spredr/sdk
$spredr new tu-usuario/shop-agent --agent shop
$spredr ask shop reply hola
how it works
The life of a task
Your agent is your code, in its own container. spredr brings what surrounds it: the queue, the delivery, the questions, the memory and the trace.
it arrivesYour backend asks for it with the SDK, signed with its key; so can a schedule, a webhook or you from the CLI. The same key gives the same task: a retry on your side never duplicates it.
its turnEvery customer has their own queue and they are served in turns: one with a thousand tasks never holds back the rest. Your agent takes up to 4 at once; change it with concurrency.
deliveryspredr brings it to your agent signed, with that customer's memory and the lessons in force. If it does not answer, it retries after 5 s, 30 s and 2 min.
asks firstA risky action stops and waits for a person. When it comes back the task carries its diary: every answer and every step already done returns the same, so nothing happens twice.
the resultYour agent answers right away or reports later. Whoever asked gets it by waiting, through their signed callback, or live, piece by piece.
the traceEvery step stays with its time, its tokens and its cost. What you correct becomes a lesson, tested on past tasks before it goes in.
between tasksYour agent rests: about 36 MB and no CPU, and it answers the next task in milliseconds. If you choose to let it sleep, it stops after the quiet minutes you set and the first task wakes it; that task says how long it took to start.
what it does well
Nothing happens twice
When a task comes back, after a question or a crash, every answer and every step it already took gives back what it gave the first time. The model is not paid twice and a customer is not charged twice.
Your backend gives it tasks and waits for the result; you answer what it asks from the panel or from your app.
asks firstA risky action waits for a person. Approved often enough, it is offered to run alone, and an undo takes that back.
remembersMemory by customer, and it forgets whoever asks.
learnsYour corrections become lessons, tried on past tasks before they go live.
any modelClaude, OpenAI, Gemini or your own, with your key: spredr never sits between your agent and its model.
lightAbout 36 MB working and no CPU asleep; spredr adds about 10 ms per task.
in viewEach task is a trace with its steps, tokens and cost, in your OpenTelemetry tools too.
Costs
What each task cost, and which ones stand out
Every model call your agent makes shows its cost beside the task that made it. ctx.model() reads the model and its tokens, including the ones served from the prompt cache and the ones written to it, so each part is priced at its own rate.
When your code sends no cost, spredr prices the tokens at the model's list price and marks the figure as an estimate, the way agent observability tools price a trace. A cost your code sends always wins. A model spredr has no price for shows no price rather than $0. The daily spend limit counts estimates too.
A task is marked slow when it took longer than 95 % of its agent's tasks in the last day, and costly when it cost more than 95 % of them: the 95th percentile, the usual line for an outlier. Each agent is compared with itself, and only once it has 20 finished tasks that day.
InputTokens billed in full, at the model's input rate.
Cache writesAt 1.25 times the input rate.
Cache readsAt the model's cache rate, or a tenth of its input rate.