Future AGI icon

Future AGI

Interact with Future AGI prompt management, logging, and evaluation

Overview

This node integrates with the Future AGI platform to retrieve prompt templates managed there. Specifically, the "Get Prompt" operation fetches a prompt by its name or ID, optionally selecting a specific version or the default version configured in Future AGI. It can also return either the raw prompt configuration or a compiled prompt where variables are replaced with provided values.

This node is useful when you want to dynamically fetch and use prompts stored in Future AGI within your n8n workflows, enabling centralized prompt management and version control. For example, you might retrieve a customer support prompt template, fill it with user-specific data, and then send it to an AI model for processing.

Properties

Name Meaning
Prompt Name or ID The name or ID of the prompt to retrieve. You can select from a loaded list of prompts or specify an ID using an expression.
Use Default Version Whether to use the default version configured for this prompt in Future AGI. If false, you must specify a prompt version.
Use Compiled Prompt Whether to return the compiled prompt with variables replaced by their values. If false, returns the raw prompt configuration.
Variable Object Map (Shown only if "Use Compiled Prompt" is true) A JSON object mapping variable names to their replacement values for compiling the prompt. Example: {'name': 'John Doe', 'age': 30}.
Prompt Version (Shown only if "Use Default Version" is false) The specific version or label of the prompt to retrieve, e.g., "v3".

Output

The output JSON contains the following fields:

  • Name: The prompt's name.
  • Version: The version string of the prompt.
  • Prompt config: The prompt configuration object. This is either the raw prompt template or the compiled prompt with variables replaced, depending on the "Use Compiled Prompt" setting.
  • Variables: An array of variable names that the prompt expects.

No binary data is output by this operation.

Example output structure:

{
  "Name": "Customer Support Prompt",
  "Version": "v2",
  "Prompt config": {
    "template": "Hello {{name}}, how can I assist you today?",
    "otherConfig": "..."
  },
  "Variables": ["name", "issue"]
}

Dependencies

  • Requires an API key credential for Future AGI with base URL, API key, and secret key.
  • The node makes HTTP requests to Future AGI endpoints to fetch prompt templates.
  • No additional environment variables are required beyond the configured credentials.

Troubleshooting

  • Error: "Prompt Version is required"
    Occurs if "Use Default Version" is false but no prompt version is specified. Fix by providing a valid version string.

  • Error: "Variable Object Map must be valid JSON"
    Happens if the JSON provided for variable replacements is invalid or not an object. Ensure the JSON syntax is correct and represents an object.

  • HTTP request failures
    If the node cannot reach Future AGI or receives an error response, it throws an error with HTTP status and message. Check network connectivity, API keys, and permissions.

  • Empty or missing prompt
    If the prompt name/ID does not exist or is misspelled, the node will fail to retrieve it. Verify the prompt exists in Future AGI.

Links and References

Discussion