Skip to content

Getting Started

From the repo root:

Terminal window
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- start

Optional overrides:

Terminal window
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- start --instance booking --socket /tmp/pragmatic/booking.sock
using Pragmatic.Agent.Client;
await PragmaticApp.RunAsync(args, builder =>
{
builder.UseAgent(agent =>
{
agent.SocketPath = "/var/run/pragmatic/agent.sock";
agent.HeartbeatInterval = TimeSpan.FromSeconds(15);
agent.AutoReconnect = true;
});
});
Terminal window
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- status
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- config set Mail:Host smtp.example.com
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- flag set bookings.checkout-v2 true

In Development environments, UseAgent() attempts to auto-start the daemon if it is not already listening and the project can be located from the current solution layout.

This is a convenience for local work, not a deployment mechanism for production.

  • wire configuration or feature flags to Agent-backed stores
  • point Pragmatic.Gateway at the same Agent socket
  • explore multi-instance setups with --instance