Summary
An agent is an assistant you ask, in plain language, to act on a project: build a cohort, add a chart, propose concept mappings. It runs in a chat client — LibreChat, in a tab beside Linkr, or OpenCode — and acts on Linkr through the MCP server, with your permissions and never more. Each of its changes shows up in Linkr before your eyes, in the notification bell.
Why an agent
Some tasks are long without being hard, others are genuinely difficult. The agent helps with both, for different reasons.
Building a cohort is the clearest example. The agent can query the database to find which concepts are actually present, under which codes, how often. Someone who does not know a warehouse well will miss equivalent codes; the agent looks for them, builds the criteria, runs the cohort and reads the attrition — how many patients remain after each criterion — to spot a criterion that removes nobody.
Then comes code. Describe the analysis you want, get an R or Python script in the project’s IDE, run it, read the result, fix it.
Finally, repetitive tasks: assembling a dashboard widget by widget, documenting a dataset’s columns, or going through hundreds of local codes to map to OMOP. They are perfectly doable by hand, but pleasant to dictate.
What an agent can do today
| Area | Example requests |
|---|---|
| Warehouse | Describe a database, look up a concept with its counts, run a read-only SQL query. |
| Cohorts | Create and edit a cohort, run it, produce its report, freeze it, import an ATLAS definition, derive a database restricted to the cohort. |
| Concepts | Read the workspace’s concept sets, manage the project’s concept lists. |
| Datasets | Create a dataset from a query, rename or remove columns, document a variable. |
| Dashboards | Create a dashboard, add tabs, widgets and filters. |
| IDE | Read and write the project’s scripts, run R or Python and get the output and figures back. |
| Concept mapping | Browse source concepts and their metadata, search the OMOP vocabulary, leave suggestions to review. |
| Quality and ETL | Run a quality rule set and investigate a failing check; read, write and run an ETL pipeline’s scripts. |
| Catalog and wiki | Create and compute a data catalog; read, search and write wiki pages. |
| Environments | Install or update R and Python packages, run a script as a background job and follow its progress. |
| Documentation | Search this documentation and cite the page, to answer “how do I… in Linkr?”. |
The agent also knows where you are in Linkr: the open project, the cohort or dashboard on screen. “Add an age histogram here” therefore targets the tab you are looking at.
Mapping concepts with a skill
For concept mapping, a skill shipped with Linkr tells the agent which method to follow: read each code’s metadata, justify each choice, validate nothing on your behalf. Its proposals land in the Suggestions tab, where you review them.
You stay in control
You see every change
Linkr updates while the agent works: an added widget appears in the open dashboard, a modified script in the IDE. Each change is also listed in the Notifications bell at the top of the screen — “Added by MCP”, “Modified by MCP” — with a link to the item.
For bulk changes, Show details opens the full list: for instance every mapping suggestion left, with its source concept, its target and the agent’s comment. What an agent does to a cohort, a dashboard, a tab or a widget — adding, modifying, deleting — and the creation of a dataset can be reverted straight from the notification, with Undo, as long as the item has not changed since.
- Mapping project « Labs — Hospital »24 AI suggestions addedAdded by MCP · now
- Dashboard « Cohort description »Widget « Age histogram » addedAdded by MCP · 2 minutes ago
- Cohort « Sepsis-3, adults »Modified by MCP · 6 minutes ago
- Dashboard « Cohort description »Tab « Draft » deletedDeleted by MCP · 1 hour ago
You confirm the actions
Confirmation is set in the chat client, not in Linkr. Every tool Linkr exposes states whether it only reads, modifies, or deletes: a well-configured client lets reads through and asks for your approval before the rest.
The agent never has more rights than you
The agent acts with your API key, so with your permissions, re-checked by the server on every action. If you cannot edit a dashboard, the agent you drive cannot either.
Some actions stay out of its reach by construction: no tool gives them to it.
Out of the agent’s reach
- Managing permissions and members.
- Creating, listing or revoking API keys — even its own.
- Deleting a project or a workspace.
- Pushing to a remote git repository.
- Reading secrets: database connection passwords are encrypted and never returned.
- Modifying a database: the SQL queries it runs are read-only.
An instruction given to a model can be worked around; a missing tool cannot. An agent without a tool does not refrain from using it — it is unable to.
The question of the model
This is the point to settle before anything else, and it belongs to the institution. The model is chosen in the chat client — LibreChat lets the administrator decide which ones are offered.
Local model
A model installed on the institution’s machines. Exchanges never leave the institution, and the agent can work on clinical data.
Remote model
A service hosted by a third party. Everything the tools return to the model — query results, concept metadata, script excerpts — leaves the institution.
Prefer open source and local models
Outside health data, Linkr can be used with a model reached through an external provider’s API. It is however strongly advised to use open-source tools — LibreChat, OpenCode — and locally hosted models. Linkr does not filter what the tools return to the model: with a remote model, stick to open or synthetic data — MIMIC-IV Demo, an ATHENA vocabulary —, never real patient data.
Why server mode only
The agent goes through Linkr’s API, which a browser-only install does not have. See Deployment modes.
What is not settled yet
- A chat built into Linkr, in a side panel, rather than in a tab beside it. It will be decided after real use of LibreChat: what matters most — watching changes arrive, undoing them — already works whatever the client.
- More restricted API keys: read-only, or limited to one project.
- Undoing a whole conversation turn, rather than change by change.
Going further
- Install LibreChat — the client we recommend, and its setup for your install.
- MCP server — create your API key and connect LibreChat or OpenCode.
- Skills — the procedures the agent applies, including concept mapping.