DAISI QuickStart

So, you want to go fast, eh? We can help with that.

A good, simple example of this implementation can be found in our repo daisi-dotnet-console-chat project on Github

Get Started Super Fast - Skip the Tutorial

  1. Install the .Net 10 SDK and Visual Studio 2026 Community.

    Microsoft's .Net 10.0.0 SDK is required for developing on the DAISI network using DotNet. You will need to full SDK, not just the runtimes.

    Most developers in the DotNet world use Visual Studio 2026. The free-to-use Community Edition can be downloaded here.

  2. Add a reference to the `Daisi.SDK` NuGet package or project.

    You can do this via the NuGet Package Manager in Visual Studio, or by running the following command in the Package Manager Console:

    Install-Package Daisi.SDK
  3. Register the clients with the app service collection.

    This will add all of the clients and client factories needed for dependency injection.

    builder.Services.AddDaisi("<<Your secret key>>");

    Then right after you build the host, this will setup the rest of the Daisi quickstart system.

    var host = builder.Build();
    ....
    
    host.Services.UseDaisi();
                
  4. Start building.

    Now you can start building your application using the DAISI SDK!

Get Started Fast - Step By Step

NOTE: This accomplishes the same goal as the above section, but breaks down the steps that are handled by AddDaisi() and UseDaisi() so that you understand how to tweak the setup. In cases of web applications, for example, you may want to implement your own CookieClientKeyProvider so that the client keys are scoped to the current user of your app.
  1. Install the .Net 10 SDK and Visual Studio 2026 Community.

    Microsoft's .Net 10.0.0 SDK is required for developing on the DAISI network using DotNet. You will need to full SDK, not just the runtimes.

    Most developers in the DotNet world use Visual Studio 2026. The free-to-use Community Edition can be downloaded here.

  2. Create a console application in Visual Studio.

    After opening Visual Studio, create a new Console application using C# (Tutorial).

  3. Add a reference to the `Daisi.SDK` NuGet package or project.

    You can do this via the NuGet Package Manager in Visual Studio or by running the following command in the Package Manager Console (Tutorial):

    Install-Package Daisi.SDK
  4. Register the clients with the app service collection.

    This will add all of the clients and client factories needed for dependency injection.

    builder.Services.AddDaisiClients();
  5. Add your secret key to the app:
    DaisiStaticSettings.SecretKey = "<your-secret-key>";
  6. Register your client key provider.

    Create a custom implementation of `IClientKeyProvider` to provide your client keys for authentication when using our clients. This will allow a lot of the SDK to "just work". The following is a simple example if your app can have static client keys, meaning it will not provide client keys to your individual users like a website would:

    public class ClientKeyProvider(AuthClientFactory authClientFactory) : IClientKeyProvider
    {    
        public string GetClientKey()
        {
            // You can do this however you want as long as the code returns a valid client key string.
            if(DaisiStaticSettings.ClientKey is null)
            {
                var authClient = authClientFactory.Create();
                CreateClientKeyRequest request = new CreateClientKeyRequest
                {
                    SecretKey = DaisiStaticSettings.SecretKey
                };
                DaisiStaticSettings.ClientKey = authClient.CreateClientKey(request);
            }
            return DaisiStaticSettings.ClientKey;
        }
    }
                        

    Or use our default static provider:

    builder.Services.AddDaisiDefaultClientKeyProvider();
    NOTE: For web apps that want to use Daisi Authentication, you may need to implment your own CookieClientKeyProvider or SessionClientKeyProvider so users aren't using your app's client key. They will need their own User client key.
  7. Tell the SDK which Orc you want to use.

    Configure `DaisiStaticSettings` to point to your ORC endpoints and ports. Add this on the next line in the Progam.cs or whatever your app start up file is.

    EASY MODE: Use Our Logic

    We created a handy way to help you switch between environments easily. If you are building in a Debug configuration, it will use DevNet. If you build in a Release configuration, it will use LIVENET.

    DaisiStaticSettings.AutoswapOrc();

    DO-IT-YOURSELF MODE: Do it yourself

    For Development Use Only: the DAISI DevNet. It's free!

    While you are developing your app, hit our free DevNet orc so that you don't rack up a ton of costs. It's rate limited, but you shouldn't hit the limit unless you forget to switch it to LiveNet later. We push out updates regularly, so it may be down from time to time, but hey, it's free.

    DaisiStaticSettings.OrcDomainOrIpAddress = "orc-dev.daisinet.com";
    DaisiStaticSettings.OrcPort = 443;
    DaisiStaticSettings.OrcUseSSL = true;
    

    For Production-Ready Apps use the DAISI LIVENET

    Once you are ready to show the world your app, you point things to our LIVENET (not ready for prime time yet).

    DaisiStaticSettings.OrcDomainOrIpAddress = "orc-live.daisinet.com";
    DaisiStaticSettings.OrcPort = 443;
    DaisiStaticSettings.OrcUseSSL = true;
    

    Enterprise Apps on Private Orc Setup

    If your enterprise is hosting its own Orc, you can point the system to that Orc.

    DaisiStaticSettings.OrcDomainOrIpAddress = "orc.yourcompany.com";
    DaisiStaticSettings.OrcPort = 443;
    DaisiStaticSettings.OrcUseSSL = true;
    
  8. Start Building!

    Get busy building or get busy trying.

    Using InferenceClient in Daisi.SDK

    The InferenceClient handles inference requests. Example:

    using Daisi.Protos.V1;
    using Daisi.SDK.Clients.V1.Host;
    using Daisi.SDK.Extensions;
    using Daisi.SDK.Models;
    
    ....
    
    var clientFactory = new InferenceClientFactory();
    var client = clientFactory.Create();
    
    // Usually best to use this method so that all of the default settings are set for you.
    var request = SendInferenceRequest.CreateDefault();
    
    request.Text = "Tell me a joke";
    var response = await client.Send(request); // Process response
    
    while(response.ResponseStream.MoveNext())
    {
       var tokenResponse = response.ResponseStream.Current.Content.CleanupAssistantResponse();
    
       // do something with the token
       Console.Write(tokenResponse);
    }
    
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.