Getting Started
1. Run the daemon
Section titled “1. Run the daemon”From the repo root:
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- startOptional overrides:
dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- start --instance booking --socket /tmp/pragmatic/booking.sock2. Connect an application
Section titled “2. Connect an application”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; });});3. Use the CLI
Section titled “3. Use the CLI”dotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- statusdotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- config set Mail:Host smtp.example.comdotnet run --project Pragmatic.Agent/src/Pragmatic.Agent/Pragmatic.Agent.csproj -- flag set bookings.checkout-v2 true4. Development auto-start
Section titled “4. Development auto-start”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.
5. Next steps
Section titled “5. Next steps”- wire configuration or feature flags to Agent-backed stores
- point
Pragmatic.Gatewayat the same Agent socket - explore multi-instance setups with
--instance