Autonomous agent self-registration (onramp) for DataGrout.
The onramp flow lets a machine intelligence register itself with DG without a human in the loop, using only plain HTTP JSON — no MCP client required.
Flow
- POST to
/onrampwith agent identity metadata (no auth). - DG returns a short-lived
session_token(5 minutes). - POST to
/onramp/completewithAuthorization: Bearer <session_token>. - DG issues provisional
client_id+client_secret(restricted scopes).
The two-step handshake stops fire-and-forget scripts from bulk-registering without completing the flow.
Example
alias DatagroutConduit.{Client, Onramp}
opts = %Onramp.OnrampOptions{
gateway: "https://app.datagrout.ai",
agent_name: "my-research-agent",
agent_type: "claude-sonnet-4-6",
intended_use: "Summarise documents and extract entities."
}
# One-shot: autonomous registration + mTLS bootstrap.
{:ok, client} = Client.bootstrap_onramp(opts: opts)
Summary
Functions
Perform the full onramp handshake and OAuth token exchange.
Perform the onramp handshake and return provisional OAuth credentials.
Functions
@spec register_and_exchange(DatagroutConduit.Onramp.OnrampOptions.t()) :: {:ok, {DatagroutConduit.Onramp.OnrampCredentials.t(), String.t()}} | {:error, term()}
Perform the full onramp handshake and OAuth token exchange.
Returns the provisional credentials alongside a short-lived access token
ready for use with DatagroutConduit.Client.bootstrap_identity/1.
@spec register_only(DatagroutConduit.Onramp.OnrampOptions.t()) :: {:ok, DatagroutConduit.Onramp.OnrampCredentials.t()} | {:error, term()}
Perform the onramp handshake and return provisional OAuth credentials.
Low-level entry point. Most callers should use
DatagroutConduit.Client.bootstrap_onramp/1 instead, which chains
onramp → token exchange → mTLS identity bootstrap in a single call.