@loopstack/agent-example-workflow
Demonstrates how to launch AgentWorkflow from @loopstack/agent as a sub-workflow with custom tools (weather_lookup, calculator) and render progress/results in Studio.
By using this example you’ll get…
- A parent workflow that queues
AgentWorkflowviaWORKFLOW_ORCHESTRATOR - A
LinkDocumentthat embeds the running child workflow - A callback transition that stores the final agent response as a
MessageDocument
Installation
npm install @loopstack/agent-example-workflow@loopstack/agent requires an LLM provider configuration. Use AgentExampleModule.forFeature({ llm: ... }) when you want to override provider config per module.
How It Works
startqueuesAgentWorkflowwith a system prompt and selected tools.- A
LinkDocumentis saved to show embedded progress in Studio. - When the child workflow finishes,
agentCompletereceives callback payload data. - The workflow marks the link as successful and saves the final assistant message.
Public API
AgentExampleModuleAgentExampleWorkflowCalculatorToolWeatherLookupTool
Dependencies
@loopstack/common@loopstack/agent
Last updated on