persistent-ai

@persistent-ai/fireflow-nodes (0.29.0)

Published 2026-08-18 12:40:34 +00:00 by ak

Installation

@persistent-ai:registry=
npm install @persistent-ai/fireflow-nodes@0.29.0
"@persistent-ai/fireflow-nodes": "0.29.0"

About this package

@persistent-ai/fireflow-nodes

License

A comprehensive collection of ready-to-use nodes for building computational flows in the PersistentAI flow-based programming framework. This package provides building blocks for AI, data processing, utilities, and more that can be visually composed in the PersistentAI editor.

Overview

@persistent-ai/fireflow-nodes offers:

  • AI Integration: LLM nodes supporting multiple models (OpenAI, Anthropic, DeepSeek)
  • Data Processing: Text manipulation, stream handling, and serialization nodes
  • API Communication: HTTP requests, cryptocurrency data fetching, and external service integration
  • Utility Functions: Regular expressions, debugging, basic operations
  • Flow Control: Logic branching and conditional execution
  • Integration with PersistentAI: Special nodes for PersistentAI message handling

Installation

# Before installing, make sure you have set up authentication for GitHub Packages
npm install @persistent-ai/fireflow-nodes
# or
yarn add @persistent-ai/fireflow-nodes
# or
pnpm add @persistent-ai/fireflow-nodes

Authentication for GitHub Packages

To use this package, you need to configure npm to authenticate with GitHub Packages:

  1. Create a personal access token (PAT) with the read:packages scope on GitHub.
  2. Add the following to your project's .npmrc file or to your global ~/.npmrc file:
@persistent-ai:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_PAT

Replace YOUR_GITHUB_PAT with your actual GitHub personal access token.

Usage

Using Node Categories

import { 
  NODE_CATEGORIES, 
  CATEGORY_METADATA, 
  getCategoriesMetadata 
} from '@persistent-ai/fireflow-nodes'

// Access a specific category
const aiCategory = NODE_CATEGORIES.AI
console.log(`AI Category ID: ${aiCategory}`)

// Get styled metadata for a category
const aiCategoryMeta = CATEGORY_METADATA[aiCategory]
console.log(`AI Category Label: ${aiCategoryMeta.label}`)
console.log(`AI Category Icon: ${aiCategoryMeta.icon}`)

// Get all categories sorted by order
const allCategories = getCategoriesMetadata()

Working with Category Icons

import { getCategoryIcon } from '@persistent-ai/fireflow-nodes'
import React from 'react'

// In a React component
function CategoryIconDisplay({ categoryName }) {
  const IconComponent = getCategoryIcon(categoryName)
  return <IconComponent size={24} color="currentColor" />
}

Working with Specific Nodes

import { LLMCallNode, StreamBufferNode } from '@persistent-ai/fireflow-nodes'
import { ExecutionContext } from '@persistent-ai/fireflow-types'

// Create and configure an LLM node
const llmNode = new LLMCallNode('my-llm-node')
llmNode.model = 'gpt-5-mini'
llmNode.prompt = 'Explain quantum computing in simple terms'
llmNode.apiKey = 'your-api-key'
llmNode.temperature = 0.7

// Execute the node
const context = new ExecutionContext('flow-id', new AbortController())
await llmNode.execute(context)

// Create a stream buffer to collect LLM output
const bufferNode = new StreamBufferNode('stream-buffer')
bufferNode.inputStream = llmNode.outputStream
await bufferNode.execute(context)

console.log(bufferNode.buffer) // Collected output from the LLM

Available Node Categories

PersistentAI nodes are organized into the following categories:

  • AI & ML: Language models, text generation, and AI utilities
  • Data: Data transformation and manipulation tools
  • Basic Values: Simple input nodes for numbers, text, and booleans
  • Utilities: General purpose tools like RegExp, HTTP, and debugging
  • Math: Mathematical operations and calculations
  • Flow: Flow control and conditional execution
  • PersistentAI: Integration with the PersistentAI platform
  • Messaging: Message creation and handling
  • API: External API connections
  • Secret: Secure credential management

Key Nodes

AI & ML

  • LLM Call: Interfaces with multiple language models including GPT-4o, Claude, and DeepSeek
    import { LLMCallNode, LLMModels } from '@persistent-ai/fireflow-nodes'
    
    const llm = new LLMCallNode('llm-node')
    llm.model = LLMModels.Gpt5Mini
    llm.prompt = "Write a short poem about programming"
    llm.temperature = 0.7
    llm.apiKey = "your-api-key"
    
    // The output is available as a stream
    for await (const chunk of llm.outputStream) {
      console.log(chunk)
    }
    

Data Processing

  • Text Search: Finds substrings within text (case-insensitive)
  • Stream Buffer: Collects and concatenates chunks from a stream
    import { StreamBufferNode } from '@persistent-ai/fireflow-nodes'
    
    const buffer = new StreamBufferNode('buffer-node')
    buffer.separator = "\n" // Optional separator between chunks
    
    // Connect to a stream source and execute
    buffer.inputStream = someStreamSource
    await buffer.execute(context)
    
    console.log(buffer.buffer) // Full concatenated content
    

Utilities

  • Regular Expression: Powerful text processing with regex patterns

    import { RegExpNode, RegExpMode } from '@persistent-ai/fireflow-nodes'
    
    const regex = new RegExpNode('regex-node')
    regex.sourceText = "Email me at example@domain.com tomorrow"
    regex.pattern = "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}"
    regex.mode = RegExpMode.MATCH
    
    await regex.execute(context)
    console.log(regex.result) // "example@domain.com"
    console.log(regex.matchCount) // 1
    
  • HTTP Request: Make API calls to external services

    import { HttpRequestNode, HttpMethod } from '@persistent-ai/fireflow-nodes'
    
    const http = new HttpRequestNode('http-node')
    http.baseUri = "https://api.example.com"
    http.path = "/data"
    http.method = HttpMethod.GET
    http.headers = "Authorization: Bearer token\nContent-Type: application/json"
    
    await http.execute(context)
    console.log(http.statusCode) // Status code from response
    console.log(http.response) // Response body
    
  • JSON/YAML Serialization: Convert data structures to formatted strings

    import { JSONSerializerNode } from '@persistent-ai/fireflow-nodes'
    
    const json = new JSONSerializerNode('json-node')
    json.data = { key: "value", nested: { array: [1, 2, 3] } }
    json.pretty = true
    
    await json.execute(context)
    console.log(json.json) // Formatted JSON string
    

API Integration

  • CoinMarketCap: Fetch cryptocurrency data
    import { CoinMarketCapNode } from '@persistent-ai/fireflow-nodes'
    
    const crypto = new CoinMarketCapNode('crypto-node')
    crypto.cryptoList = ["BTC", "ETH"]
    crypto.apiKey = "your-cmc-api-key"
    
    await crypto.execute(context)
    console.log(crypto.result) // Array of crypto data objects
    

PersistentAI Integration

  • Create Message: Sends messages to PersistentAI chats
  • On New Message Event: Triggers on new PersistentAI messages

Basic Values

  • Text, Number, and Boolean nodes for providing constant values
  • NumberToString: Converts numbers to strings with precision control

Node Development

To create your own custom nodes with this package:

import { BaseNode, Node, Input, Output, String } from '@persistent-ai/fireflow-types'
import { NODE_CATEGORIES } from '@persistent-ai/fireflow-nodes'

@Node({
  title: 'My Custom Node',
  description: 'A description of what this node does',
  category: NODE_CATEGORIES.UTILITIES,
  tags: ['custom', 'example'],
})
class MyCustomNode extends BaseNode {
  @Input()
  @String({
    title: 'Input Text',
    description: 'Text to process',
  })
  inputText: string = ''

  @Output()
  @String({
    title: 'Output Text',
    description: 'Processed text',
  })
  outputText: string = ''

  async execute(context) {
    // Process input and set output
    this.outputText = this.inputText.toUpperCase()
    return {}
  }
}

License

BUSL-1.1 - Business Source License

  • @persistent-ai/fireflow-types: Core type definitions and decorators
  • @persistent-ai/fireflow-frontend: Frontend components for visual flow programming
  • @persistent-ai/fireflow-backend: Backend services for flow execution

Dependencies

Dependencies

ID Version
@a2ui/web_core ^0.9.2
@ag-ui/client ^0.0.53
@anthropic-ai/sdk ^0.115.0
@apidevtools/json-schema-ref-parser ^15.3.5
@google/genai ^2.15.0
@grammyjs/types ^3.26.0
@langchain/anthropic ^1.5.2
@langchain/community ^1.1.29
@langchain/core ^1.2.4
@langchain/deepseek ^1.1.5
@langchain/google ^0.2.1
@langchain/google-genai ^2.2.0
@langchain/groq ^1.3.1
@langchain/openai ^1.5.5
@langchain/openrouter ^0.4.5
@modelcontextprotocol/sdk ^1.30.0
@okx-dex/okx-dex-sdk ^1.0.18
@persistent-ai/fireflow-agui 0.29.0
@persistent-ai/fireflow-console 0.29.0
@persistent-ai/fireflow-types 0.29.0
@persistent-ai/fireflow-vfs 0.29.0
@persistent-ai/persistentai-api 0.29.0
@toon-format/toon ^2.1.0
@types/crypto-js ^4.2.2
alchemy-sdk ^3.6.5
crypto-js ^4.2.0
ethers ^6.16.0
grammy ^1.42.0
handlebars ^4.7.8
js-tiktoken ^1.0.21
js-yaml ^4.1.1
langchain ^1.5.4
lucene-kit ^1.3.0
lucide-react ^0.577.0
nanoid ^5.1.11
nanoid-dictionary ^5.0.0
openai ^6.39.1
papaparse ^5.5.3
telegram-markdown-v2 ^0.0.4
turndown ^7.2.2
undici ^7.24.5
uri-template ^2.0.0
yaml ^2.8.2
zod ^3.25.76

Development Dependencies

ID Version
@persistent-ai/typescript-config 0.29.0
@types/nanoid-dictionary ^4.2.3
@types/papaparse ^5.5.2
@types/react ^19.2.14
@types/turndown ^5.0.6
vitest ^4.1.0

Peer Dependencies

ID Version
react ^19.2.0
react-dom ^19.2.0
superjson ^2.2.6
Details
npm
2026-08-18 12:40:34 +00:00
1
BUSL-1.1
1.9 MiB
Assets (1)
Versions (5) View all
0.29.4 2026-08-18
0.29.1 2026-08-18
0.29.0 2026-08-18
0.28.0 2026-08-17
0.26.2 2026-08-10