@fractal-solutions/qflow 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +101 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -150,6 +150,8 @@ The examples in [Basic Usage & Examples](#basic-usage--examples) below will cove
150
150
 
151
151
  These examples are a great resource for understanding how to leverage `qflow` to its full potential.
152
152
 
153
+ For a detailed list of all tools available to the `AgentNode` and their parameters, see the [Available Tools for Agents](#available-tools-for-agents) section.
154
+
153
155
  ## Basic Usage & Examples
154
156
 
155
157
  ### 1. Simple Node
@@ -1321,3 +1323,102 @@ test("Node should handle parameters via setParams", () => {
1321
1323
  We welcome contributions! Please see our GitHub repository for more details on how to contribute.
1322
1324
 
1323
1325
  ---
1326
+
1327
+ ## Available Tools for Agents
1328
+
1329
+ The `AgentNode` can be equipped with a variety of tools to perform a wide range of tasks. Below is a list of the built-in tools and their functionalities.
1330
+
1331
+ ### Core Tools
1332
+
1333
+ * **finish**: Ends the agent's execution and returns a final output.
1334
+ * `output`: A summary of the final result or the reason for stopping.
1335
+ * **user_input**: Prompts the user for input and waits for their response.
1336
+ * `prompt`: The message to display to the user.
1337
+
1338
+ ### File System
1339
+
1340
+ * **read_file**: Reads the content of a specified file.
1341
+ * `filePath`: The absolute path to the file to read.
1342
+ * **write_file**: Writes content to a specified file.
1343
+ * `filePath`: The absolute path to the file to write to.
1344
+ * `content`: The content to write to the file.
1345
+ * **append_file**: Appends content to an existing file.
1346
+ * `filePath`: The absolute path to the file to append to.
1347
+ * `content`: The content to append to the file.
1348
+ * **list_directory**: Lists the files and subdirectories within a specified directory.
1349
+ * `directoryPath`: The absolute path to the directory to list.
1350
+
1351
+ ### Web
1352
+
1353
+ * **duckduckgo_search**: Performs a web search using DuckDuckGo.
1354
+ * `query`: The search query.
1355
+ * **google_search**: Performs a web search using the Google Custom Search API.
1356
+ * `query`: The search query.
1357
+ * `apiKey`: Your Google API Key.
1358
+ * `cseId`: Your Custom Search Engine ID.
1359
+ * **http_request**: Makes a generic HTTP request to any URL.
1360
+ * `url`: The full URL of the API endpoint.
1361
+ * `method`: The HTTP method to use (e.g., 'GET', 'POST').
1362
+ * `headers`: Custom headers for the request.
1363
+ * `body`: The request payload.
1364
+ * `auth`: Authentication configuration.
1365
+ * **web_scraper**: Fetches the HTML content of a given URL.
1366
+ * `url`: The URL to scrape.
1367
+
1368
+ ### Data & Code
1369
+
1370
+ * **data_extractor**: Extracts structured data from HTML, JSON, or plain text.
1371
+ * `input`: The content string from which to extract data.
1372
+ * `type`: The type of content to extract from (html, json, or text).
1373
+ * `selector`: A CSS selector to target elements (for HTML).
1374
+ * `jsonPath`: A dot-notation path to extract data (for JSON).
1375
+ * `regex`: A regular expression to match and extract data (for text).
1376
+ * `group`: The capturing group index to return from the regex match.
1377
+ * **code_interpreter**: Executes Python code snippets.
1378
+ * `code`: The Python code snippet to execute.
1379
+ * `timeout`: Maximum execution time in milliseconds.
1380
+ * `args`: Command-line arguments to pass to the script.
1381
+ * `requireConfirmation`: If true, the user will be prompted for confirmation before executing the code.
1382
+ * **transform_node**: Transforms input data using a provided JavaScript function.
1383
+ * `input`: The data to be transformed.
1384
+ * `transformFunction`: A JavaScript function string that takes 'data' as an argument and returns the transformed result.
1385
+
1386
+ ### Memory & Embeddings
1387
+
1388
+ * **memory_node**: Stores and retrieves text-based memories from the agent's local file system.
1389
+ * `action`: The action to perform: 'store' or 'retrieve'.
1390
+ * `content`: The text content of the memory to store.
1391
+ * `query`: Keywords to search for within stored memories.
1392
+ * `id`: A unique identifier for the memory.
1393
+ * `memoryPath`: The directory path where memories are stored.
1394
+ * **semantic_memory_node**: Stores and retrieves text-based memories using vector embeddings for semantic search.
1395
+ * `action`: The action to perform: 'store' or 'retrieve'.
1396
+ * `content`: The text content of the memory to store.
1397
+ * `query`: The text query for semantic search.
1398
+ * `id`: A unique identifier for the memory.
1399
+ * `metadata`: Key-value pairs to store alongside the memory.
1400
+ * `memoryPath`: The directory path where memories and the index are stored.
1401
+ * `embeddingModel`: The Ollama embedding model name to use.
1402
+ * `embeddingBaseUrl`: The base URL of the Ollama API for embeddings.
1403
+ * `topK`: The number of top similar results to retrieve.
1404
+ * **generate_embedding**: Generates a vector embedding for a given text using a local Ollama embedding model.
1405
+ * `text`: The text string to generate an embedding for.
1406
+ * `model`: The Ollama embedding model name to use.
1407
+ * `baseUrl`: The base URL of the Ollama API.
1408
+
1409
+ ### LLM Reasoning
1410
+
1411
+ * **huggingface_llm_reasoning**: A powerful language model for general reasoning, problem-solving, and generating text, using Hugging Face's OpenAI-compatible router.
1412
+ * `prompt`: The prompt or question to send to the language model.
1413
+ * `model`: The Hugging Face model ID.
1414
+ * `hfToken`: Your Hugging Face API token.
1415
+ * `temperature`: Controls randomness.
1416
+ * `max_new_tokens`: Maximum number of tokens to generate.
1417
+ * `baseUrl`: The base URL of the Hugging Face router API.
1418
+ * **llm_reasoning**: A powerful language model for general reasoning, problem-solving, and generating text.
1419
+ * `prompt`: The prompt or question to send to the language model.
1420
+ * **ollama_llm_reasoning**: A powerful local language model for general reasoning, problem-solving, and generating text, running via Ollama.
1421
+ * `prompt`: The prompt or question to send to the local Ollama language model.
1422
+ * `model`: The Ollama model name to use.
1423
+ * `baseUrl`: The base URL of the Ollama API.
1424
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractal-solutions/qflow",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "A lightweight and flexible JavaScript library for creating and managing workflows and agents.",
5
5
  "main": "dist/qflow.js",
6
6
  "types": "dist/qflow.d.ts",