AI agent
Paso
chat-agentaiAnswers with AI, using the steps you give it as tools, and remembers the conversation. Give it fields to have it pull details out of a document or sort it. Uses credits on every message.
De un vistazo
| Propiedad | Valor |
|---|---|
| Nombre del paso | chat-agent |
| Recurso | ClusterStep (lumen.ai/v1alpha1) |
| Grupo de la paleta, categoría | ai, ai |
| Créditos | 3 créditos cada vez que tiene éxito |
| Efectos externos | no |
| La instalación debe aportar | nada |
Entradas
| Propiedad | Valor |
|---|---|
| Necesita | nada |
| Produce | fields |
| Trabaja sobre | item un documento cada vez |
Necesita y Produce son tipos de datos (file, text, fields, email). El editor ofrece un paso solo donde lo que necesita ya está en el camino. Consulta Documentos y datos.
Salidas
More outputs are declared in the setting `fields`.
Ajustes
Se definen bajo config: en el nodo del flujo. Los ajustes de texto pueden contener marcadores de posición como {nodeId.field}.
| Ajuste | Tipo | Valor por defecto | Descripción |
|---|---|---|---|
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.windowobligatorio | 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.nameobligatorio | 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[].connectorobligatorio | string | - | minLength 1; maxLength 253 |
mcp[].toolsobligatorio | 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.connectorRefobligatorio | 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[].nameobligatorio | 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. |
El JSON Schema completo de estos ajustes: chat-agent.schema.json.
Ejemplo
config
instructions: You help a small print shop answer customers. Answer briefly and politely,
in the language the person wrote in.
Úsalo en un flujo
Un nodo que ejecuta chat-agent va bajo spec.nodes de un Flow. Dale cualquier id y enumera en next los ids de los nodos siguientes.
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.
¿Te ha resultado útil esta página?