Use Future AGI in n8n

Retrieve and compile Future AGI prompts in n8n, or configure Preview OpenTelemetry execution tracing.

Use the Future AGI community node to retrieve and compile prompts in an n8n workflow.

To send traces of your n8n executions to Future AGI instead, see Trace n8n executions with OpenTelemetry.

Install the prompt-management node

Install the Future AGI community node to retrieve prompts. This node is separate from native execution tracing below.

  1. Access Community Nodes: Navigate to the Community Nodes section in your n8n instance settings.
Community Nodes settings in n8n

Open Community nodes in n8n Settings.

  1. Install Future AGI Node: Enter the Future AGI community node package name: @future-agi/n8n-nodes-futureagi
Install a community node button

The Community nodes page provides the installation action.

  1. Verify Installation: Confirm the Future AGI node is successfully installed and available in your workflow editor.
Future AGI package entered in the community-node install dialog

Enter @future-agi/n8n-nodes-futureagi in the install dialog.


Configure the node

Add the node to your workflow, then connect your Future AGI account.

Add the node to your workflow

Once you have installed the community node, you can start using it in your workflows:

  1. Search for Future AGI Node: In your n8n workflow editor, search for “Future AGI” in the list of available nodes.
Node picker in the n8n workflow editor

The workflow editor opens the node picker beside the canvas.

  1. Select the Node: Click on the Future AGI node to add it to your workflow.
Future AGI in the node search results

Search for Future AGI in the node picker.

  1. View Available Operations: Once added, click on the node to view the list of supported operations:
Get prompt action in the Future AGI node details

The Future AGI node offers a Get prompt action.

Supported Operations:

  • Get a prompt
  1. Select Operation: Click on your desired operation to proceed to the configuration screen.
Get Prompt parameters in the Future AGI node

The Get Prompt operation includes version and compilation controls.

Set up credentials

Once you’re on the operation screen, you’ll need to configure your Future AGI credentials:

  1. Access Settings Window: Navigate to the settings window to add your API credentials.
Future AGI credential connection form in n8n

The credential form contains the base URL and masked key fields.

  1. Configure API Credentials: Enter your Future AGI credentials:
    • Base URL: https://api.futureagi.com
    • API Key: Your Future AGI API key
    • Secret Key: Your Future AGI secret key

Get your API key and secret key from API keys.

Masked API keys in Future AGI settings

Future AGI’s API keys page masks key values.

  1. Test the connection before saving the credentials.

Retrieve a prompt

Select a prompt in the node to retrieve it in your workflow.

Prompt selector in the n8n Future AGI node

Choose an available prompt from the node dropdown.

Prompt list in Future AGI

The Future AGI Prompts page lists saved prompts.

Choose a prompt version

You can use this node to fetch whatever version of the prompt you have selected. By default, the node will retrieve the default version of your chosen prompt.

Default prompt version returned in n8n

Use Default Version is enabled and the node output contains the selected prompt.

If you want to select a specific version of the prompt instead of using the default, you can do so by switching off the “Use Default Prompt” toggle. This gives you full control over which version of your prompt to use in your workflow, allowing you to test different iterations or use specific versions for different use cases.

Explicit prompt version field in n8n

Turning off Use Default Version exposes the Prompt Version field.

Compile prompt variables

Future AGI follows the convention of using words inside double curly brackets (i.e., words in {{}}) as variables in prompts. To replace these variables with actual values, users can use the Use compiled prompt option of the node.

When you toggle this switch on, a code editor will appear where you need to write a JSON object that maps the variables to their values like key-value pairs.

Important Note: The keys must be exactly the same as the variables in your prompt, as it is case sensitive.

Compiled prompt variable map in n8n

Use Compiled Prompt exposes a JSON variable map.


Trace n8n executions with OpenTelemetry

Use n8n’s built-in OpenTelemetry exporter to send workflow and node execution traces to Future AGI. This path does not use the prompt-management community node.

Warning

n8n labels OpenTelemetry tracing Preview and advises against relying on it in production workflows because it may change between releases.

n8n version2.19.0 or later for workflow and node spans; 2.33.0 or later for agent spans. n8n labels its OpenTelemetry tracing Preview.
n8n editionSelf-hosted. On n8n Cloud, OpenTelemetry availability depends on n8n’s plan and version support; check whether your instance exposes Settings > OpenTelemetry.
TransportOTLP/HTTP with protobuf (n8n’s default) to https://api.futureagi.com/tracer/v1/traces, uncompressed
ProjectThe X-Project-Name header, or the project_name resource attribute
Future AGI collectorv1.58.0 or later for project-header routing. With an older collector, use the resource-attribute alternative below.
Referencen8n OpenTelemetry tracing guide

1. Configure tracing

Choose the Settings route or the environment-based alternative below.

Settings > OpenTelemetry

From n8n 2.27.0, an instance owner or admin can configure tracing in Settings > OpenTelemetry. Turn on Enable OpenTelemetry and enter:

FieldValue
OTLP endpointhttps://api.futureagi.com
Trace path/tracer/v1/traces
Protocolhttp/protobuf
HeadersX-Api-Key=<your-api-key>,X-Secret-Key=<your-secret-key>,X-Project-Name=n8n

Get your keys from API keys. For a self-hosted Future AGI, replace the endpoint with its base URL.

Select Save settings. n8n applies the settings without a process restart. The X-Project-Name=n8n header routes traces to the n8n project in your API key’s workspace, creating an Observe project if it doesn’t exist. You do not need OTEL_RESOURCE_ATTRIBUTES for this route.

Environment variables take precedence: a field whose variable is set is disabled in the form. Leave the corresponding N8N_OTEL_* variables unset to manage those fields in Settings.

Environment variables (self-hosted alternative)

Set these on every n8n process: the main instance and, in queue mode, every worker and webhook processor. Then restart n8n.

export N8N_OTEL_ENABLED=true
export N8N_OTEL_EXPORTER_OTLP_ENDPOINT=https://api.futureagi.com
export N8N_OTEL_EXPORTER_OTLP_TRACING_PATH=/tracer/v1/traces
export N8N_OTEL_EXPORTER_OTLP_HEADERS="X-Api-Key=<your-api-key>,X-Secret-Key=<your-secret-key>"
export OTEL_RESOURCE_ATTRIBUTES="project_name=n8n,project_type=observe"
  • N8N_OTEL_EXPORTER_OTLP_ENDPOINT is the base URL. n8n appends N8N_OTEL_EXPORTER_OTLP_TRACING_PATH, which defaults to /v1/traces, so set it to Future AGI’s path. For a self-hosted Future AGI, use its base URL instead.
  • Get the keys from API keys. To keep them out of the environment, put the header string in a file and point N8N_OTEL_EXPORTER_OTLP_HEADERS_FILE at it.
  • This alternative uses OTEL_RESOURCE_ATTRIBUTES to set project_name=n8n and project_type=observe. A non-empty project_name resource attribute takes precedence over X-Project-Name. Future AGI creates the project in your API key’s workspace on the first export if it doesn’t exist. A resource with neither a project_name attribute nor an X-Project-Name header is rejected with HTTP 400.
  • Leave N8N_OTEL_EXPORTER_OTLP_PROTOCOL at its default, http/protobuf.

2. Run a production execution

By default n8n only exports production executions: runs of a published workflow started by its trigger, such as a webhook call, a schedule or a chat message. Runs you start from the editor are not exported. To export them while you test, disable production-only filtering in Settings, or set:

export N8N_OTEL_TRACES_PRODUCTION_ONLY=false

Trigger the workflow, wait a few seconds for the batch to flush, then open your project in Observe.

Warning

Send test trace does not include OTEL_RESOURCE_ATTRIBUTES. With resource-only routing, the test therefore has neither a project_name resource attribute nor an X-Project-Name header and is rejected with HTTP 400, even when real executions export correctly. Add X-Project-Name=n8n to the exporter headers to use Send test trace with a collector that supports project headers, or validate the resource-only setup by triggering a workflow. The Settings configuration above already includes this header.

What you get

The model-child coverage below applies to n8n 2.45.7 with its bundled @n8n/agents 0.30.6. It uses n8n’s native AI SDK telemetry and the same exporter as workflow tracing; you do not need another tracing package. Earlier releases with agent tracing may have different span coverage.

SpanOne perAttributes
workflow.executeExecutionWorkflow ID, name and version, execution ID, mode and status, error type, n8n project ID
node.executeNode run, nested under its workflow spanNode name, type and version, input and output item counts
<agent name>.generate or <agent name>.streamAgent run (the Agents feature)gen_ai.operation.name=invoke_agent, agent name, model, thread ID, tool catalog in gen_ai.prompt
ai.generateText or ai.streamTextAI SDK call within the agent runModel metadata and aggregate ai.usage.inputTokens / ai.usage.outputTokens
ai.generateText.doGenerate or ai.streamText.doStreamModel step, nested under its AI SDK callgen_ai.request.model, gen_ai.response.model, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens; model inputs and responses when content capture is enabled
execute_tool <tool name>Tool call an agent makesTool name and call ID; arguments and result when content capture is enabled

Execution spans share a resource with service.name=n8n, the n8n version and instance ID, and the host and process details that n8n’s resource detectors add. Those include the host name, the OS user running n8n and its command line. The environment-based setup also supplies project_name and project_type; for the header-based setup, Future AGI fills the missing project_name from X-Project-Name during ingestion.

  • Workflow and node spans carry metadata only: names, IDs, item counts and status. The items themselves are not exported. They appear as generic spans in Observe, not LLM or tool spans; the native exporter does not assign Future AGI span kinds.
  • The older AI Agent (LangChain) node produces only a node.execute span, like any other node. Its prompts, model calls and tool calls are not traced. Agent spans come only from n8n’s newer Agents feature.
  • For token counts, inspect the model child spans in Observe, not just the agent root. Usage is available when the model provider returns it. Automatic LLM/tool classification, token summaries and cost display depend on Future AGI’s attribute mapping and model pricing; raw token attributes alone are not a cost estimate.
  • AI SDK parent spans repeat usage for their model children. When aggregating usage, count the model child spans once; do not add parent totals or count ai.usage.* and gen_ai.usage.* as separate usage. Avoid adding a second model instrumentor alongside n8n’s native tracing.

Turn off model and tool content

Agent tracing records model inputs and responses, tool arguments and tool results by default. Set both flags to disable those payloads while retaining model and token metadata:

export N8N_AGENTS_TRACING_RECORD_INPUTS=false   # model inputs and tool arguments
export N8N_AGENTS_TRACING_RECORD_OUTPUTS=false  # model responses and tool results

These flags are not a general redaction filter: names, IDs, tool definitions and error details can still contain sensitive data, as can the host and process resource attributes described above. If your policy requires excluding agent telemetry entirely, set N8N_AGENTS_TRACING_ENABLED=false; workflow and node spans remain.

Was this page helpful?

Questions & Discussion