Integration guide

OpenAI integration for AI agents and workflows

Swfte Studio has an OpenAI node with two actions in its shipped data: chat and embedding. A workflow calls the model with a credential you store, can redact what it sends, and can hold the output for a person to approve before it goes anywhere.

OpenAI is listed in the catalogue under utility, next to several LangChain entries for OpenAI chat, embeddings and assistants that belong to the agent-building side of the catalogue. This page covers the plain OpenAI node. For routing model calls across providers with budgets and fallback, see Connect.

Built in Swfte Studio, run as a governed workflow, and held to the same rules as any governed agent.

OpenAI at a glance

Catalogue
Utility
Actions in the shipped data
3 (0 read, 0 write, 3 other)
Credential type shown
A stored credential, referred to by id
MCP server
None in the MCP tool list
Shipped templates that use it
multi integration daily digest, openai multi modal, postgresql data analysis

What you can do with OpenAI

Every action below is read from a node in a shipped workflow template. Nothing is listed that the data does not show.

OpenAI actions in the shipped workflow templates
ActionTypeOperationWhat the data shows
Generate Blog PostModel callchatChat. Sends messages to a chat model and returns text. The template writes a two-sentence overview under a system message, with a cap of 100 tokens.
Create Text EmbeddingModel callembeddingEmbedding. Turns a piece of text into a vector with a named embedding model.
AI AnalysisModel callchatA chat call that reads a short data summary and returns two or three observations, capped at 200 tokens.

Both operations send data out and return text or numbers. Neither writes to your systems, so the write risk comes from what you do with the output. The data names two example models. Which OpenAI models your plan can call is <supported OpenAI models - founder to fill>.

A model call is something a workflow does and not something that starts one, so there is no OpenAI trigger to look for in the data.

A model call sends your data to a third party

Every call carries a prompt, and a prompt usually carries data: a customer email, a query result, a draft. The control that matters most is therefore on the way in and not on the way out. Decide what the workflow may send, redact the rest, and keep the prompt short enough that you could read it aloud to the person who owns the data.

The shipped templates show three habits worth copying: a system message that sets a narrow role, a low temperature for summaries, and a token cap on each reply. They name gpt-4o-mini for chat and text-embedding-3-small for embeddings. Those are test values, not a statement of which models Swfte supports.

How to connect OpenAI

The shipped templates point at a stored credential by id. The credential type is not in the data: <OpenAI credential type - founder to fill>.

  1. 01

    Store the key as a credential

    Use a project-level key with a spending limit at OpenAI, if your account supports it, so that a runaway workflow has a ceiling.

  2. 02

    Write the system message first

    Give the model one narrow role, as the shipped templates do, before you write the user message.

  3. 03

    Cap the reply

    Set a token cap on every call. The fixtures use 50, 100 and 200.

  4. 04

    Read the assembled prompt once

    Before the first live run, read the prompt exactly as the model will receive it, including every field merged in.

Three governed OpenAI workflows to build in Studio

Each has a label. A starting point builds on a shipped template, which is an integration test with no approval step. A design is intent only.

Draft with editor approval

Starting point

Builds on the shipped template “openai multi modal” (8 nodes), which you can find in the template library.

Produce a first draft of a short piece and publish it only after an editor approves.

  1. A set step holds the topic and the brief.
  2. The chat action drafts the piece under a narrow system message.
  3. A human-input step sends the draft to the editor.
  4. On approval, an output step releases it. On rejection the brief and the reason are kept.

Where the approval sits. The shipped template generates and moves on. The editor’s gate is the addition.

Analyse a query result, with redaction first

Starting point

Builds on the shipped template “postgresql data analysis” (7 nodes), which you can find in the template library.

Let a model comment on a small data summary without seeing identifiers.

  1. A Postgres action returns a summary.
  2. A policy rule redacts identifiers.
  3. The chat action returns two or three observations.
  4. An analyst reads them in a human-input step before they go to anyone else.

Where the approval sits. The shipped template sends its summary to the model as it is. Redaction is the change. The Postgres page covers the query side.

Near-duplicate check for drafts

Designed

Flag a new draft that closely repeats an existing one.

  1. The embedding action turns the new draft into a vector.
  2. A code node compares it with vectors kept for earlier drafts.
  3. A close match goes to a human-input step for the content owner.
  4. If the owner rejects it as a duplicate, the draft is not published.

Where the approval sits. The comparison is a code step. The design needs somewhere to keep earlier vectors, and the shipped data does not show where.

Shipped template
A governed template with its approval step already in it ships in the platform.
Starting point
A shipped template runs the same actions. It is an integration test with no approval step, so you add the gate.
Designed
Design intent. It uses the actions listed above plus generic nodes, and nothing has been built as a template.

Approvals and records for OpenAI

The OpenAI node sends text to a provider outside your boundary. Govern what goes in, and what comes out.

Needs a person’s approval

  • Any prompt that includes personal data or customer content.
  • Any output that will be published or sent to a customer.
  • Changing the model, or raising the token cap, in a workflow that has already been approved.

Can run without one

  • Summarising text that has already been redacted, for internal reading.
  • Embedding public text.

What is recorded

  • Each model call in a run, and the policy decision taken before it.
  • The editor’s or analyst’s decision on an output, and when they gave it.
  • Which actions ran after the model call, in order.

The policy engine has control points before a model call and at each node, which is where redaction belongs. Spending limits live at your OpenAI account and, if you route calls through Connect, in its budgets. How long OpenAI keeps prompts is set by your agreement with OpenAI, not by Swfte.

A policy step in a design below describes the intent. The policy engine acts only on runs that have a policy attached, and a self-serve way to author policies is not something we describe as built.

Swfte’s own security position and any attestations are on the trust page. How approvals, policy and records fit together is on the governed agents page.

Comparing tools for OpenAI work

These comparison pages are dated and sourced. Each says who should pick the other tool.

  • OpenRouter alternatives

    The OpenRouter comparison covers a hosted router for many models, which is one way to avoid a single provider.

  • LiteLLM alternatives

    The LiteLLM comparison covers a gateway you run yourself, set against Connect.

  • Best automation platforms

    How automation platforms compare on governance, approvals and records, with the method shown.

OpenAI questions

Which OpenAI models can I call from Swfte?

The shipped templates use gpt-4o-mini for chat and text-embedding-3-small for embeddings. That is what the data shows, not a list of supported models: <supported OpenAI models - founder to fill>.

Can I build an agent with OpenAI in Swfte?

Studio also has an agent node, and two of the shipped beginner templates, conversation and task execution, use it. This page covers the plain OpenAI node, so it does not say which models the agent node can use.

How do I stop a workflow spending too much?

Cap tokens in each call, set a spending limit at your OpenAI account, and consider Connect, which has budgets and routing for model calls. A cap in the workflow protects one run, and a limit at the account protects all of them.

Does OpenAI see my data?

It sees whatever is in the prompt. Redact before the call, send less, and check your agreement with OpenAI for how long prompts are retained.

Is there an OpenAI template to start from?

Three templates use the node: openai multi modal, multi integration daily digest and postgresql data analysis. All are integration tests with no approval step, so treat them as starting points.

Build a governed OpenAI workflow

Begin with a read-only workflow on a test account, then add one write with an approval in front of it.

Build this in Studio

Describe what you need in plain language. Studio builds the agents and workflows, and you keep every version.