How do I move prompt assembly and tool calls out of my API routes?

Declare the outside callcredential slot attached
The project calls a named action while the runtime supplies the stored credential.

#The question

If you are asking "How do I move prompt assembly and tool calls out of my API routes?", you want this running without wiring up bespoke infrastructure. The short answer: describe the system in .swirls files, ship it with git push or swirls deploy, and Swirls Cloud runs it.

#Who's asking

App developer using an AI SDK. Already calling an LLM from app code. Prompts, tools, and sessions are scattered across the codebase.

#Why Swirls is a fit

Your app becomes a thin consumer: a session id, a trigger, a response. Prompt assembly, tool calls, schedules, and audit move out of application code and into a deployed Swirls project.

Agents call deterministic workflows as tools. Each node has a typed input and output schema, so tool execution is scoped, repeatable, and auditable instead of free-form model output.

Add the people, data, authority, and decisions around this job.

Keep this solution beside the Apps, records, rules, connections, and reviews it depends on in one .swirls project.