OptionalagentAdvanced configuration for customizing AI Assistant agent behavior.
Customize the system prompt, define specialized skills, configure tool execution approval policies.
NutrientViewer.load({
aiAssistant: {
sessionId: 'session-123',
jwt: 'token-here',
backendUrl: 'https://localhost:4000',
agentConfiguration: {
systemPromptTemplate: 'You are an expert legal document assistant.',
skills: [
{
name: 'contract-review',
description: 'Analyze contracts for key terms',
content: 'Focus on liability and payment terms...'
}
],
toolApproval: {
defaults: { default: 'allow', write: 'ask' }
}
}
}
});
OptionalagentAI Agent preset or custom agent ID.
Selects a base agent configuration with different capabilities and behavior.
| Preset | Purpose |
|---|---|
chat |
Read-only Q&A mode. This agent can summarize, extract data, and answer questions. |
agentic |
Full autonomous agent. This agent can read, write, add annotations, fill forms, and redact documents. |
base |
Base configuration. This agent uses defaults for all settings and is intended for customization. |
URL of the AI Assistant service backend.
This should be the base URL where your AI Assistant service is deployed. The URL must include the protocol (http/https) but exclude trailing slashes.
JSON Web Token (JWT) for authenticating requests to the AI Assistant backend.
This token must be issued by your authentication service and should contain user identity claims. The token is sent with every request to the backend.
Session identifier for the AI Assistant conversation.
Use a unique identifier to create a new session, or reuse an existing session ID to restore a previous conversation. The ID must contain only alphanumeric characters.
OptionaluserOptional user identifier for tracking and rate limiting.
Provide a unique identifier for the current user. This enables per-user rate limiting, usage analytics, and audit logging. Must contain only alphanumeric characters.
Configuration for the AI Assistant feature.
Contains authentication details, backend connection information, and optional customization settings for AI Agent behavior.
Example