functionPlatform Functions

SQL, Python, and AI functions that give agents direct access to world model data and analytics during conversations.

Platform functions are the universal tool primitive for agent data access. You register a SQL query, Python function, or AI composition, and agents can call it during conversations. No container, no deployment pipeline. The function runs on the platform's compute layer and returns results directly to the agent.

circle-info

Conceptual overview. For background on function types, built-in functions, and how functions relate to Actions and Skills, see the Platform Functions conceptual docsarrow-up-right.

Function Types

Type
Description

SQL Table

Parameterized query returning rows across live and analytical data

SQL Scalar

Query returning a single computed value

Python UDF

Custom Python logic on the compute layer

AI Built-in

Composed AI operations (classify, summarize, extract, mask, sentiment)

Foundation Model

Foundation model call with patient context for complex reasoning

Three Tool Categories

Every platform function surfaces as a tool in the agent's context graph. The agent sees a tool name, description, input schema, and result.

Named Functions

Pre-registered functions with fixed input schemas. The agent calls them by name. All named function tool IDs use the fn_ prefix (e.g., fn_caller_history, fn_entity_confidence).

The platform ships with built-in functions covering entity confidence assessment, caller history, patient summaries, intent classification, clinical extraction, PII redaction, care plan generation, handoff summaries, urgency assessment, and memory access. See the conceptual docsarrow-up-right for the full list.

Open Query (fn_query)

The agent writes read-only SQL at runtime for questions no named function anticipated. Queries are validated (SELECT/WITH only, DML rejected, row count capped) and run within workspace isolation.

Open Write (fn_write)

The agent records new observations as world model events when no specific write tool exists. Follows the same confidence and write-scope rules as all other world model writes.

Catalog Discovery

Functions can be auto-discovered from the compute catalog. Any function with a description becomes an agent tool automatically at session initialization. Three sources are merged by priority:

  1. Catalog discovery - functions found with descriptions (lowest priority)

  2. Built-in defaults - platform built-in functions with curated schemas

  3. Workspace-registered - functions explicitly registered through the API (highest priority)

Higher-priority sources override lower ones by name.

Context Graph Integration

Functions are available through tool_call_specs on context graph states. If a function is not in the current state's spec, the agent cannot see or call it.

Management Endpoints

All endpoints are workspace-scoped under /v1/{workspace_id}/functions.

Operation
Description

List

All registered functions for the workspace

Register

Add a function (must already exist in the compute catalog)

Delete

Remove the workspace registration (underlying function unaffected)

Test

Execute with sample input, returns result with timing

Discover

Query the catalog for available functions with descriptions

Sync

Auto-register all discovered catalog functions not already registered

Query

Execute an open-scope read-only SQL query

CLI

Platform functions can be managed through Agent Forge:

Migration from Data-MCP

Platform functions replace Data-MCP for agent data access. The key differences:

Data-MCP
Platform Functions

Integration

External MCP client required

Built into the agent reasoning pipeline

Access

SQL queries only

SQL + Python + AI operations

Tool resolution

Separate from context graph

State-gated through tool_call_specs

Write capability

Read-only

Read + write (via fn_write)

Discovery

Manual

Auto-discovery from compute catalog

Data-MCP remains available during the transition. New integrations should use platform functions.

Last updated

Was this helpful?