Skip to content

AI & LLM

AI model integration, text generation, embeddings, and autonomous agents.

18 modules

ModuleDescription
自律型エージェントメモリと目標指向の動作を持つ自律型AIエージェント
チェーンエージェント複数のステップを持つ順次AI処理チェーン
ツール使用エージェントツールや関数を呼び出せるAIエージェント
テキスト埋め込みAIモデルを使ってテキストからベクトル埋め込みを生成
AI抽出AIを使ってテキストから構造化データを抽出
ローカルOllamaチャットOllama経由でローカルLLMとチャットする(完全オフライン)
AIメモリAIエージェント用の会話メモリ
エンティティメモリ会話からエンティティ(人、場所、概念)を抽出して追跡する
RedisメモリRedisストレージを使用した永続的な会話メモリ
ベクターメモリ関連コンテキスト取得のためのベクター埋め込みを使用したセマンティックメモリ
AIモデルAIエージェント用のLLMモデル設定
AI ToolExpose a module as a tool for AI Agent
ビジョン分析AIビジョンモデルを使って画像を分析
ClaudeチャットAnthropic Claude AIにチャットメッセージを送信して応答を取得する
Google GeminiチャットGoogle Gemini AIにチャットメッセージを送信して応答を取得する
OpenAIチャットOpenAI GPTモデルにチャットメッセージを送信する
DALL-E画像生成DALL-Eを使用して画像を生成する
AIエージェントマルチポート接続(モデル、メモリ、ツール)を持つ自律型AIエージェント

Modules

自律型エージェント

agent.autonomous

メモリと目標指向の動作を持つ自律型AIエージェント

Parameters:

NameTypeRequiredDefaultDescription
goalstringYes-エージェントが達成する目標
contextstringNo-エージェントが達成する目標
max_iterationsnumberNo5追加のコンテキストまたは制約
llm_providerselect (openai, ollama)Noopenai最大推論ステップ数
modelstringNogpt-4-turbo-previewモデル名(例: gpt-4, llama2, mistral)
ollama_urlstringNohttp://localhost:11434モデル名(例: gpt-4, llama2, mistral)
temperaturenumberNo0.7OllamaサーバーURL(ollamaプロバイダーのみ)

Output:

FieldTypeDescription
resultstring創造性レベル(0-2)
thoughtsarray操作結果
iterationsnumber操作結果
goal_achievedbooleanエージェントの推論ステップ

Example: Research task

yaml
goal: Research the latest trends in AI and summarize the top 3
max_iterations: 5
model: gpt-4

Example: Problem solving

yaml
goal: Find the best approach to optimize database queries
context: PostgreSQL database with 10M records
max_iterations: 10

チェーンエージェント

agent.chain

複数のステップを持つ順次AI処理チェーン

Parameters:

NameTypeRequiredDefaultDescription
inputstringYes-チェーンの初期入力
chain_stepsarrayYes-チェーンの初期入力
llm_providerselect (openai, ollama)Noopenai処理ステップの配列(各ステップはプロンプトテンプレート)
modelstringNogpt-4-turbo-previewモデル名(例: gpt-4, llama2, mistral)
ollama_urlstringNohttp://localhost:11434モデル名(例: gpt-4, llama2, mistral)
temperaturenumberNo0.7OllamaサーバーURL(ollamaプロバイダーのみ)

Output:

FieldTypeDescription
resultstring創造性レベル(0-2)
intermediate_resultsarray操作結果
steps_completednumber操作結果

Example: Content pipeline

yaml
input: AI and machine learning trends
chain_steps: ["Generate 5 blog post ideas about: {input}", "Take the first idea and write a detailed outline: {previous}", "Write an introduction paragraph based on: {previous}"]
model: gpt-4

Example: Data analysis chain

yaml
input: User behavior data shows 60% bounce rate
chain_steps: ["Analyze what might cause this issue: {input}", "Suggest 3 solutions based on: {previous}", "Create an action plan from: {previous}"]

ツール使用エージェント

agent.tool_use

ツールや関数を呼び出せるAIエージェント

Parameters:

NameTypeRequiredDefaultDescription
promptstringYes-エージェントの目標やタスク
toolsarrayYes-ツール定義のリスト [{name, description, parameters}]
providerselect (openai, anthropic)NoopenaiエージェントのLLMプロバイダー
modelstringNogpt-4o使用するモデル
api_keystringNo-APIキー(環境変数にフォールバック)
max_iterationsnumberNo10ツール呼び出しラウンドの最大数
system_promptstringNo-エージェントを導くためのオプションのシステムプロンプト

Output:

FieldTypeDescription
resultstringエージェントの最終応答
tool_callsarray実行中に行われたすべてのツール呼び出し
iterationsnumber完了したイテレーション数
modelstring使用されたモデル

Example: File Processing Agent

yaml
prompt: Read the config file and update the version number
tools: [{"name": "read_file", "description": "Read contents of a file", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "File path"}}, "required": ["path"]}}, {"name": "write_file", "description": "Write contents to a file", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "File path"}, "content": {"type": "string", "description": "File content"}}, "required": ["path", "content"]}}]
provider: openai
model: gpt-4o
max_iterations: 5

テキスト埋め込み

ai.embed

AIモデルを使ってテキストからベクトル埋め込みを生成

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-埋め込み対象のテキスト
providerselect (openai, local)Noopenai埋め込み用AIプロバイダー
modelstringNotext-embedding-3-small使用する埋め込みモデル
api_keystringNo-APIキー(環境変数にフォールバック)
dimensionsnumberNo-埋め込み次元(対応モデルのみ)

Output:

FieldTypeDescription
embeddingsarrayベクトル埋め込み配列
modelstring埋め込みに使用されたモデル
dimensionsnumber埋め込みベクトルの次元数
token_countnumber処理されたトークン数

Example: Single Text Embedding

yaml
text: The quick brown fox jumps over the lazy dog
provider: openai
model: text-embedding-3-small

Example: Reduced Dimensions

yaml
text: Semantic search query
provider: openai
model: text-embedding-3-small
dimensions: 256

AI抽出

ai.extract

AIを使ってテキストから構造化データを抽出

Parameters:

NameTypeRequiredDefaultDescription
textstringYes-データを抽出するテキスト
schemaobjectYes-抽出するフィールドを定義するJSONスキーマ
instructionsstringNo-追加の抽出指示
providerselect (openai, anthropic)Noopenai使用するAIプロバイダー
modelstringNogpt-4o-mini抽出に使用するモデル
api_keystringNo-APIキー(環境変数にフォールバック)
temperaturenumberNo0サンプリング温度(0-2)

Output:

FieldTypeDescription
extractedobject抽出された構造化データ
modelstring抽出に使用されたモデル
raw_responsestring生のモデル応答

Example: Extract Contact Info

yaml
text: John Smith is a senior engineer at Acme Corp. Email: john@acme.com
schema: {"type": "object", "properties": {"name": {"type": "string"}, "title": {"type": "string"}, "company": {"type": "string"}, "email": {"type": "string"}}}
provider: openai
model: gpt-4o-mini

Example: Extract Invoice Data

yaml
text: Invoice #1234 from Acme Corp. Total: $500.00. Due: 2024-03-01
schema: {"type": "object", "properties": {"invoice_number": {"type": "string"}, "vendor": {"type": "string"}, "total": {"type": "number"}, "due_date": {"type": "string"}}}
instructions: Extract all invoice fields. Parse amounts as numbers.

ローカルOllamaチャット

ai.local_ollama.chat

Ollama経由でローカルLLMとチャットする(完全オフライン)

Parameters:

NameTypeRequiredDefaultDescription
promptstringYes-ローカルLLMに送信するメッセージ
modelselect (llama2, llama2:13b, llama2:70b, mistral, mixtral, codellama, codellama:13b, phi, neural-chat, starling-lm)Nollama2使用するモデル名
temperaturenumberNo0.7サンプリング温度(0-2)
system_messagestringNo-システムロールメッセージ(任意)
ollama_urlstringNohttp://localhost:11434OllamaサーバーURL
max_tokensnumberNo-応答の最大トークン数(任意、モデルに依存)

Output:

FieldTypeDescription
responsestringLLMからの応答
modelstring使用されたモデル
contextarrayフォローアップリクエスト用の会話コンテキスト
total_durationnumber合計処理時間
load_durationnumberモデル読み込み時間
prompt_eval_countnumberプロンプト評価トークン数
eval_countnumber評価トークン数

Example: Simple local chat

yaml
prompt: Explain quantum computing in 3 sentences
model: llama2

Example: Code generation with local model

yaml
prompt: Write a Python function to calculate fibonacci numbers
model: codellama
temperature: 0.2
system_message: You are a Python programming expert. Write clean, efficient code.

Example: Local reasoning task

yaml
prompt: What are the pros and cons of microservices architecture?
model: mistral
temperature: 0.7

AIメモリ

ai.memory

AIエージェント用の会話メモリ

Parameters:

NameTypeRequiredDefaultDescription
memory_typeselect (buffer, window, summary)Yesbufferメモリストレージのタイプ
window_sizenumberNo10保持する直近のメッセージ数(ウィンドウメモリ用)
session_idstringNo-この会話セッションの一意識別子
initial_messagesarrayNo[]プリロードされた会話履歴

Output:

FieldTypeDescription
memory_typestringメモリタイプ
session_idstringセッション識別子
messagesarrayプリロードされた会話履歴
configobject設定情報

Example: Simple Buffer Memory

yaml
memory_type: buffer

Example: Window Memory (last 5 messages)

yaml
memory_type: window
window_size: 5

エンティティメモリ

ai.memory.entity

会話からエンティティ(人、場所、概念)を抽出して追跡する

Parameters:

NameTypeRequiredDefaultDescription
entity_typesmultiselectNo['person', 'organization', 'location']Types of entities to extract and track
extraction_modelselect (llm, spacy, regex)YesllmModel for entity extraction
session_idstringNo-Unique identifier for this memory session
track_relationshipsbooleanNoTrueTrack relationships between entities
max_entitiesnumberNo100Maximum number of entities to remember

Output:

FieldTypeDescription
memory_typestringメモリタイプ(entity)
session_idstringセッション識別子
entitiesobjectタイプ別の追跡されたエンティティ
relationshipsarrayエンティティ間の関係
configobject設定情報

Example: People & Organizations

yaml
entity_types: ["person", "organization"]
extraction_model: llm

Example: Full Entity Tracking

yaml
entity_types: ["person", "organization", "location", "concept"]
track_relationships: true
max_entities: 200

Redisメモリ

ai.memory.redis

Redisストレージを使用した永続的な会話メモリ

Parameters:

NameTypeRequiredDefaultDescription
redis_urlstringYesredis://localhost:6379Redis connection URL
key_prefixstringNoflyto:memory:Prefix for all Redis keys
session_idstringYes-Unique identifier for this memory session
ttl_secondsnumberNo86400Time-to-live for memory entries (0 = no expiry)
max_messagesnumberNo100Maximum messages to store per session
load_on_startbooleanNoTrueLoad existing messages from Redis on initialization

Output:

FieldTypeDescription
memory_typestringメモリタイプ(redis)
session_idstringセッション識別子
messagesarray読み込まれたメッセージ履歴
connectedbooleanRedis接続状態
configobject設定情報

Example: Local Redis

yaml
redis_url: redis://localhost:6379
session_id: my-session
ttl_seconds: 3600

Example: Cloud Redis with Auth

yaml
redis_url: redis://:password@redis-cloud.example.com:6379
session_id: user-session
ttl_seconds: 86400
max_messages: 500

ベクターメモリ

ai.memory.vector

関連コンテキスト取得のためのベクター埋め込みを使用したセマンティックメモリ

Parameters:

NameTypeRequiredDefaultDescription
embedding_modelselect (text-embedding-3-small, text-embedding-3-large, text-embedding-ada-002, local)Yestext-embedding-3-smallModel to use for generating embeddings
top_knumberNo5Number of most relevant memories to retrieve
similarity_thresholdnumberNo0.7Minimum similarity score (0-1) for retrieval
session_idstringNo-Unique identifier for this memory session
include_metadatabooleanNoTrueInclude timestamp and other metadata with memories

Output:

FieldTypeDescription
memory_typestringメモリタイプ(vector)
session_idstringセッション識別子
embedding_modelstring使用された埋め込みモデル
configobject設定情報

Example: Default Vector Memory

yaml
embedding_model: text-embedding-3-small
top_k: 5

Example: High Precision Memory

yaml
embedding_model: text-embedding-3-large
top_k: 10
similarity_threshold: 0.85

AIモデル

ai.model

AIエージェント用のLLMモデル設定

Parameters:

NameTypeRequiredDefaultDescription
providerselect (openai, anthropic, ollama)NoopenaiAI model provider
modelstringNogpt-4oSpecific model to use
temperaturenumberNo0.7Creativity level (0=deterministic, 1=creative)
api_keystringNo-API key (defaults to provider env var)
base_urlstringNo-Custom API base URL (for Ollama or proxies)
max_tokensnumberNo4096応答の最大トークン数

Output:

FieldTypeDescription
providerstringLLMプロバイダー名
modelstringモデル名
configobject設定情報

Example: OpenAI GPT-4

yaml
provider: openai
model: gpt-4o
temperature: 0.7

Example: Anthropic Claude

yaml
provider: anthropic
model: claude-3-5-sonnet-20241022
temperature: 0.5

AI Tool

ai.tool

Expose a module as a tool for AI Agent

Parameters:

NameTypeRequiredDefaultDescription
module_idstringYes-Module ID to expose as tool (e.g. http.request, data.json_parse)
tool_descriptionstringNo-Custom description for the agent (overrides module default)

Output:

FieldTypeDescription
module_idstringModule ID exposed as tool

Example: HTTP Request Tool

yaml
module_id: http.request

Example: JSON Parse Tool

yaml
module_id: data.json_parse

ビジョン分析

ai.vision.analyze

AIビジョンモデルを使って画像を分析

Parameters:

NameTypeRequiredDefaultDescription
image_pathstringNo-画像ファイルのローカルパス
image_urlstringNo-分析する画像のURL
promptstringNoDescribe this image in detail画像について分析する内容や質問
providerselect (openai, anthropic)Noopenaiビジョン分析のAIプロバイダー
modelstringNogpt-4o使用するビジョンモデル
api_keystringNo-APIキー(環境変数にフォールバック)
max_tokensnumberNo1000応答の最大トークン数
detailselect (low, high, auto)Noauto画像の詳細レベル(低/高/自動)

Output:

FieldTypeDescription
analysisstring画像のAI分析
modelstring分析に使用されたモデル
providerstring分析に使用されたプロバイダー
tokens_usednumber使用されたトークン数

Example: Analyze Screenshot

yaml
image_path: /tmp/screenshot.png
prompt: Describe what you see in this UI screenshot
provider: openai
model: gpt-4o

Example: Analyze from URL

yaml
image_url: https://example.com/photo.jpg
prompt: What objects are in this image?
provider: anthropic
model: claude-sonnet-4-20250514

Claudeチャット

api.anthropic.chat

Anthropic Claude AIにチャットメッセージを送信して応答を取得する

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Anthropic APIキー(デフォルト: env.ANTHROPIC_API_KEY)
modelstringNoclaude-3-5-sonnet-20241022使用するClaudeモデル
messagesarrayYes-roleとcontentを持つメッセージオブジェクトの配列
max_tokensnumberNo1024応答の最大トークン数
temperaturenumberNo1.0サンプリング温度(0-1)。高い値ほど出力がランダムになる
systemstringNo-Claudeの動作を導くシステムプロンプト

Output:

FieldTypeDescription
contentstringClaudeの応答テキスト
modelstring応答に使用されたモデル
stop_reasonstringモデルが生成を停止した理由(end_turn、max_tokensなど)
usageobjectトークン使用統計

Example: Simple question

yaml
messages: [{"role": "user", "content": "What is the capital of France?"}]
max_tokens: 100

Example: Text summarization

yaml
system: You are a helpful assistant that summarizes text concisely.
messages: [{"role": "user", "content": "Summarize this article: ${article_text}"}]
max_tokens: 500

Google Geminiチャット

api.google_gemini.chat

Google Gemini AIにチャットメッセージを送信して応答を取得する

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Google AI APIキー(デフォルト: env.GOOGLE_AI_API_KEY)
modelstringNogemini-1.5-pro使用するGeminiモデル
promptstringYes-Geminiに送信するテキストプロンプト
temperaturenumberNo1.0ランダム性の制御(0-2)。高い値ほど出力がランダムになる
max_output_tokensnumberNo2048応答の最大トークン数

Output:

FieldTypeDescription
textstringGenerated text response from Gemini
modelstringModel used for generation
candidatesarrayAll candidate responses

Example: Simple question

yaml
prompt: Explain quantum computing in simple terms

Example: Content generation

yaml
prompt: Write a professional email about ${topic}
temperature: 0.7
max_output_tokens: 500

OpenAIチャット

api.openai.chat

OpenAI GPTモデルにチャットメッセージを送信する

Parameters:

NameTypeRequiredDefaultDescription
promptstringYes-GPTに送信するメッセージ
modelselect (gpt-4-turbo-preview, gpt-4, gpt-3.5-turbo)Nogpt-4-turbo-preview使用するGPTモデル
temperaturenumberNo0.7サンプリング温度(0-2)
max_tokensnumberNo1000応答の最大トークン数
system_messagestringNo-システムロールメッセージ(任意)

Output:

FieldTypeDescription
responsestringGPTからの応答
modelstring使用されたモデル
usageobjectトークン使用統計

Example: Simple chat

yaml
prompt: Explain quantum computing in 3 sentences
model: gpt-3.5-turbo

Example: Code generation

yaml
prompt: Write a Python function to calculate fibonacci numbers
model: gpt-4
temperature: 0.2
system_message: You are a Python programming expert

DALL-E画像生成

api.openai.image

DALL-Eを使用して画像を生成する

Parameters:

NameTypeRequiredDefaultDescription
promptstringYes-生成する画像の説明
sizeselect (256x256, 512x512, 1024x1024, 1792x1024, 1024x1792)No1024x1024画像サイズ
modelselect (dall-e-3, dall-e-2)Nodall-e-3DALL-Eモデルバージョン
qualityselect (standard, hd)Nostandard画像品質(DALL-E 3のみ)
nnumberNo1生成する画像の数(1-10)

Output:

FieldTypeDescription
imagesarrayList of generated images
modelstringModel name or identifier

Example: Generate artwork

yaml
prompt: A serene mountain landscape at sunset, digital art
size: 1024x1024
model: dall-e-3
quality: hd

Example: Create logo

yaml
prompt: Modern tech startup logo with blue and green colors
size: 512x512
model: dall-e-2
n: 3

AIエージェント

llm.agent

マルチポート接続(モデル、メモリ、ツール)を持つ自律型AIエージェント

Parameters:

NameTypeRequiredDefaultDescription
prompt_sourceselect (manual, auto)Nomanualタスクプロンプトの取得元
taskstringNo-エージェントが完了するタスク。上流データを参照するには{{input}}を使用。
prompt_pathstringNo{<!-- -->{input}<!-- -->}入力からプロンプトを抽出するパス(例: {{input.message}})
join_strategyselect (first, newline, separator, json)Nofirst配列入力の処理方法
join_separatorstringNo`

| 配列項目を結合するセパレータ | |max_input_size| number | No |10000| プロンプトの最大文字数(オーバーフロー防止) | |system_prompt| string | No |You are a helpful AI agent. Use the available tools to complete the task. Think step by step.| エージェントの動作に関する指示 | |tools| array | No |[]| モジュールIDのリスト(ツールノード接続の代替) | |context| object | No |{}| モジュールIDのリスト(ツールノード接続の代替) | |max_iterations| number | No |10| エージェント用の追加コンテキストデータ | |provider | select (openai, anthropic, ollama) | No | openai| AI model provider | |model| string | No |gpt-4o| Specific model to use | |temperature| number | No |0.3| Creativity level (0=deterministic, 1=creative) | |api_key| string | No | - | API key (defaults to provider env var) | |base_url` | string | No | - | Custom API base URL (for Ollama or proxies) |

Output:

FieldTypeDescription
okbooleanエージェントが正常に完了したかどうか
resultstringエージェントが正常に完了したかどうか
stepsarrayエージェントが正常に完了したかどうか
tool_callsnumberエージェントからの最終結果
tokens_usednumberエージェントが実行したステップのリスト

Example: Web Research Agent

yaml
task: Search for the latest news about AI and summarize the top 3 stories
tools: ["http.request", "data.json_parse"]
model: gpt-4o

Example: Data Processing Agent

yaml
task: Read the CSV file, filter rows where status is "active", and count them
tools: ["file.read", "data.csv_parse", "array.filter"]
model: gpt-4o

Released under the Apache 2.0 License.