Key facts
| Tools shape | OpenAI-compatible tools array on /v1/chat/completions with tool_calls responses (live) |
| Loop | The model requests a tool, your code executes it, and results return as role=tool messages |
| Determinism | tool_choice forces or forbids a tool; strict:true enforces the exact schema |
| PII handling | No-PII mode auto-redacts, detect-only tags, passthrough leaves controls to your app |
| Model tiering | plugsky-micro and plugsky-lite for extraction; plugsky-pro and frontier tiers for reasoning |
| Residency | Pin to me-central-1, sa-central-1, eu-west-1, eu-central-1, us-east-1, us-west-2 or ap-southeast-1 |
| Audit | Key lifecycle and inference metadata exportable to Splunk, Sentinel, QRadar or Chronicle |
| Roadmap | Assistants and responses endpoints are coming soon; the chat completions tool loop is live |
TL;DR
- Model scheduling, eligibility, documentation and care-gap steps as typed tools.
- Keep every write to a clinical or EHR-adjacent system behind human approval.
- Redact PHI before prompting and pin the workspace to a single region.
- Route extraction to plugsky-micro or plugsky-lite and reasoning to stronger tiers.
- Export key and inference events to your SIEM for reviewable evidence.
How it works, step by step
- Pick one read-heavy workflow and list the tools it needs, marking anything that writes as approval-only.
- Define each tool as a JSON Schema object with typed fields and clear descriptions; scaffold them with the schema generator.
- Build the loop: send the tools array, execute returned tool_calls, append role=tool results and repeat until the model answers.
- Redact identifiers before the prompt and choose the PII mode that matches your policy.
- Pin the workspace to one region and set retention for the workload.
- Test against historical cases and measure whether the agent picks the right tool and escalates when it should.
- Stream tool, key and admin events to your SIEM and keep clinicians in the loop.
Try it yourself
Open the function calling schema generator →
Where function calling fits in clinical operations
Start where the work is read-heavy: checking appointment status, verifying insurance eligibility, summarising a care gap, or pulling recent results into a draft note. In Plugsky terms each of those is a tool — a JSON Schema object you send in the tools array on /v1/chat/completions. The model decides which tool to call, returns structured arguments, and your service executes the lookup against systems you already control.
Anything that writes — rescheduling a patient, changing a prescription, closing a referral — should be modelled as an approval-only step. The agent prepares the change and a named human releases it. That separation is what makes the workflow defensible in a clinical review.
Protecting PHI inside the tool loop
Redact before you prompt. Plugsky supports three PII modes: no-PII, which filters and auto-redacts identifiers; detect-only, which tags them; and passthrough, where your application owns the controls. For most clinical workflows no-PII is the right default, with your own gateway doing a second pass on names, medical record numbers and dates of birth.
- Residency: pin the workspace to one region so prompts and logs stay in-country.
- Retention: request and response bodies are not stored, and prompts are not used to train models.
- Keys: use project-scoped keys per environment so a staging agent can never reach production tools.
Evaluation and staged rollout
Build an evaluation set from historical cases with known outcomes: triage notes, eligibility questions, medication queries. Measure whether the agent chooses the correct tool and whether it escalates when it should, not just whether the final text reads well. Log every tool call, then review a sample weekly until precision holds.
Start with one workflow, one team and clinicians in the loop. The free plan with plugsky-micro and plugsky-lite is enough to build the loop; move to paid tiers or the 14-day full-access trial when you widen scope. Enterprise contracts add a BAA and customer-managed keys where your compliance team needs them.
Honest comparison
| Concern | Plugsky tool loop | Vendor agent platform | Building in-house |
|---|---|---|---|
| Protocol | OpenAI-compatible tools on /v1/chat/completions | Vendor-specific assistants API | Custom runtime you maintain |
| Model choice | 30+ models, tier per step | Vendor catalogue only | You host and serve each model |
| PHI controls | No-PII, detect-only or passthrough modes | Varies by vendor | You build redaction |
| Residency | Region pinning plus VPC, on-prem and air-gapped | Usually a few global regions | Wherever you deploy |
| Audit | Key and inference events exportable to SIEM | Vendor-managed logs | Your own implementation |
Frequently asked questions
Does Plugsky store patient data?
Request and response bodies are not stored, and prompts are not used to train models. You should still redact PHI before prompting and keep retention aligned with your own policy.
Can the agent write to our EHR?
Treat writes as approval-only. The model only returns tool calls; your service executes them. Keep a named human releasing any change that affects a patient record.
Do the free models support tool calling?
Yes. plugsky-micro and plugsky-lite implement the OpenAI tools shape, which is enough for extraction and routing. Move planning steps to paid tiers when you need stronger reasoning.
How many tools should we expose?
Keep the set deliberate. Around 5 to 20 well-described tools is the practical range; beyond that, selection accuracy drops and every definition consumes context on each request.
Can we run this on-prem or air-gapped?
Yes. The same API runs in VPC, on-prem and air-gapped deployments for regulated environments.
Does function calling work with streaming?
Yes. Streaming and OpenAI-style function calling are both live on chat completions, so you can show progress while tools execute.
How do we test schemas before rollout?
Validate arguments against your schema with the function calling schema generator, then run a regression set of historical cases before widening access.