סוכן AI
שלב
chat-agentaiעונה עם AI, משתמש בשלבים שתתנו לו ככלים, וזוכר את השיחה. תנו לו שדות כדי שיחלץ פרטים ממסמך או ימיין אותו. מנצל קרדיטים בכל הודעה.
במבט אחד
| מאפיין | ערך |
|---|---|
| שם השלב | chat-agent |
| משאב | ClusterStep (lumen.ai/v1alpha1) |
| קבוצה וקטגוריה | ai, ai |
| קרדיטים | 3 קרדיטים בכל פעם שהוא מצליח |
| השפעה חיצונית | לא |
| ההתקנה צריכה לספק | כלום |
קלט
| מאפיין | ערך |
|---|---|
| צריך | כלום |
| מפיק | fields |
| עובד על | item מסמך אחד בכל פעם |
״צריך״ ו״מפיק״ הם סוגי נתונים (file, text, fields, email). העורך מציע שלב רק במקום שבו מה שהוא צריך כבר נמצא במסלול. ראו מסמכים ונתונים.
פלט
More outputs are declared in the setting `fields`.
הגדרות
מגדירים תחת config: בצומת של התהליך. הגדרות טקסט יכולות להכיל מצייני מקום כמו {nodeId.field}.
| הגדרה | סוג | ברירת מחדל | תיאור |
|---|---|---|---|
instructions | string | - | Instructions replace the step's: what the agent is for and how it answers. Placeholders ({message}, {<nodeId>.<field>}) are filled from the document.minLength 1; maxLength 8000 |
tools | list of string | - | Tools replace the step's: the ClusterSteps it may call, by name.maxItems 16 |
memory | object | - | Memory replaces the step's: how many earlier turns of the session it reads. |
memory.windowחובה | integer | - | Window is how many earlier turns (a message and its reply) it reads.minimum 1; maximum 50 |
longTermMemory | object | - | LongTermMemory sets how the notes the agent keeps are kept. Whether the agent has a long-term memory at all is whether the memory tools (remember, recall, forget) are among its Tools. |
longTermMemory.retentionDays | integer | - | RetentionDays makes the notes the agent saves from now on expire after that many days; unset keeps them until they are forgotten.minimum 1; maximum 3650 |
longTermMemory.autoRecall | integer | - | AutoRecall is how many notes the harness recalls at the start of each run and puts in the prompt, so the agent need not remember to look: 3 when unset, 0 turns it off, at most 10. They use tokens on every run.minimum 0; maximum 10 |
modelRef | object | - | ModelRef is the model this node runs on, before the step's and the tenant's: a ClusterModelClass, or the tenant's own ModelClass in its namespace. |
modelRef.kind | string | - | Kind is ClusterModelClass (the default) or ModelClass.one of ClusterModelClass, ModelClass |
modelRef.nameחובה | string | - | minLength 1 |
files | object | - | Files is how the agent reads its document's files: whole when its model reads them, as text otherwise, within limits. |
files.mode | string | "attach" | Mode is attach (the model reads each file whole when it can, its text otherwise), text (only the text read out of each file) or none (no file at all). Unset is attach. ifNoText attaches them only when the document has no text, and sends none otherwise.one of attach, text, none, ifNoText |
files.maxFiles | integer | 10 | MaxFiles is the most files one document may bring; the rest are skipped. Unset is 10.minimum 1; maximum 100 |
files.maxPages | integer | 100 | MaxPages is the most PDF pages across all files together; a PDF that crosses it is read up to the pages left. Unset is 100.minimum 1; maximum 1000 |
files.maxBytes | integer | 20971520 | MaxBytes is the most bytes, all files together. Unset is 20 MB.minimum 1; maximum 104857600 |
guardrails | object | - | Guardrails are the rules the agent follows, the limits on its tools and what is masked in its output. |
guardrails.rules | list of string | - | Rules are told to the agent as rules it must follow.maxItems 20 |
guardrails.tools | map of object | - | Tools limits what the agent's tools may do, by the tool's step name. |
guardrails.output | object | - | Output masks what the agent's reply and output fields must not carry. |
guardrails.output.redact | list of string | - | Redact lists what is masked: creditCard, israeliID, email, phone.maxItems 4 |
guardrails.tables | object | - | Tables limits which tables the agent's table tools may touch: unset is no limit. |
guardrails.tables.write | list of string | - | maxItems 50 |
guardrails.tables.read | list of string | - | maxItems 50 |
mcp | list of object | - | MCP are tools of the workspace's MCP connections the agent may call, by connection and tool name. Only tools an admin allowed on the connection run; the model calls one as "<connector>/<tool>".maxItems 8 |
mcp[].connectorחובה | string | - | minLength 1; maxLength 253 |
mcp[].toolsחובה | list of string | - | minItems 1; maxItems 16 |
limits | object | - | Limits are this agent's safety caps, enforced while it works: a cap reached stops it and fails the step. A saved agent Step carries them for every flow that uses it. |
limits.maxTurns | integer | - | MaxTurns replaces the step's limit of model turns.minimum 1; maximum 100 |
limits.maxTokens | integer | - | MaxTokens caps the tokens (input and output) the agent uses.minimum 1; maximum 100000000 |
limits.maxMinutes | integer | - | MaxMinutes caps how long the agent works.minimum 1; maximum 1440 |
browser | object | - | Browser gives the agent a browser signed in to a website-login connection: the browser.* tools, acting on that site only. It needs the installation's browser capability. |
browser.connectorRefחובה | string | - | ConnectorRef is the website-login Connector in the workspace.minLength 1 |
fields | list of object | - | Fields are the details the agent answers in, each one an output of the node under its name, typed by its type, with its hint told to the model. A simple extraction is one agent node with fields: AI in a flow runs only through the agent step.maxItems 50 |
fields[].nameחובה | string | - | minLength 1 |
fields[].hint | string | - | Hint is more labels to look for, comma separated: "Amount due, סכום". |
fields[].type | string | - | Type is what the detail is: string, number, date (YYYY-MM-DD) or money ({amount, currency}). Unset is string, except that a known detail (date, total) keeps its own type.one of string, number, date, money |
knowledge | object | - | Knowledge is the agent's Lighthouse: which collections' documents it may read, and whether it is given the workspace's approved rules (by default it is; rules false keeps them out). |
knowledge.collections | list of string | - | Collections are KnowledgeCollections of the workspace, by name.maxItems 8 |
knowledge.mode | string | - | Mode is how they are given: inject puts their text in the prompt, auto injects a collection under the inject budget. retrieve (the search tool) is not built yet.one of auto, inject |
knowledge.rules | boolean | - | Rules false keeps the workspace's approved rules out of this agent's prompt, for an agent that talks to customers: the rules come from the workspace's own documents, which may be private. Unset or true gives them. |
ה-JSON Schema המלא של ההגדרות: chat-agent.schema.json.
דוגמה
config
instructions: You help a small print shop answer customers. Answer briefly and politely,
in the language the person wrote in.
שימוש בתהליך
צומת שמריץ את chat-agent נכנס תחת spec.nodes של Flow. תנו לו כל מזהה, ורשמו ב-next את מזהי הצמתים הבאים.
flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: chat-agent-example
namespace: tenant-acme
spec:
displayName: "AI agent"
triggers:
- id: start
ref: {name: manual-run}
next: [chat-agent]
nodes:
- id: chat-agent
stepRef: {name: chat-agent}
config:
instructions: You help a small print shop answer customers. Answer briefly and politely,
in the language the person wrote in.
הדף עזר לכם?