Developers
Connect an AI agent to your company's knowledge in five minutes
Add Thren to any MCP-capable assistant, or call its REST API from your own agent. Either way, your agent asks your company's clusters in plain language and gets answers with sources, under the access rules your admins set.
How does an AI agent connect to Thren?
An AI agent connects to Thren with an API key issued by a company admin. AI assistants and coding tools that support the Model Context Protocol add Thren as a remote MCP server at https://app.thren.in/mcp/ with the key as a bearer token. Other agents and backends call the REST API at https://app.thren.in/api/v1/external. Both give the same answers, with references, from the clusters the key may use.
Quickstart
Three steps from key to first answer
- 1
Get a key from an admin
In Thren, an admin opens Control Panel, then API Keys, creates a key, chooses which clusters it may use and sets its end date. Copy the key and store it like a password.
- 2
Add Thren to your AI tool
For an AI assistant or coding tool that supports MCP, add Thren as an HTTP MCP server with the key as a bearer token. For your own agent or backend, call the REST API with the same key.
- 3
Ask a cluster
List the clusters the key may use, then ask one or more of them a question in plain language. Answers come back with sources, and with tables or files when you ask for them.
Option A
Add Thren as an MCP server
Most MCP clients read a JSON config like this one. Replace YOUR_THREN_KEY with the key from your admin, save, and restart the client. Thren then shows up as a tool the assistant can call.
- Server type: HTTP (streamable HTTP)
- Address: https://app.thren.in/mcp/
- Header: Authorization: Bearer and your key
{
"mcpServers": {
"thren": {
"type": "http",
"url": "https://app.thren.in/mcp/",
"headers": { "Authorization": "Bearer YOUR_THREN_KEY" }
}
}
}Tools Thren gives your assistant
| Tool | What it does |
|---|---|
list_knowledge_clusters | The clusters this key may use, with each cluster's name and purpose. Call it first. |
ask_knowledge_cluster | Ask one or more clusters a question in plain language. Returns the answer with references, plus tables and files when the question asks for them. |
check_knowledge_cluster_query | Fetch the result of a question that is still being worked on, using the query_id it returned. |
Option B
Call the REST API from your own agent
Send the key as a bearer token on every call. Asking is a two-step job: submit the question, then poll for the answer, so long questions never hold a connection open.
1List the clusters your key may use
Each cluster comes with its name and purpose, so your agent can pick the right one for a question.
curl -s https://app.thren.in/api/v1/external/clusters \
-H "Authorization: Bearer $THREN_KEY"[
{ "id": 21, "name": "Sales", "description": "Deals and pricing decisions." },
{ "id": 25, "name": "Support", "description": "Tickets and escalations." }
]2Ask a question
Send the question in plain language with the cluster ids to ask. You get a query id back for each cluster straight away.
curl -s -X POST https://app.thren.in/api/v1/external/query \
-H "Authorization: Bearer $THREN_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "What did we promise Acme at the last review?", "cluster_ids": [21]}'{
"queries": [
{ "cluster_id": 21, "query_id": "b3c1...", "status": "queued" }
]
}3Poll for the answer
Check every few seconds until the status is done. The answer comes with references, and with tables or files when the question asked for them.
curl -s https://app.thren.in/api/v1/external/query/b3c1... \
-H "Authorization: Bearer $THREN_KEY"{
"query_id": "b3c1...",
"cluster_id": 21,
"status": "done",
"answer": "At the October review we agreed to extend the pilot [1] ...",
"references": [
{
"id": 1, "type": "email", "title": "Acme review follow-up",
"date": "2026-10-14", "url": "https://..."
}
],
"tables": [],
"files": [],
"error": null
}What comes back
| Field | What it holds |
|---|---|
status | queued, running, done or error. Poll every few seconds until it is done or error. |
answer | The written answer in Markdown. Markers like [1] point to the references. |
references | What each marker points to: an email, message, document or record, with a link where the key's owner may open it. |
tables | The records the answer was worked out from, as CSV with plain column labels, ready for the next step of a workflow. |
files | Word, PowerPoint, Excel or PDF files the question asked for, each with a download link that expires. |
error | Why the question failed, when status is error. |
Good to know
Built for agents, governed like people.
- A key reaches only the clusters it was given
- Records follow the same access rules as people
- Keys read knowledge; they never act in your connected apps
- Every key has an end date and can be replaced or stopped at once
- Every call shows up in your usage and spend reports
Developer questions
Which MCP clients work with Thren?
Any AI assistant, coding tool or agent framework that supports remote MCP servers over HTTP with a bearer token header. Where a client asks for a URL and a header instead of a JSON config, use the same two values.
Do I need to know which tool holds the answer?
No. Ask the cluster in plain language. Thren works out where to look across the cluster's email, chat, documents and live records, and answers with references.
Can I ask several clusters at once?
Yes. Pass several cluster ids and you get one answer per cluster, each kept within its own cluster's rules. Clusters are never merged into a single answer behind your back.
Can an agent get a file, not just text?
Yes. Ask for it in plain words, such as a slide deck, an Excel sheet or a PDF report. The result lists the file with a download link.
What can a key see?
Only the clusters an admin gave it, and only the records your access rules allow. A key can never read a person's own mailbox or files, and it cannot change anything in a connected app.
What happens when a key ends or is stopped?
Calls with it are refused at once, and its file links stop working. Admins can replace a key with a new one before it ends so an agent can switch over without a gap.
Want a key to try it?
Book a demo and we will set up a cluster and a key for your team, so your agents can ask your own data.