Java Sessions
Use session start to establish identity and reusable defaults for policy, route, and risk.
Java
var session = client.session().start(new SessionStartRequest()
.agent("refund-agent")
.subject("customer:42")
.metadata(Map.of("channel", "support"))
.policy(new PolicyRef("policy/default", "2026-02-27"))
.route(new RouteRef("openai", "gpt-4o-mini", "us-east-1"))
.risk(new RiskRef(22, "allow"))
);Session Default Inheritance
- Session-level
policyandrouteare optional - If omitted in execute calls, DriftGate inherits from session
- If omitted in both places, backend org/workspace defaults apply
Operational Guidance
- Set
subjectfor tenant-level attribution - Store session ID for deterministic replay workflows
Last updated on