Not yet released. This guide describes implemented changes awaiting rollout. Availability requires the corresponding backend and dashboard release.
Goal
Describe an agent completely in the repository, so each deploy is reviewable and repeatable.Prerequisites
- A
stackshift.yamlin the folder you deploy, with a service oftype: agent. - A
Dockerfilein the same folder that installs and builds your agent. StackShift builds from it, so there is no build command instackshift.yaml. - A start command that starts your agent and listens on the port you set, 8080 unless you change it.
Workflow
1
Add a service of
type: agent with startCommand, port and an agent: block. Other services in the same file keep working.2
Set the agent’s
name, level, what wakes it and how long it sleeps after the last work.3
List the models it may use and how it pays:
credits or own_key. Set the budgets.4
List the StackShift actions it may ask for under
platform: and its own tools under actions:.5
Push and deploy. A version that asks for more than the last one waits for you to activate it.
An example
stackshift.yaml
Fields of the agent block
name(required, up to 80 characters): what the agent is called on its page.level:ask_every_time(default),safe_changesorwhole_tasks. See the levels in “Your agent’s own actions”.wakeOn: any ofinbox,agreements,a2a,schedule,webhook.sleepAfter:5mto1h, ornever. Default15m.scheduleandtimeZone: up to 10 five-part cron expressions, and an IANA time zone such asUTCorAfrica/Lagos.models: up to 10 entries, eachprovider(anthropicoropenai) andmodel. A model call for a model not listed is refused.payWith:credits(default) orown_key.budget:aiCreditsPerMonth,aiCreditsPerRunandcomputePerDay(one currency,NGNorUSD, whole kobo or cents as text).inbox:prefixandsendMode(off,repliesorany).agreements: trueturns on agreements for the inbox; the limits stay yours to set.internet: extra hosts the agent may reach, up to 64.platform: the StackShift actions the agent may ask for, up to 50. You consent to exactly this list when you deploy.actions: the agent’s own tools, up to 100.
Fields of an action
key: lowercase letters, digits and underscores, up to 63 characters.summary(required, up to 200 characters): shown on approval cards, so write what it does in plain words.risk:read,change,tell_me,askorowner_only.input(required): a JSON Schema object, at most 16 KB. StackShift checks the arguments against it before anything else.money:amountField,currencyFieldand an optionallimitper currency. The action counts as a cost, and over the limit it is refused.reachesPeople:trueif the action contacts people.safe:undonames the action that undoes this one.output:trustedoruntrusted. Leave it out and the output counts as untrusted.
Expected result
StackShift creates or updates the agent from the file. What you see in the agent’s settings for its own actions comes from the file and is read-only there.
Common failures
Related guides
Your agent’s own actions: risk, approvals and levels
Declare the tools your agent has, give each a risk, and let StackShift apply the agent’s level, approvals and untrusted-text checks before they run.
Events that wake your agent
Every email, agreement, schedule, webhook and approval reaches your agent as a signed event. The SDK checks it, drops repeats and runs your handler.
Internet access and secrets for agents
An agent reaches only StackShift and model access until you allow more. Its keys for other services stay secret, and some it never holds at all.