Universal.Operative.Sdk.xAI
1.0.0
dotnet add package Universal.Operative.Sdk.xAI --version 1.0.0
NuGet\Install-Package Universal.Operative.Sdk.xAI -Version 1.0.0
<PackageReference Include="Universal.Operative.Sdk.xAI" Version="1.0.0" />
<PackageVersion Include="Universal.Operative.Sdk.xAI" Version="1.0.0" />
<PackageReference Include="Universal.Operative.Sdk.xAI" />
paket add Universal.Operative.Sdk.xAI --version 1.0.0
#r "nuget: Universal.Operative.Sdk.xAI, 1.0.0"
#:package Universal.Operative.Sdk.xAI@1.0.0
#addin nuget:?package=Universal.Operative.Sdk.xAI&version=1.0.0
#tool nuget:?package=Universal.Operative.Sdk.xAI&version=1.0.0
About
Universal.Operative.Sdk.xAI plugs xAI's Grok models into Universal.Operative.Sdk via an IModel adapter (Model) backed by the gRPC Universal.xAI.Client transport.
How to Use
Installation
dotnet add package Universal.Operative.Sdk.xAI
Configuration
using Universal.Operative.Sdk;
using Universal.Operative.Sdk.xAI;
IModel model = new Model(apiKey, new Model.Options
{
ModelId = "grok-4",
MaxTokens = 4096,
});
The constructor also accepts an existing Universal.xAI.Client.xAIClient in place of an API key, so you can reuse a pre-built client (custom endpoint, channel options, ...) across models:
using Universal.xAI.Client;
xAIClient client = new xAIClient(apiKey);
IModel model = new Model(client, new Model.Options { ModelId = "grok-3-mini" });
Usage
Drop the model into OperativeBuilder like any other IModel:
IOperative operative = OperativeBuilder.FromDefaults(model)
.AddBaselineTools()
.Build();
await foreach (OperativeEvent e in operative.ExecuteAsync(conversation))
{
// handle events as usual — see Universal.Operative.Sdk's Package.md
}
Structured output
Model.Options.ResponseFormat is the escape hatch for JSON object / JSON schema output, forwarded verbatim as response_format.
License
Free for noncommercial use under the Universal.Operative Noncommercial License. Source is closed; commercial use requires a separate license from Andrew Ong.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Universal.Operative.Sdk (>= 1.3.0)
- Universal.xAI.Client (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 0 | 7/13/2026 |
Initial release.