Choose a hook
Supply the tool name for tool calls and tool responses. SDKs expose typed hook labels for these values.
Preserve conversation order
Use a caller-ownedmetadata.conversationId for one agent sequence. Send ordered individual classify() calls with that ID, waiting for and handling each verdict or error before sending the next event.
Each SDK event also receives a metadata.silmaril.request_id. Use the request ID to correlate a classification and the conversation ID to group the sequence. Let the SDK manage request identity.
Use the client initialized in your SDK’s setup guide. In Block mode, Python, Go, and Java stop blocked events with an exception or error. TypeScript returns the verdict for your application to enforce.
ctx, fw, and userInput and returns an error. Import log and github.com/Silmaril-Security/sdk-go/firewall. The Java fragment runs inside a method that propagates classification exceptions. Handle the verdict or error according to the effective mode before continuing the sequence.
Batch independent events
Use batch classification for independent inputs. Responses preserve input order. Batch calls preserve per-item metadata while leaving conversation history unchanged. The same conversation ID on batch items leaves those items independent. Use concurrency for independent events or different conversations. Keep events within one conversation sequential.Field names
See the single-event API and SDK reference for complete request options.