Tesserav1.0.1
GitHub

The assistant

Tessera can include an assistant that answers questions from Tessera's own records, citing them. It is optional and off by default: until the configuration turns it on, nothing in the app, the API, or the public site mentions it, and no model is ever called. Everything else in Tessera works the same with it off.

What it does, and what it never does#

Admin, Assistant: the provider and model, the last 30 days in exchanges and tokens, and every exchange with who asked, the question, its outcome, tool calls, citations, tokens, and timeAdmin, Assistant: the provider and model, the last 30 days in exchanges and tokens, and every exchange with who asked, the question, its outcome, tool calls, citations, tokens, and time
Admin → Assistant

Asking a question#

With the assistant on, Ask appears in the top bar (and as Ask a question… in the command palette, ⌘K or Ctrl-K). It opens a side panel. Type a question and press Enter.

The Ask panel beside the home page: a question, the steps taken, an answer with numbered citations, and the records it citesThe Ask panel beside the home page: a question, the steps taken, an answer with numbered citations, and the records it cites
Ask

It answers questions such as:

How answers are kept honest#

The assistant looks things up with read-only tools. Each tool asks Tessera's own API, in the same request the person's browser would make, with their session, so it sees exactly what they may see and nothing else. The tools:

ToolWhat it reads
searchPeople, papers, grants, studies, opportunities, and groups, by words
open recordOne record's details
expertsWho works on a topic, and their papers on it
work ofA person's or group's confirmed papers, grants, and studies
Insight figureA metric over a cohort and years, counting confirmed records only
impact threadWhat followed a grant, a paper, or a person's work
opportunity fitWho fits an opportunity, and whether the organization may apply
opportunities forOpen opportunities that fit a person or a group

Then the answer is checked before it is shown:

The instructions the model follows are versioned in the code (assistant/v1), and every exchange records which version it used.

From the API#

With the assistant on, POST /api/v1/ai/ask takes {"question": "…", "previous": "<exchange ID>"} (previous is optional, for a follow-up) and answers with JSON lines as they happen: {"type": "step", "label"} for each lookup, {"type": "text", "text"} as the answer streams, {"type": "discard"} when text written before a lookup is set aside, and last {"type": "done", "status", "answer", "citations", "exchange", "searched"}. status is answered, declined, limited (the daily limit), or failed; each citation has its ref, kind, title, href, and whether it was removed. GET /api/v1/ai/status says whether you may ask and how many requests are left today: daily_limit counts questions and drafts (summaries and biosketch parts) alike, and drafts, like questions, are for the roles in [ai] roles. Like every change, the request needs the session's X-CSRF-Token when accounts are on.

Plain-language summaries#

With the assistant on, a profile or a group can have a short summary of its work for a general reader: patients, donors, students, journalists. Nobody sees a summary until someone responsible for it approves it.

A profile with its approved summary: two short paragraphs in plain language, labeled as drafted with AI assistance and approved by whomA profile with its approved summary: two short paragraphs in plain language, labeled as drafted with AI assistance and approved by whom
A plain-language summary

Drafting a biosketch#

In an NIH biosketch's editor, Draft with the assistant beside the personal statement and each contribution to science writes a first draft from up to eight of the person's confirmed papers (their titles, journals, years, and abstracts) and, for the statement, a sentence or two about the project. It is written in the first person, within NIH's limit, and without citations, as NIH requires; anything that looks like a citation is pointed out. The draft appears in the drawer first; Use this draft puts it in the editor for the researcher to edit. Each draft is an exchange in the log (biosketch/v1). See Profiles for the biosketch itself.

Draft with the assistant: three of the researcher's confirmed papers chosen, and the first personal statement written from them, in the first person and without citationsDraft with the assistant: three of the researcher's confirmed papers chosen, and the first personal statement written from them, in the first person and without citations
Drafting a biosketch's personal statement

Turning the assistant off keeps approved summaries but shows them nowhere, the public site included; turning it back on shows them again.

Turning it on#

Add an [ai] section to the configuration and restart tessera serve. The starting configuration that tessera init writes (and tessera.example.toml) ends with one, commented out, listing every setting: remove the # before [ai] and each setting you need. Keys are never written in the file: the configuration names the environment variable that holds one, and a key written in the file stops Tessera from starting.

provider is the protocol the endpoint speaks:

providerSpeaksWorks with
openaiOpenAI's Chat Completions APIOpenAI, and any endpoint that speaks it: Ollama, vLLM, LM Studio, gateways
anthropicAnthropic's Messages APIAnthropic, and any endpoint that speaks it: Ollama, gateways
bedrockAmazon Bedrock's Converse APIAmazon Bedrock in your AWS account

A model served by Ollama on the same machine, through its OpenAI-compatible endpoint (no key needed):

[ai]
enabled = true
provider = "openai"
base_url = "http://127.0.0.1:11434/v1"
model = "gemma4:31b-cloud"
temperature = 0.2

The same model through Ollama's Anthropic-compatible endpoint:

[ai]
enabled = true
provider = "anthropic"
base_url = "http://127.0.0.1:11434"
model = "gemma4:31b-cloud"
temperature = 0.2

OpenAI's or Anthropic's own service: leave base_url empty and put the key in OPENAI_API_KEY or ANTHROPIC_API_KEY (or name another variable with api_key_env):

[ai]
enabled = true
provider = "anthropic"
model = "the model's name"

Amazon Bedrock: name the region and the model (or inference profile) ID. Tessera reads an Amazon Bedrock API key from AWS_BEARER_TOKEN_BEDROCK, or else access keys from AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN, and signs its requests with them. With an AWS profile or single sign-on, aws configure export-credentials --format env puts them in the environment.

[ai]
enabled = true
provider = "bedrock"
region = "us-west-2"
model = "the model or inference profile ID"

Then check it:

tessera ai check

It sends one short question and one that needs a tool, and says how the model answered. tessera doctor also checks the section once it is on. Every setting is in Configuration.

Trying it on the demo#

The demo (see Getting started) is built with the assistant off. To try it there, add an [ai] section to the end of demo/tessera.toml. This one uses Ollama on the same machine, which needs no key from Tessera; Ollama must be running with the model available, and any of the providers above works the same way:

[ai]
enabled = true
provider = "openai"
base_url = "http://127.0.0.1:11434/v1"
model = "gemma4:31b-cloud"
temperature = 0.2

Then check the connection and start (or restart) the demo:

uv run tessera --config demo/tessera.toml ai check
uv run tessera --config demo/tessera.toml serve

Ask now appears in the top bar: try "Who works on CAR-T cell therapy?" or "How many papers has the organization published each year?", and a question the records cannot answer, such as someone's salary. On a profile, Draft a plain-language summary drafts one for you to review and approve, and Admin → Assistant shows every exchange. Rebuilding the demo with --force writes a new tessera.toml, so add the section again afterwards.

Choosing a model#

The assistant relies on the model to call tools and to cite what they return, so a model needs tool calling. Larger models follow the instructions more reliably. Small local models are fine for trying it out; for everyday use, choose a model your organization trusts with the records the assistant reads, since everything it is sent leaves Tessera.

Describes Tessera 1.0.1. Apache License 2.0. Screenshots show an invented organization; every person and record in them is fictional.