0.0.1-alpha.0 • Published 5 months ago
calling-agent-from-workflow v0.0.1-alpha.0
Calling agent from workflow
A simple example showing how to call an agent from a workflow step using Mastra and OpenAI.
Prerequisites
- Node.js v20.0+
- pnpm (recommended) or npm
- OpenAI API key
Getting Started
Clone the repository and navigate to the project directory:
git clone https://github.com/mastra-ai/mastra cd examples/basics/workflows/calling-agent-from-workflow
Copy the environment variables file and add your OpenAI API key:
cp .env.example .env
Then edit
.env
and add your OpenAI API key:OPENAI_API_KEY=sk-your-api-key-here
Install dependencies:
pnpm install
Run the example:
pnpm start
0.0.1-alpha.0
5 months ago