datarobot_genai.dragent.cli.remote
remote
HTTP client helpers for remote DataRobot API commands.
get_auth_context_headers
Build X-DataRobot-Authorization-Context header for CLI requests.
Fetches user identity from DataRobot, encodes it as a JWT that DRAgentAGUISessionManager decodes to extract user_id.
Returns an empty dict when SESSION_SECRET_KEY is not set, allowing the agent to run without auth context (e.g. local-only usage).
Source code in datarobot_genai/dragent/cli/remote.py
get_local_auth_context_headers
Build X-DataRobot-Authorization-Context header for local server requests.
Uses SESSION_SECRET_KEY and DATAROBOT_USER_ID from env vars. Returns an empty dict when SESSION_SECRET_KEY is not set.
Source code in datarobot_genai/dragent/cli/remote.py
require_auth
Return (api_token, base_url) from the group context, or raise.
Source code in datarobot_genai/dragent/cli/remote.py
normalize_base_url
build_agui_payload
Build an AG-UI RunAgentInput payload from a single prompt string.
Source code in datarobot_genai/dragent/cli/remote.py
stream_agui_events
POST to an AG-UI /generate/stream endpoint and print text events.