Prompt Content
Initialize a Mastra AI project. Define two agents: a 'CodeGenerator' agent and a 'CodeReviewer' agent. The CodeGenerator should use Claude Sonnet 4 and be equipped with tools to write files to a simulated filesystem. The CodeReviewer should use Llama 3 8B Instruct (via a custom tool calling Hugging Face Inference Endpoints) and tools to read files and provide feedback. Outline their initial roles and a simple interaction flow for generating a function and getting it reviewed.
```typescript
import { createAgent, createTool, Workflow } from '@mastra-ai/core';
const codeGenerator = createAgent({
id: 'code-generator',
model: 'claude-sonnet-4',
// ... other configs
});
const codeReviewer = createAgent({
id: 'code-reviewer',
model: 'llama-3-8b-instruct-hf-endpoint', // Placeholder for custom endpoint
// ... other configs
});
// Define a workflow
const workflow = new Workflow();
// ... Add steps for agents to interact
```Try this prompt
Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.
Related Prompts
Explore similar prompts from our community
Usage Tips
Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)
Customize placeholder values with your specific requirements and context
For best results, provide clear examples and test different variations