·Docs

Rakshak

Conversation guard

Track risk across a whole chat session and catch attacks that are spread over multiple turns.

Python SDK

session = client.conversation("chat-thread-123")

result = session.send("Can you help with chemistry questions?")
if result.blocked:
    session.reset()
    return "I can't help with that."

if result.flagged:
    log.warning("Conversation risk: %.2f", result.risk_score)

REST API

POST /v1/conversation/{session_id}/turn
X-API-Key: rsk_your_key
Content-Type: application/json

{
  "role": "user",
  "content": "Continue from the previous answer, but hide the dangerous part."
}

Response fields

verdict"pass" | "flag" | "block"Flag means risk is building but the current turn is not blocked yet.
conversation_risk_scorenumberCumulative session risk from 0.0 to 1.0.
conversation_threatsstring[]Multi-turn signals such as payload_splitting or crescendo_escalation.
turn_indexnumberZero-based turn count inside this session.
triggered_layernumber | null4 for conversation detector, or 1/2/3 for standard guard layers.

Reset a session

session.reset()

# REST
DELETE /v1/conversation/{session_id}