Agents
Where: Settings › Agents
Who can use it: Admins and Owners
Agents connect Tursio to the services around it: the LLM that answers questions, Microsoft sign-in, a redaction service, external applications, and MCP servers. Tursio uses the model, identity provider, and redaction service you choose, so you can change the model, cap daily spend, or mask sensitive data without a redeploy.
The Agents tab
The tab has five sections, in this order:
- AI Agent: the LLM models Tursio uses to answer questions, and an optional daily budget.
- Authorization Agent: Login with Microsoft through your Microsoft Entra app. It appears only when it's turned on at deployment.
- Redaction Agent: a service that masks sensitive data before it reaches the model.
- API Agent: tokens that let external systems query Tursio.
- MCP Agent: status and logs for the MCP servers you add.
(1) Agents tab, (2) add an AI agent, (3) row menu.
AI Agent
The AI agent is the LLM configuration Tursio uses for generation. It works with OpenAI and Azure OpenAI. Tursio treats a Base URL that contains azure.com as Azure OpenAI. You can add one AI agent.
Add an AI agent
- Select + in the AI Agent section, or Add AI agent when none exists.
- Enter the Base URL of your LLM service endpoint.
- Enter the API key. For an Azure OpenAI Base URL, Use Managed Identity (Azure) is also available.
- Add the models. For each model, enter the Display name (your deployment name), the API version, and pick the Model name. Select Add new model to add another row.
- Select Save. Tursio makes a test call with your settings before it saves.
You need one model in each of these slots:
- Reasoning Model
- Summarization Model
- Embedding Model
(1) Display name, (2) API version, (3) Model name, (4) Add new model.
If the test call fails, Tursio shows Invalid Credentials. Please enter valid credentials. and doesn't save. Check the Base URL, API key, and deployment names.
Set up Azure OpenAI
To use Azure OpenAI, create a Foundry resource, deploy a model, and collect the endpoint, deployment name, and API key for the AI agent.
Create the resource
-
Select Create on the Microsoft Foundry page in the Azure portal to start a new Foundry resource, which provides access to Azure OpenAI models.
Microsoft Foundry page with the Create button. -
Enter your Subscription, Resource Group, Name, and Region. Keep or change the default project name.
Basics tab of the Create a Foundry resource form. -
Select Next and review the firewall or network settings if needed.
Networking tab of the creation wizard. -
Select Create on the Review + submit screen.
Review the configuration, then create the resource.
Validate the resource
-
Open the resource. After creation, it appears in the resource list and on its Overview page.
Overview page of the new Foundry resource. -
Check that the status is Succeeded and that the resource is in the subscription and resource group you want.
Deploy a model
- Select Go to Foundry portal on the Overview page (shown in the image above).
-
Open your resource in Microsoft Foundry. Its Overview page shows the endpoints and keys, and the left menu has Model catalog and Models + endpoints.
Foundry portal Overview with endpoints and keys. -
Go to the Deployments section.
- Deploy a model. Select the model type (e.g.,
gpt-4.1), assign a deployment name, and wait for the deployment status to show Succeeded.
Gather the details
-
Open the deployment details page. It shows the endpoint and API key.
Deployment details with the endpoint and keys. -
Copy the Endpoint, Deployment Name, and an API Key.
- Check that your network or firewall allows access, as configured during resource creation.
Test the model
Run the following cURL command in your terminal. Replace the placeholders <your_endpoint>, <your_deployment_name>, and <your_api_key> with the values you collected.
curl -X POST \
"https://<your_endpoint>/openai/deployments/<your_deployment_name>/chat/completions?api-version=2023-05-15" \
-H "Content-Type: application/json" \
-H "api-key: <your_api_key>" \
-d '{
"messages":[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, Azure OpenAI!"}
],
"max_tokens": 50
}'
A successful response looks like:
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"annotations": [],
"content": "Hello! How can I assist you today with Azure OpenAI or anything else?",
"refusal": null,
"role": "assistant"
}
}
],
"created": 1758872481,
"id": "chatcmpl-CJxMvn6onHKYcpXJgPsFVmszUKiJN",
"model": "gpt-4.1-2025-04-14",
"object": "chat.completion",
"system_fingerprint": "fp_9ab7d013ff",
"usage": {
"completion_tokens": 17,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens": 23,
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
},
"total_tokens": 40
}
}
Edit an AI agent
Open the row menu (⋯) and select Edit. You can change the API key and the models. The Base URL can't be changed after you create the agent.
Set a daily budget
A daily budget caps what the AI agent can spend on model calls each day.
- Open the row menu (⋯) on the AI agent and select Set budget.
- Enter the Daily budget limit in dollars, up to two decimal places. Leave it empty for no limit.
- Select Save. The limit shows in the Daily budget limit column.
(1) Daily budget limit column, (2) Set budget.
(1) Enter a daily limit in dollars.
When spend reaches the limit, the question that crossed it still finishes. Tursio then pauses new questions until midnight and shows how much the agent has spent:
New questions pause until the daily budget resets.
How spend is counted
Tursio prices each model call from the provider's published rates. A model with no published price counts as $0, so the real spend can be higher than the figure shown. When that happens, the message says so.
Authorization Agent
The authorization agent turns on Login with Microsoft through your Microsoft Entra app. You can add one authorization agent.
Before you start
- Set
ENABLE_AUTH_AGENT=truewhen you deploy Tursio. Without it, the Authorization Agent section and the Login with Microsoft button don't appear. - Register an app in Microsoft Entra ID (steps below). Sign-in needs the User.Read and User.ReadBasic.All permissions.
- Add each person in All Users with the email they use for their Microsoft account. You can also add a Microsoft Entra group by its object ID.
Register an Entra app
- Sign in to the Azure Portal and search for App registrations in the search bar.
- Select + New registration (or Register an application).
- Fill in the registration form as shown in the screenshot.
- Select Register.
Register an application form.
- Copy the Application (client) ID from the app's Essentials section. You need it for the authorization agent.
Application (client) ID in Essentials. The IDs are blurred in this screenshot.
Next, create a client secret:
- Go to Certificates & secrets › Client secrets in the app registration.
- Select + New client secret.
- Enter a description, for example "internal-common-secret".
- Choose a rotation period (e.g., 6–12 months per your policy). Record the expiry date and rotate the secret before it expires.
- Select Add.
- Copy the Secret Value right away. It's shown only once. Store it securely (Key Vault, secret manager, or password manager). If it's lost or expired, create a new secret and update the authorization agent.
New client secret on the Client secrets tab.
Add a client secret panel.
Copy the Value. The secret value and ID are blurred in this screenshot.
Add the authorization agent
- Select Add auth agent in the Authorization Agent section.
- Enter the Client ID: the Application (client) ID of your Entra app.
- Enter the Client Secret, or turn on Use Managed Identity (Azure). With managed identity, no secret is stored. Add a federated credential for the VM's managed identity to your Entra app.
- Enter the Authorization URL: your Microsoft Entra ID authorization endpoint.
- Enter the Redirect URI: your portal's callback URL. It must use HTTPS, end with
/ms(for example,https://yourportal.com/ms), and exactly match a redirect URI registered in your Entra app. - Select Add. The Login with Microsoft button appears on the portal's sign-in screen.
Users sign in with their Microsoft account.
Teams access control
Turn on Teams access control to allow only Teams users who have Tursio access to use the Teams agent. What changes when it's on is described in Access Control.
Teams access control needs two more application permissions on your Entra app: User.Read.All and GroupMember.Read.All.
(1) Teams access control shows On or Off.
For Teams setup, see Configure the Teams agent.
Redaction Agent
A redaction agent connects a redaction service that masks sensitive data before it reaches the model. Tursio sends each question, every prompt to the model, and text sent to the embedding model through the service first. You can add one redaction agent.
Add a redaction agent
- Select Add redaction agent.
- Enter a Name and the Endpoint URL. The URL must start with
https://. - Choose how Tursio signs in to the service. Enter an API Key, or turn on Use Managed Identity (Azure) and enter the Application ID URI (for example,
api://<client-id>). - Set the Timeout (ms). The default is 1000. The maximum is 1200000 (20 minutes).
- Test the service. Enter Sample text and select Run test. The Redacted output shows what the model would receive.
- Select Save. Save stays disabled until the test passes, and changing any setting resets the test.
(1) Use Managed Identity (Azure), (2) Timeout, (3) Run test, (4) Redacted output.
If the service fails
Redaction fails closed. If the service times out or returns an error, Tursio doesn't send the unredacted text to the model. A timeout that's too short for your service blocks questions, so test with realistic text.
Redaction service contract
- Tursio sends
POSTwith the JSON body{"prompt": "<text>"}. - The service returns HTTP 200 with
{"text": "<redacted text>"}. - With an API key, Tursio sends it in the
x-functions-keyheader. With managed identity, Tursio sends aBearertoken for the Application ID URI. - Tursio retries once after a timeout, a connection failure, or a 5xx response.
To remove the agent, open its row menu (⋯) and select Delete. This can't be undone.
API Agent
An API agent lets an external system or application query Tursio. Each agent issues one or more access tokens that the external service presents as its credential.
Add an API agent and token
- Select + in the API Agent section, or Add API agent when none exists.
- Enter an Agent name and select Create agent. The name must be at least 7 characters, use only letters, numbers, and spaces, and not start or end with a space. You can't rename the agent after you create its tokens.
- Create a token. Select + next to Tokens. The token appears with its Expiration date. Tokens are valid for two years.
- Copy the token and use it as the credential in your external application.
(1) Create a token, (2) its expiration date.
You can create several tokens for one agent. Each agent's Status is:
- ACTIVE: its latest token hasn't expired.
- NOT_ACTIVE: its latest token has expired.
- NO_TOKEN: it has no tokens.
(1) Add an API agent, (2) each agent's status. Token keys are hidden in this screenshot.
Deleting an API agent
Delete in the row menu removes the agent and all of its tokens. Applications using those tokens can no longer query Tursio.
MCP Agent
An MCP agent points the portal at an MCP server you've deployed, so you can see its status and read its logs here. To deploy the server, see MCP server.
Add an MCP agent
- Select Add MCP agent.
- Enter a Name, the Host URL, and the API Key. The Host URL is the MCP server's root, for example
http://host:8000, not the/mcplink that clients use. The API key is the MCP server's own API key. - Select Validate. Tursio checks that the server is reachable and that its logs can be read.
- Select Save. You can save only after validation passes.
The section lists each MCP agent with its Name, Container, Dataset, and Status. ACTIVE means Tursio can reach the server. UNREACHABLE means it can't. Tursio checks every 60 seconds. Select the refresh button to check now.
(1) Refresh status, (2) ACTIVE means the server is reachable. Container and dataset are hidden in this screenshot.
Read MCP agent logs
Open an agent's row menu (⋯) and select Tail logs to open MCP Agent Logs, a live tail of the server's log file. It refreshes every 3 seconds and keeps the latest 1000 lines. Use Search logs to filter, and the buttons on the right to copy all logs or refresh. Logs are available only while the agent is reachable.
(1) Search logs, (2) copy all logs and refresh. Log lines are hidden in this screenshot.
Tips and limits
- You can add one AI agent, one authorization agent, and one redaction agent.
- Adding an MCP agent with the name of an existing one replaces that entry.
- A budget stays in place when you edit the AI agent. To remove it, clear the Daily budget limit and save.
- Budgets reset at midnight in the portal's time zone. The default is UTC.