Content

How to roll an enterprise agent from reads to writes

Start the agent on reads the user could already open. Add one reversible write after a quiet week. Hold refunds, deletes, and identity changes for a person.

EngineeringOct 30, 2026

Key takeaways

  • -Order the rollout by how hard a bad call is to undo. Start with reads the user could already open themselves.
  • -swy get can download a whole bundle without enabling a single method. swy add is the actual decision.
  • -Add one reversible write after a quiet week, backed by a policy test. Leave refunds, deletes, and identity changes off entirely.
  • -The docs' own examples include github.issues.create and github.repo.star. Leave both out until that specific write is the release you mean to ship.

Security sends the agent project back with one line: the design lets a model update customer records on day one. The team had planned a big-bang connect of six systems because the demo needed all of them at once. The review doesn’t care about the demo. It cares about which call can be undone.

This post is a rollout sequence ordered by reversibility: reads first, low-value writes next, and money, deletes, and identity last, only with a person in the loop.

Start where a mistake expires on its own

A read that returns a ticket, a balance, or a file the user could already open is the first slice to ship. If the model misreads it, the damage is a wrong sentence in chat. You correct the sentence. Nobody has to file a restore ticket.

Put only those methods in tooling.json, and leave every write out, even the ones the demo used. swy get can download the whole bundle without consequence. swy add is the actual decision. A method you never added simply cannot run.

Use IDs you can actually point at. The docs’ own examples include github.issues.create and github.repo.star. A first release can allow a read you copied straight from swy list methods and leave both writes out entirely. A later release can add github.issues.create with a test behind it. Leave github.repo.star off until you genuinely want the agent starring repositories. The sequence is the decision that matters here; the provider is just where the IDs happened to come from.

Run the agent on that list until the questions people ask match the methods you’ve enabled. If they keep asking for writes, treat that as a finding worth writing down, not a reason to flip the write on the same day. It belongs in the next stage, with a policy attached.

API compliance for agent integrations is the packet security will ask for before stage two starts. The checklist before company data is the shorter pass to run before the very first read of anything sensitive.

Add writes you can reverse without a war room

A low-value write is one you can undo with another call, or by hand, in a few minutes: a draft comment, a tag on a test record, an internal note that never emails a customer. Sequence those in once reads have been genuinely dull for a week.

Each write needs a test in .swytchcode/integrations/policies.json. Block the arguments you won’t accept. A comment that mentions an outside email domain is a different risk from one on an internal ticket, so encode that difference. swy policy validate runs the tests. Don’t enable the method in the same change that introduces a rule you haven’t tested yet.

Give the read week an actual date when you’ll open the log, not just a date when you hope to feel done. If that week shows a call to a method you thought was off, stop and fix the allowlist before any write merges. A quiet log is permission to add the next ID. A surprising one revokes it.

There’s no .env file in this project. Swytchcode keeps credentials in its own local store and reads them when a call runs, so the rollout never involves pasting provider keys onto the agent host.

Hold the calls you cannot take back

Refunds, deletes, permission changes, and anything that tells a customer a fact should all wait for a person. Human approval on Slack or Telegram starts on Business and Enterprise. The call doesn’t run while it waits, and if nobody answers within 48 hours, it simply expires. A late yes doesn’t send it anyway.

Free and Pro can’t hold a call at all. On those plans, keep irreversible methods off the allowlist entirely. Deny is the staged state, and turning a method on later is a deliberate release, never a prompt tweak.

Block still wins when both rules could match. A policy that denies a refund over a cap will stop the call even if another rule would otherwise ask for approval. Exit code 6 means the provider never saw it; exit code 7 means it’s sitting there waiting.

Tell security the sequence in one page

Reviewers stall projects that say “the agent can use the CRM.” They move projects that say exactly which methods are on, which are next, and which stay off until an approval rule exists. Give them the method IDs straight from swy list methods, the policy tests, and the week you actually expect to add the first write.

Don’t promise a refund date in the same plan as the read-only launch. Those are different releases entirely, and the read-only launch can ship perfectly well while the refund method is still absent from tooling.json.

Ship the read-only list first. Add one reversible write once reads have stayed quiet. Keep irreversible methods off the table until approval is real on the plan you’re actually paying for.

FAQ

Can the demo include a write if production starts read-only?

Keep the demo on the same allowlist as production, or treat it as a different project entirely, with its own tooling.json. A demo that enables writes on a shared file is really a production launch wearing a different name.

What counts as reversible?

You can undo it with a second call or a short manual edit, and a customer never saw it happen. If undoing it needs a backup restore or a legal note, it doesn’t belong in the early write stage at all.

Who is allowed to add the next method?

The same review as any other production change gets. The diff is tooling.json plus the policy test, and whoever can edit the prompt shouldn’t also be the only person who can enable a write.

What if the model needs a write the list doesn’t have?

It fails closed, which is really the whole point of the sequence. Capture the request, work out whether that write is reversible, and add it in a later pull request with a test attached to it.

Use Swytchcode so this doesn't happen to you

Use Swytchcode and you won't ship an agent that can write to production before anyone decided it should. A method stays off the allowlist until you deliberately add it, so going from reads to writes stays a sequence you control instead of a default the model gets on day one.

Swytchcode is an execution kernel that sits between your AI agents and the APIs they call. It resolves the right method, injects auth, checks policy, retries safely with idempotency, and logs every call locally.

Start with the MCP quickstart, or browse the docs for the full reference. Free is 100 live commands a month forever; see pricing for Pro and Business.

More content