Skip to main content
Loading navigation
Back to prompt library

Mastra AI Agent Setup and Document Schema Definition

Linked challenge: SkillProof Document Agent

Prompt source

planning18 lines4 sectionsNo variables1 code block
Initialize a Mastra AI agent named 'SkillProofAgent'. Define a TypeScript interface for your 'SkillProof' document, including fields like `skillName`, `proficiencyLevel`, `descriptionGenerated`, and `vibeCodingAssessment`. Describe how Mastra AI's agent memory will store this document state. Provide the initial Mastra AI agent setup code and the TypeScript interface.

```typescript
import { createAgent, createTool, configureOpenAI } from '@mastra-ai/core';
import { createMemory } from '@mastra-ai/memory-redis'; // Example memory

interface SkillProofDocument {
  skillName: string;
  proficiencyLevel: 'Novice' | 'Intermediate' | 'Expert';
  descriptionGenerated: string;
  vibeCodingAssessment: string;
}

// const agent = createAgent({
//   id: 'skillProofAgent',
//   memory: createMemory('redis'), // Using Redis for persistence
//   tools: [],
//   llm: configureOpenAI({ model: 'gpt-4o' }), // Initial LLM for general orchestration
//   // ... other configurations
// });
```