Mastra Connector
Integrate Mastra's AI orchestration framework into your Logic Bee hooks.
Setup
// logic-bee.config.ts
export default {
connectors: {
mastra: {
apiKey: process.env.MASTRA_API_KEY,
baseUrl: 'https://api.mastra.ai',
},
},
};
Usage
@LogicHook({
event: 'run-agent-workflow',
collection: 'ai',
})
export class RunAgentWorkflowHook {
async run(context) {
const { workflowId, input } = context.body;
const result = await context.connectors.mastra.executeWorkflow({
workflowId,
input,
});
return { result: result.output, status: result.status };
}
}
Configuration Options
| Option | Type | Description |
|---|---|---|
apiKey | string | Your Mastra API key |
baseUrl | string | Mastra API base URL |
timeout | number | Request timeout in milliseconds |
Features
- Agent workflows — Execute multi-step AI agent workflows
- Tool orchestration — Chain tools and models together
- Observability — Built-in tracing and logging for AI pipelines