FAQ
Frequently asked questions
Does backend config require app restart?
Not always. SDK periodically refreshes remote config via GET /v1/sdk/config.
- Default refresh interval: 60 seconds (production), 15 seconds (debug)
AI.getConfig()always returns latest merged snapshot- App restart only needed if app is idle and no refresh loop running
To force immediate refresh, restart the app.
Where should non-secret config live?
Use backend YAML (backend/config/kycis.yaml) for product/runtime settings.
Reserve environment variables and secret stores for:
- API keys
- LiveKit credentials
- Database passwords
- Signing secrets
How do I verify what the agent currently knows?
Inspect backend context:
GET /v1/assistant/context/{session_id}Response includes:
- Current
screen latest_eventpayloadlast_validation_failure- Component hints from
component_input - KYC knowledge base rules
Also check /api/activity for recent events.
Can I disable voice and use text-only?
Yes. Voice is optional:
// Don't set voice listener
// Don't call startAssistant()
// SDK still provides:
// - Event tracking
// - Trigger evaluation
// - Validation telemetryBackend handles voice dispatch via LiveKit. Skip if not needed.
What's the difference between error_reported and validation_failed?
| Event | SDK Method | Sets last_validation_failure | Use For |
|---|---|---|---|
error_reported | AI.trackError() | No | Network, UX, generic errors |
validation_failed | AI.trackValidationFailure() | Yes | Field-level validation failures |
Validation failures populate session state for trigger and context.
Why is session_id sometimes "unknown"?
In current Android SDK implementation, AI.setUser() may send session_id: "unknown" before a real session exists.
This event may not associate with the real SDK session in backend store until session is established.
How do I mask/redact PII in hints?
Always set masked = true and redact values:
AI.reportComponentInput(
componentId = "phone_field",
hint = "98****7654", // Redacted
masked = true
)Backend feature integration.assistant_echo_component_values controls whether agent can echo hints.
Can I have multiple assistant prompts per session?
Yes, with feature flag:
if (AI.getConfig().isFeatureEnabled("allow_multiple_assistant_prompt")) {
// Multiple prompts allowed with cooldown
}Default: one prompt per app session (with cooldown).
What's the difference between screen and screen_id?
Both identify current screen:
screen— semantic name (e.g., "pan_entry")screen_id— technical identifier (e.g., "com.app.PanActivity")
Use consistently. Backend uses either for context building.
How do I test trigger behavior?
- Enable backend flags:
trigger.v2_scoring,trigger.policy_engine - Set
passiveEvalEnabled = truewith short interval - Create conditions:
- Stay on screen 20+ seconds →
high_time_spent - Cause 2+ validation errors →
repeated_errors
- Stay on screen 20+ seconds →
- Check
/api/activityforkind: "trigger"
Why does backend restart clear all data?
Session store is in-memory only by default:
# backend/app/services/store.py
class InMemorySessionStore:
# Data lost on restartFor persistence, enable SQLite:
SESSION_STORE_BACKEND=sqlite
SESSION_STORE_SQLITE_PATH=.kycis-session-store.sqlite3Can I use my own UI for confirmation dialog?
Yes, control trigger behavior:
RuntimePolicy(
triggerStartMode = TriggerStartMode.COOLDOWN,
// Or IMMEDIATE for direct start
)
// Then implement your own UI
fun onTriggerDetected() {
showCustomDialog()
}Skip CONFIRM_UI mode for custom UI.