Get Started

Get Started

Create a small ASP.NET Core app, add Runiq packages, register an agent, and open the dashboard.

Get Started

Runiq.Net packages are currently preview packages. APIs may change before stable release.

This page builds a small ASP.NET Core app, adds the Runiq packages, defines one agent, and opens the embedded dashboard.

Create a web app

From a command prompt:

Text
dotnet new web -n RuniqFirstRun
cd RuniqFirstRun

The embedded dashboard is hosted from ASP.NET Core. The current packages target net10.0, so use a .NET 10-compatible app.

Add Runiq packages

Text
dotnet add package Runiq.Core --prerelease
dotnet add package Runiq.Agents --prerelease

--prerelease asks NuGet for the latest preview package. Runiq.Core hosts the dashboard and server APIs. Runiq.Agents provides the Agent type used below.

Add an API key

The repository samples use openai/gpt-5 and read the key from OpenAI:ApiKey:

Text
dotnet user-secrets init
dotnet user-secrets set "OpenAI:ApiKey" "YOUR_OPENAI_API_KEY"

Create an agent

Create an Agents folder:

Text
mkdir Agents

Add Agents/TestAgent.cs:

C#
using Runiq.Agents;

namespace RuniqFirstRun.Agents;

public sealed class TestAgent : Agent
{
    private TestAgent(string? apiKey)
        : base(
            id: "test-agent",
            name: "Test Agent",
            instructions: "You are a helpful test agent.",
            model: "openai/gpt-5",
            apiKey: apiKey)
    {
    }

    public static Agent Create(string? apiKey)
    {
        return new TestAgent(apiKey);
    }
}

This follows the sample pattern: agent setup lives in an Agents file, and Program.cs only wires it into the app.

Update Program.cs

Replace Program.cs with:

C#
using Runiq.Core;
using RuniqFirstRun.Agents;

var builder = WebApplication.CreateBuilder(args);

var openAiApiKey = builder.Configuration["OpenAI:ApiKey"];

builder.Services.AddRuniqServer(options =>
{
    options.AddAgent(TestAgent.Create(openAiApiKey));
});

var app = builder.Build();

app.UseRuniqDashboard(options =>
{
    options.Path = "/dashboard";
    options.Title = "Runiq Dashboard";
});

app.MapGet("/", () => "Runiq is running.");

app.Run();

Run the app

Text
dotnet run

Open the printed app URL with /dashboard appended:

Text
http://localhost:5000/dashboard

Use the actual port printed by ASP.NET Core. In the dashboard, confirm that Test Agent appears in the Agents list.

Next

On this page