> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Factory.ai

Factory.ai integration actions allow workflows to run headless Droid turns directly using your installed Factory.ai integration.

Prerequisites​

  • A Factory.ai integration installed in your Port organization.
  • Actions processing must be enabled on your integration:
    • Hosted by Port: actions processing is enabled automatically.
    • Self-hosted (Helm or Docker): actions processing is disabled by default and must be explicitly enabled.
  • A Factory API key with permission to call POST /api/v0/droid/execute.

Configuration​

FieldTypeDescription
typestringRequired. Must be "INTEGRATION_ACTION"
installationIdstringRequired. Your Factory.ai integration installation ID
integrationProviderstringRequired. Must be "factory-ai"
integrationInvocationTypeenumRequired. One of the values listed in available actions
integrationActionExecutionPropertiesobjectRequired. Properties for the selected action

Action semantics​

Factory accepts a Droid turn with POST /api/v0/droid/execute and responds with 202 Accepted when the turn is queued. Factory does not send outbound webhooks, so completion tracking is handled inside the integration.

waitForCompletionPort run behavior
true (default)The Port run stays IN_PROGRESS. The integration polls Factory until the session is idle and an assistant message exists after the returned messageId. On success, run output includes session details and assistant reply fields (for example assistantText).
falseThe Port run completes right after the 202 with sessionId, messageId, computerId, and links to the Factory app.

Follow-ups that target the same sessionId are serialized so concurrent executes do not race on one session. Runs that start new sessions on different targets can run in parallel.

Available actions​

Each action is selected with the integrationInvocationType field:

ActionInvocation typeDescription
Execute Droidexecute_droidStart or continue a headless Droid turn on an environment, computer, or session

Execute Droid​

Calls Factory POST /api/v0/droid/execute. Set targetKind to choose where the turn runs:

  • environment — provision a fresh computer from the environment's active build and start a new session. Requires environmentId.
  • computer — start a new session on an existing computer. Requires computerId.
  • session — send a follow-up on an existing session. Requires sessionId. Omit model and reasoningEffort for session follow-ups.

Execution properties

FieldTypeDescription
promptstringRequired. User message or instructions for the Droid turn.
targetKindstringRequired. One of environment, computer, or session.
environmentIdstringRequired when targetKind is environment. Omit for computer and session.
computerIdstringRequired when targetKind is computer. Omit for environment and session.
sessionIdstringRequired when targetKind is session. Omit for environment and computer.
modelstringOptional model for a new session (environment or computer targets only).
reasoningEffortstringOptional reasoning effort for a new session: none, dynamic, off, minimal, low, medium, high, xhigh, or max. Applies only to environment or computer targets.
waitForCompletionbooleanWhen true (default), keep the Port run open until the turn completes. When false, complete after Factory accepts the turn. See action semantics.

Basic example — new session from an environment

Run Droid on an environment (click to expand)
{
"identifier": "run-factory-droid",
"title": "Run Factory Droid",
"config": {
"type": "INTEGRATION_ACTION",
"installationId": "<your-installation-id>",
"integrationProvider": "factory-ai",
"integrationInvocationType": "execute_droid",
"integrationActionExecutionProperties": {
"prompt": "{{ .outputs.trigger.prompt }}",
"targetKind": "environment",
"environmentId": "{{ .outputs.trigger.environmentId }}",
"waitForCompletion": true
}
}
}

Basic example — session follow-up

Continue an existing session (click to expand)
{
"identifier": "factory-droid-follow-up",
"title": "Factory Droid follow-up",
"config": {
"type": "INTEGRATION_ACTION",
"installationId": "<your-installation-id>",
"integrationProvider": "factory-ai",
"integrationInvocationType": "execute_droid",
"integrationActionExecutionProperties": {
"prompt": "{{ .outputs.enrich.followUpPrompt }}",
"targetKind": "session",
"sessionId": "{{ .outputs.trigger.sessionId }}",
"waitForCompletion": false
}
}
}