Skip to content

Getting Started

Install the package

dotnet add package NexusLabs.Eve

The package targets .NET 10 and has no runtime package dependencies.

Create the transport

Use a caller-managed HttpClient or HttpMessageInvoker. Applications using dependency injection should obtain HttpClient from IHttpClientFactory.

using NexusLabs.Eve;

using HttpClient transport = httpClientFactory.CreateClient("eve");
EveClient client = new(
    transport,
    new EveClientOptions("https://agent.example.com"));

For a named workspace agent mounted at /eve/<agent>, pass the compact mount as the host:

EveClient supportClient = new(
    transport,
    new EveClientOptions("https://app.example.com/eve/support"));

The client maps its internal /eve/v1/* routes onto /eve/support/v1/*. Ordinary proxy prefixes such as /api remain additive and continue producing /api/eve/v1/*.

Keep the transport alive until every active response stream has completed.

Check the agent

EveHealthStatus health = await client.GetHealthAsync(cancellationToken);
EveAgentInfo info = await client.GetInfoAsync(cancellationToken);

Send a turn

EveSession session = client.CreateSession();
EveMessageResponse response = await session.SendAsync(
    "Summarize the release status.",
    cancellationToken);
EveTurnOutcome outcome = await response.GetOutcomeAsync(cancellationToken);

Console.WriteLine(outcome.Message);

EveMessageResponse is single-use. Aggregate it with GetOutcomeAsync, or iterate it directly to process events live.