Code
Createquiz-generator-agent.ts with the code below, or save it directly from your editor.
Skill Configuration
Createskills/quiz-generation/skill.yaml:
How It Works
TypeScript Integration- Uses
@bindu/sdkfor Bindu protocol compliance - LangChain integration with
@langchain/openai - Type-safe development with TypeScript
- OpenRouter API via baseURL override
- GPT-OSS-120b model for high-quality output
- Low temperature (0.3) for consistent quiz generation
- System prompt with detailed formatting instructions
- Exactly 10 MCQs per request
- 4 options per question (A, B, C, D)
- One correct answer with explanation
- Academic language and structured markdown output
- Graceful error handling with descriptive messages
- Input validation for message arrays
- Response type checking and formatting
Dependencies
Environment Setup
Create.env file:
Run
- “Generate a quiz about World War II”
- “Create a quiz based on this chapter about photosynthesis”
- “Make a quiz about basic mathematics concepts”
- “Generate assessment questions for this programming tutorial”
Example API Calls
Message Send Request
Message Send Request
Task get Request
Task get Request