Skip to content

C#

The Prompty TypeSpec schema emitter generates C# model classes at runtime/csharp/Prompty.Core/Model/. These provide the typed data model for .prompty files but the runtime pipeline (loader, renderer, parser, executor, processor) is not yet implemented.

The emitter produces C# classes for all schema types:

  • Prompty — root type
  • Model, ModelOptions — model configuration
  • Connection and subtypes (ApiKeyConnection, ReferenceConnection, etc.)
  • Property, ArrayProperty, ObjectProperty — input/output schemas
  • Tool and subtypes (FunctionTool, McpTool, OpenApiTool, CustomTool)
  • Template, Format, Parser — template configuration

The C# runtime will follow the same four-stage pipeline as Python and TypeScript:

  1. Renderer — Jinja2-compatible template rendering (Scriban or DotLiquid)
  2. Parser — Role marker parsing → message list
  3. Executor — Microsoft Foundry SDK / OpenAI SDK integration
  4. Processor — Response extraction and structured output

If you’re interested in helping build the C# runtime, see the Contributing guide and check the GitHub issues for C#-related tasks.