How do I build a workflow that an AI agent can invoke as a tool?

Put the process in sourcesteps and decisions declared
Keep the trigger, action, failure policy, and review point in one project.

#The question

"How do I build a workflow that an AI agent can invoke as a tool?" has a short answer: make the agent a deployable artifact. With Swirls you declare it in .swirls files, deploy with git push or swirls deploy, and the hosted runtime takes over.

#Who's asking

Forward-deployed / solutions engineer. Tasked with standing up custom agent logic per customer or per org, comfortable in a terminal and IDE.

#Why Swirls is a fit

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.

Swirls makes the agent a deployable artifact. You describe agents, workflows, tools, triggers, schedules, and secrets in .swirls files, then ship them with git push or swirls deploy. DSL in, running system out.

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.