@loopstack/code-agent-example-workflow
v0.23.3
Published
Example workflow demonstrating @loopstack/code-agent usage with codebase exploration tools
Maintainers
Readme
title: Code Agent Example description: Example launching ExploreAgentWorkflow as a sub-workflow to explore a remote workspace and surface a synthesized summary
@loopstack/code-agent-example-workflow
Demonstrates how to launch the ExploreAgentWorkflow from @loopstack/code-agent as a sub-workflow to explore a remote workspace and surface a synthesized summary.
By using this example you'll get...
- A parent workflow that runs
ExploreAgentWorkflowwith a fixed exploration brief - The embedded sub-workflow rendered inline in the parent's view via
show: 'inline' - A final
MessageDocumentsummarizing the agent's findings
Installation
npm install @loopstack/code-agent-example-workflow@loopstack/code-agent transitively requires @loopstack/claude-module and @loopstack/remote-client — make sure both are configured (Anthropic API key + sandbox environment) before running.
Then register the module in your app:
import { CodeAgentExampleModule, CodeAgentExampleWorkflow } from '@loopstack/code-agent-example-workflow';
import { StudioApp } from '@loopstack/common';
@StudioApp({
title: 'Code Agent Example',
workflows: [CodeAgentExampleWorkflow],
})
@Module({
imports: [CodeAgentExampleModule],
})
export class MyAppModule {}How It Works
- The workflow starts and calls
ExploreAgentWorkflow.run({ instructions }). - The sub-agent iterates over
glob,grep, andreadtool calls against the remote workspace until it reaches a final answer. - The callback fires with the agent's synthesized response.
- A
MessageDocumentis saved with the response text.
Public API
CodeAgentExampleModuleCodeAgentExampleWorkflow
Dependencies
@loopstack/common@loopstack/code-agent
