Invoke Agent Studio Agent in Sparkforge Workflows
Add the Invoke Agent Studio Agent action to a workflow, pick a Production-published agent built with the Workflows trigger, map input variables, and store the output for later actions, branching, or external webhooks.
Invoke Agent Studio Agent connects Sparkforge Workflows with Agent Studio. The workflow sends context to a published AI agent, receives a structured response, and continues to the next step. Use it for summaries, lead qualification, content generation, structured outputs, and decision-based branching.
What you can do with it
- Run an Agent Studio agent at a specific point in a workflow.
- Pass workflow data and merge fields into the agent's named inputs.
- Save the agent's response as a custom value and reuse it downstream — emails, SMS, internal notifications, If/Else branches, webhooks, field updates.
- Return JSON for clean rule-based branching.
Prerequisites
- Active AI Employee add-on with Agent Studio access.
- Agent published to Production — Draft and Staging agents do not appear in the workflow selector.
- Permission to edit workflows and AI agents in the location.
- Agent built with the Workflows trigger so inputs and outputs map correctly.
Build the agent in Agent Studio
- Open Agent Studio.
- Click Create Agent, or open an existing agent.
- In the trigger selection panel, choose Workflows.
- Configure instructions, tools, and input variables based on the data the workflow will send.
- Test the agent and confirm the output format matches your downstream needs.
- Click Publish to Production.
Add the workflow action
- Go to Automation > Workflows.
- Open or create a workflow.
- Click + Add Action.
- Under Agent Studio, select Invoke Agent Studio Agent.
Configure the action
Action Name
Use a descriptive name like Lead Message Analyzer or AI Summary Step. It does not change behavior but keeps multi-agent workflows readable.
Select Agent (required)
Pick the Production-published agent the workflow should run. If the agent is missing:
- Confirm it is published to Production.
- Confirm it was built with the Workflows trigger.
- Refresh the builder and reopen the action.
Message field (optional, recommended)
Free-text instructions for this run. Merge fields work here, so the same agent can take different instructions in different workflows.
Analyze the most recent message from {{contact.name}} and return a short summary plus recommended next actions for the sales team.Input Variables
Map workflow values or static text to the agent's named inputs. Missing required inputs stop the action from completing.
Store Output As
Save the full agent response as a custom value so later actions can read it.
Use the output downstream
- Save the summary or result to a custom field or note.
- Branch with If/Else logic on values returned by the agent.
- Insert the response into Email, SMS, WhatsApp, or internal notifications.
- Send the full response object to a webhook or external service.
- Reference the response variable in later workflow steps.
Best practices
- Keep prompts concise; push detailed context through mapped variables.
- Ask for structured JSON when the result drives branching or field updates.
- Rename each action when a workflow runs more than one agent.
- Test the agent's output format before relying on it in production actions.
- Republish to Production whenever you change the agent.
Common use cases
- Lead enrichment after a form submission.
- Conversation summaries when a chat closes.
- Sales triage on the latest inbound inquiry.
- Internal handoff notes for service teams.
- Structured output sent to webhooks or downstream tools.
Frequently Asked Questions
Why doesn't my agent appear in the dropdown?
Can one workflow call multiple agents?
What happens if the agent errors out?
Does this action use extra AI credits?
Is there a timeout?
What output type should the agent return?
Was this article helpful?
Thanks for the feedback.