Skip to main content

Agents & Governance

Tietai ships a catalog of ready-made agents and a set of controls around them. This page explains what each control does, what it is set to by default, and where you change it. To build an agent, see Create and run an agent.

Several of these controls are off or audit-only by default. That is stated on each one, because a control that only logs does not protect anything.


What an agent is​

An agent is a language model with a prompt, a set of tools it may call (for example a FHIR query or PubMed search), and optionally sub-agents. It works in a loop: think, call a tool, observe the result, repeat until it can answer.

Find agents under Tiet · Agentic → Agents, chat with them in Agent Workspace, review runs in Monitor, and decide pending SEPL proposals in Reviews. All four are under Tiet · Agentic → Agents in the sidebar.

The base catalog has about 110 agents across coding and billing, clinical decision support, documentation, nursing, pharmacy, specialty care, operations, research, telehealth, compliance, rehabilitation, allied health and others. Three of them (Revenue Cycle Optimizer, Clinical Workflow Orchestrator and Chronic Disease Management) are single agents that coordinate other agents through their sub-agent list.

You can run an agent directly, call it through the API, put an Agent Executor node in a workflow, or design a multi-stage agent graph (Build an agent graph).

Versions​

An agent's deployed version is frozen. A change is a new draft version that only reaches the running agent when you deploy it, and every version stays readable. An agent graph has the same idea: a published version never changes. The detail is in Create and run an agent.

Re-running a graph version uses the same prompts and tool versions, but model output can still vary between runs.


How much an agent may do: autonomy ceilings​

Every agent run and every graph run resolves an autonomy ceiling. Each tool and each fixed graph handler has an effect class, and the ceiling decides which classes the run may use.

Autonomy ceilings: research_only is always enforced, propose is enforced only when HYDRA_AUTONOMY_ENFORCEMENT is enforce, autonomous allows every class

CeilingEffect classes allowedWhen a run gets it
research_onlyread, research_recordThe agent or graph declares research_only in its compliance block.
proposeread, research_record, proposeThe agent is regulated or affects clinical output, or has any compliance_level other than empty or none. A graph with no compliance block also gets propose.
autonomousevery class, including writeEverything else.
  • Read is a lookup with no side effect. research_record writes only to the research results store. Propose creates something a person must decide on (the graph handler fhir.propose, and request_access). Write changes a clinical or operational system or contacts a person.
  • A tool that has no entry in the effect table counts as write, so a new or mistyped tool is never silently allowed.
  • A nested run (an agent that delegates, or a graph that runs an agent) takes the stricter of its own ceiling and its parent's. An agent run whose caller resolved no ceiling runs as propose.
  • A tool above the ceiling is removed from the list the model is offered, and refused again if the model calls it anyway. A refusal writes a runtime.tool_denied record to the audit chain and a tool_denied event on the run.

Where enforcement mode matters​

research_only is always enforced. The propose ceiling follows HYDRA_AUTONOMY_ENFORCEMENT:

ValueEffect on the propose ceiling
unset or audit (default)A write tool still runs. The would-be refusal is recorded as a mode: audit record.
enforce, or any other valueWrite tools are removed and refused.

So in a default install, a clinical agent can still call a write tool; the ceiling only records that it should not have. The pilot-clinical deployment profile requires enforce. Review the audit records on a production system before you switch it.

An agent that is research_only also cannot run inside a consult, and a pipeline that runs one may contain only read and research_record nodes; it is refused with HTTP 422 before it starts.

Catalog agents such as Laboratory Results Interpreter and Drug Interaction Checker carry compliance_level: hipaa, so they resolve to propose.


Self-improving prompts, under human control​

SEPL (Self-Evolving Prompt Loop) proposes improvements to an agent's prompt, its tools or its configuration, tests them on a copy, and commits one only if the checks allow it. It can change prompts, tool definitions and agent configurations, not only prompts.

SEPL cycle: trigger, reflect and select, improve into a shadow version, eval, check invariants, then the commit gate sends the candidate to commit, human review, rejection or no commit

Triggers. A cycle starts from a sepl.evolve.request event, from Run Evolution in the agent's Evolution tab, or automatically when an agent's success rate degrades over a rolling window. SEPL is not controlled by environment variables.

Stages.

  1. Reflect and select. It reads recent execution traces, ranks hypotheses about what is failing, and picks the highest-confidence one.
  2. Improve. An LLM writes a shadow version. The live agent is not touched.
  3. Eval. It replays past inputs against the shadow. The shadow passes only if task_success_rate and schema_adherence both improve on the live version.
  4. Check invariants. The server runs one check, the permission delta. A proposal that adds a sub-agent, raises max_sub_agent_depth or the HAGP mode, lowers or changes a compliance flag, exposes the agent as an inference endpoint, turns on memory, or changes the model destination is queued for human review in every mode and never commits on its own.
  5. Commit gate. The outcome depends on the agent's HAGP mode.
HAGP modeWhat happens to a candidate
offNothing is evolved.
rspl_onlyVersioning only; no commit.
proposeQueued for human review; never auto-committed.
autonomousCommitted if Eval and the invariants pass.

The mode you set is capped by a compliance ceiling. A regulated agent, or one that affects clinical output, can be at most propose, even if autonomous is chosen. The Evolution tab then shows "Mode downgraded to propose (compliance ceiling: propose)".

Where you work with it. Open the agent, then Evolution. Set HAGP Mode (Off, RSPL Only, Propose, Autonomous). Run Evolution is enabled only in Propose or Autonomous. SEPL Parameters are Max Iterations, Stagnation Rounds, Cooldown (minutes), Cost Cap (USD) and Min Confidence. Pending proposals appear under Pending Reviews with the current and proposed prompt side by side; each has Approve and Reject (Confirm Reject, with an optional rationale). Approving makes the shadow the live version. Below that, SEPL Evolution History lists past runs and their outcomes: Accepted, Queued for Review, Rejected, Stagnation, No Hypotheses, Cooldown and Already Running.

Stagnation, cost cap and cooldown are per-agent settings, not environment variables. After the configured number of consecutive rounds with no improvement, evolution for that resource stops.

Reviews queue. Tiet · Agentic → Agents → Reviews ("SEPL commit reviews") lists every proposal waiting for a human decision across all your agents, so you do not have to open each agent. It needs read or update permission on agents. Each row shows the proposal's status, confidence, the shadow version, whether Eval and the invariants passed, a shield icon when it is compliance relevant, and an Open agent link. Claim assigns it to you (shown only while unassigned). Approve activates the proposed version. Reject asks for a rationale of at least 10 characters here (the Evolution tab accepts an empty one; the server substitutes "Rejected via Hydra Studio" for anything shorter than 10 characters) and records the rejection, which starts the agent's cooldown. When nothing is waiting the page says "No pending reviews." The list refreshes every 30 seconds, or use Refresh.

note

The upstream SEPL guide says reviews are under Studio → Settings → SEPL Reviews. There is no such screen; the queues are Agents → Reviews (all agents) and the agent's Evolution tab (one agent).

SEPL's code also contains an adversarial probe package (prompt injection, jailbreak, schema fuzzing, boundary stress) and further invariants (SBOM, static analysis, schema compatibility, domain allowlist). Nothing in the server imports the probe package, and the upstream guide says the extra invariants are not wired into the runner today, so do not count on them.


Controlling what agents can reach​

Two separate mechanisms limit outbound traffic. They apply to different things. (The egress policy engine also evaluates model provider calls and the platform's own backing-service calls such as the DICOM service; see the end of the egress section.)

Tool egress policy​

Open Platform → Egress policy. It controls which hosts, HTTP methods and paths each agent tool may call.

  • Platform rules ship with the platform for the built-in tools (for example PubMed, ClinicalTrials.gov). You can read them in the Platform rules tab but cannot change them.
  • Organization rules are a YAML document you edit in the Organization rules tab, added on top of the platform rules. Rules bind a subject (a tool, connector or sandbox) to endpoints (host, port, and for REST, methods and paths). A request that no rule allows is denied, and a matching deny rule always wins. Validate checks the document; Save stores it as a new revision with the change note you type. The History tab keeps every revision, and you roll back by saving an older document.
  • The Suggestions tab lists requests refused, or that would have been refused in audit mode, in the last 30 days, with the narrowest rule that would allow each. Load suggested rules into editor puts them in the editor for review.
  • A save that widens access (a new destination, more methods or paths, a removed deny rule, or enforce relaxed to audit) is not stored at first. It returns a review step with the permission findings, and you confirm and resubmit. A change that only narrows access is stored directly.
  • Loopback, cloud-metadata and unpinned private addresses are always refused, whatever the policy says.

Effective mode (top right of the page) is Audit or Enforce. The organization can inherit the platform mode or override it. The page says it plainly: "Audit logs what would be refused; enforce refuses it." The platform default, set by HYDRA_EGRESS_ENFORCEMENT, is audit, which logs a "would be denied" warning and blocks nothing. In enforce, denied requests are refused, except at endpoints whose own enforcement is still audit. The value off exists only at platform level and leaves just the hard-deny layer.

Model provider calls (subject model:<provider>) and platform service calls (service:tietai-dicom-service) go through the same engine but are capped at audit by default, by HYDRA_EGRESS_MODEL_ENFORCEMENT and HYDRA_EGRESS_SERVICE_ENFORCEMENT, so a would-be denial is logged, not blocked, until you set enforce. A cap never raises the platform mode. Add rules for self-hosted model endpoints (vLLM, Ollama) before enforcing.

Before you move an organization to Enforce, add rules for each connector (the Suggestions tab helps), or those connectors stop.

A graph node with access_requests: true can ask for a destination that was refused. That becomes a human review that only an organization egress administrator can approve; approval appends the rule as a new revision.

PHI egress guard (model calls)​

This guard is separate from the tool policy. Text going to a model passes HYDRA_PHI_EGRESS_MODE before it leaves the process. It covers the whole request: system prompt, history, tool results and attachment text. Default deid:

ModeEffect on a non-internal model endpoint
deid (default)Text is de-identified; if that is impossible the call fails closed. Images, audio and files are refused.
blockRefused.
allowlistAllowed only for hosts in HYDRA_PHI_EGRESS_ALLOWED_HOSTS.
offNo enforcement. Not for production.

Genomic content (HGVS expressions, VCF/BAM/CRAM, drs:// uris, the GERMLINE label) sent to a non-permitted endpoint is refused in every mode except off, with reason genomic_content; it is never de-identified into passing.

A hosted endpoint you have a processor contract with, such as a Vertex AI regional host, must be listed in HYDRA_PHI_EGRESS_ALLOWED_HOSTS; otherwise deid de-identifies what is sent to it. Commercial LLM SaaS hosts are never permitted by the list.

What is not built​

Agents do not use placeholder credentials. A design for "credential binding", where the model sees only a placeholder and the real secret is injected at call time, is described in a draft design document, and the egress code contains no such mechanism. Do not assume tool arguments are scrubbed of secrets. Credentials for connectors are resolved on the server by the connector, not typed into prompts.

Changes to an agent's permissions follow a permission-delta gate: adding a tool that can act, widening an egress policy, or a SEPL proposal that widens access produces findings that a person must confirm. For agent tool assignment and graph publish, whether this is enforced is set by HYDRA_PERMISSION_DELTA_MODE. For the egress policy and SEPL proposals it is always on.


When a model fails​

Model fallback, loop protection and durable runs are features of agent graph nodes. A single agent does not have them.

Model fallback: the provider client retries twice, then a declared fallback model is tried if the error allows it, otherwise the step fails

Model fallback. An LLM node can declare up to 3 fallback_models. They are tried in order when the model call fails with rate limiting (429), a server error (408 or 5xx), a transport failure, 402 or 404. They are never tried for 401, 403 or a bad request, because another model would hide a configuration error, nor for budget or egress refusals. Nothing is substituted unless the node declares it. Each hop is checked by the PHI egress guard and egress policy for its own endpoint, so a fallback the policy refuses never receives the request. The step records step.model_fallback and model_used, and every hop spends budget, so max_model_calls bounds the chain. Standard tool-loop nodes only; RLM and ParSer nodes ignore it. Before any fallback, the provider client retries transient errors itself (two retries for the OpenAI and Anthropic SDKs and the Gemini adapter).

Durable runs are off by default. With HYDRA_GRAPH_DURABLE_RUNS=true and a node marked retry_safe, a run can pause for a human decision and resume, including after a restart. Without them, a run does not wait.

Loop protection is off by default and is set per graph version, because each option changes what the model reads:

  • wrap_up_turn: when a node spends all its tool rounds still calling tools, make one more model call asking it to answer from what it has and say what is missing. Without it the node ends with no content and fails.
  • repeat_advisory: when the same tool call returns the same result twice in a row, tell the model. The call still runs.
  • untrusted_fence: wrap tool results in markers that mark them as data, not instructions.

step.rounds_exhausted is always emitted when a node runs out of rounds.

Spend budgets. An organization can define a spend budget for an agent or graph. When an active hard budget is spent, a new agent turn or graph run is refused; runs already in progress are never stopped.


AI Compliance​

Tiet · Agentic → Compliance is the governance workspace for AI systems, aimed at the EU AI Act and EU MDR. It opens on an Overview (tiles for systems governed, assessed, high or critical, gated, open incidents and audit records, then the policy risk matrix) and has six more tabs, each also a sidebar entry. The header has Run reconcile (re-syncs the automatically registered systems) and Register external system. The Audit tab is shown only to users who may view the audit chain.

TabWhat it does
SystemsThe inventory. Agents, graphs, registered models, AI-bearing connectors and LLM tools are registered automatically and kept in step with their real status. External or bought systems are registered by hand with Register external system, whose dialog is titled "Register external AI system" (name, system type, origin, vendor, intended use, clinical context, patient-facing, owners). Each shows its risk tier and HAGP mode.
PoliciesPolicy packs (EU AI Act and EU MDR subsets are included) listing requirements and controls, with the evidence each control needs.
GatePre-release evaluation suites. Run gate runs a profile (Baseline, Full or Deployment) and issues a signed Verdict: Pass, Conditional or Fail. A run needs an approved risk assessment first.
WatchMonitors that re-run suites on a schedule and flag drift against the Gate baseline. Provision the default monitors after a Gate run sets a baseline. Confirmed drift opens an incident.
CAPACorrective and preventive actions. See below.
AuditThe tamper-evident audit chain. Verify chain checks it and reports "Audit chain intact" or the first bad record.

CAPA​

The CAPA tab lists corrective and preventive actions with Number, Title, Status, Owner, Due and Source (Incident, Gate failure, Audit finding, Complaint or Manual), filtered by status, with an Overdue badge. Open CAPA (for users who can manage compliance) asks for a title, source, problem statement, owner, due date, an optional linked AI system and ISO 14971 risk reference, and the incident ID when the source is an incident. A CAPA moves through Open → Investigating → Actions planned → Implementing → Verifying effectiveness → Closed, with a step back for rework at each of the middle stages; Cancel CAPA is available from any state but Closed and needs a reason, and a Closed CAPA can be reopened to Investigating, also with a reason. Cancelled is final. Closed and cancelled CAPAs can no longer be edited. Inside a CAPA you record the root cause and its method (5 whys, fishbone, fault tree analysis, other), the actions (correction, corrective, preventive or field safety corrective action, each with an owner, due date and status), the effectiveness criterion and, in the verifying stage, the effectiveness result (Effective or Ineffective), and linked records. Close CAPA needs the compliance review permission and follows a four-eyes rule: neither the CAPA owner nor any action owner can close it.

caution

Gate enforcement is opt-in. With HYDRA_COMPLIANCE_GATING unset, which is the default, Gate still runs suites and records signed verdicts, but nothing is blocked: promoting an agent's HAGP mode, SEPL auto-accept and graph publish behave as if the module did not exist. When it is true, those three require a current passing verdict. The risk tier is computed from an assessment questionnaire, and approval by a governance reviewer stamps it on the system.

Verdicts expire after 30 days by default. If Gate shows "Gate unavailable", the compliance module is disabled or no verdict signing key is configured.


PHI protection​

  • Text going to a model passes the PHI egress guard described above. Default deid.
  • De-identifying a node's inputs and outputs in a workflow is opt-in. Add the PHI De-identification node (phi-deidentify, category security); it accepts text, a FHIR resource or an HL7 message. It is not applied automatically.
  • The pilot-clinical deployment profile (HYDRA_DEPLOYMENT_PROFILE) turns a startup safety check into a hard stop: if any of its 14 checks fails, the server does not start. The checks include Gate enforcement on, a dedicated audit key, an explicit judge model with pinned sampling, PHI egress in allowlist mode, autonomy enforcement on, and a valid egress policy mode. In the default standard profile the same failures are only logged as warnings.

Something unclear? Send documentation feedback by email.