Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.carelane.io/llms.txt

Use this file to discover all available pages before exploring further.

The AI Agent is a persistent side panel inside every study that combines multi-model chat, a prompt library, and pathway-editing tools in one place.

Opening the Side Panel

Click the AI Agent button in the study toolbar. The panel opens on the right and stays open as you navigate — your open chat, selected model, and attached context persist until you explicitly reset. The panel has three tabs:
TabPurpose
AgentThe chat interface itself
PromptsA library of pre-built prompts grouped by category
ModelsPer-chat model selection
The AI Agent is only available to study team members inside a study context.

Models

Four models are available. Select one per chat from the Models tab; your selection persists for the session.
ModelTagWhen to use
Claude Sonnet 4.6RecommendedDefault — balanced speed and quality for most tasks
Claude Opus 4.6AdvancedDeep reasoning on complex clinical logic
Gemini 2.5 FlashFastQuick answers, lightweight summarisation
Gemini 2.5 ProAdvancedLong-context tasks, PDF-heavy analysis
Model selection persists for the current session.

Context — What the AI Can See

The Agent automatically attaches relevant context based on where you are in the app:
  • Study metadata — key study information is always included, so you don’t have to restate which study you are in
  • Active artifact — the CRF version, workflow, or document you are viewing
  • Participant context — when you are on a participant page, the pseudonym and record are passed along (only if you have participant-data roles)
You can also attach files manually:
File typeLimit
PDF, plain text (.txt), Markdown (.md, .markdown)15 MB per file
PDFs are extracted server-side using Gemini 2.5 Pro with a prompt that preserves tables, diagrams, lists, and document structure. Extracted content is cached by content hash, so re-attaching the same file in a later conversation is instant.

Tools the AI Can Call

Some prompts cause the AI to call tool functions — read-only utilities that fetch data from your study, plus the AI Pathway Builder tools for editing pathways. Read-only tools (available everywhere):
  • Get study info, list and read documents
  • List and read CRF versions
  • List and read workflows
Conditional tools:
  • Get participant record — only if you have participant-data roles and a participant is in context
  • AI Pathway Builder (suggest pathway outline, section detail, questionnaire edit) — only when you are viewing a CRF version and have the Study AI Prompts permission
Tool calls are validated server-side against your permissions. The AI cannot use a tool you do not have access to. See the AI Pathway Builder for details.

Starting, Resetting, and Limits

1

Type a Prompt

Ask a question, request help, or describe what you want to build.
2

Attach Context (Optional)

Attach a PDF, Markdown, or text file via the Attach file button.
3

Send

The AI streams its response in the panel. Tool calls surface as status messages (for example, “Working…”).
4

Reset Chat When Done

Click Reset Chat to clear history and start fresh. Resets are scoped to the current chat context.
Built-in limits (enforced silently with a toast when hit):
LimitValue
Message size3.5M characters
File size15 MB per attachment
History sent to the modelLast 50 messages
Tool calls per response10

Privacy — “Private Mode”

The panel shows a Private Mode tag. This signals the AI’s data contract:
  • Your inputs are sent to the selected model provider only for the duration of the request.
  • Conversation content is discarded after use and is not stored long-term by Carelane.
  • Data is not used to train the model.
  • Conversations are kept only in your browser’s memory for the current session.
Every AI request is still written to the study’s audit trail with the model used, token counts, and duration — for compliance traceability, not content storage.

Prompt Library

The Prompts tab contains pre-built prompts organised by category (study setup, data collection, troubleshooting, pathway building). Click a prompt to insert it into the input; edit before sending.

Best Practices

Use Sonnet 4.6 by default. Switch to Opus 4.6 for intricate clinical logic, or Gemini 2.5 Pro when you are working with large PDFs.
Navigate to the relevant artifact (study page, participant, CRF version) before asking — the AI will pick it up automatically.
Long chats drift. If you switch topic, reset rather than continuing.
When the AI proposes pathway edits via its tools, review each ghost suggestion card before accepting.

AI Pathway Builder

Inline AI suggestions for pathway structure.

AI Study Wizard

Generate a study from a protocol document.