configuring-ai-agents
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- TIER:1 -->
<!-- TIER:1 -->
Configuring AI Agents
配置AI Agent
An AI agent is an LLM-powered import step that processes records through an AI model instead of writing them to an external system. Records flow in, the model processes them according to instructions, and structured output flows back into the pipeline.
AI agents handle four concerns:
- Prompt design -- the system instruction that defines the model's behavior, goals, and constraints (up to 50 KB). The prompt receives each record as context and must produce output that downstream steps can consume
- Structured output -- output format forces the model to return data conforming to a JSON Schema, enabling reliable field extraction for mapping.
json_schemareturns free-form responses.textreturns binary data (image generation)blob - Tool use -- the model can call web search, MCP server tools, Celigo Tool resources, or image generation during processing. Tools extend the model's capabilities beyond its training data
- Response mapping -- extract fields from the model's response back into the record for downstream steps. Configured on the flow's entry, but planned when building the agent. The response is available via
pageProcessors[]. Response mapping uses Transformation 1.0 syntax (extract/generate pairs)_json
AI agents do not require a unless using BYOK (bring your own key). Without one, platform-managed credentials are used.
_connectionIdUsed across flows, APIs, and tools.
AI Agent是一种由LLM驱动的导入步骤,它通过AI模型处理记录,而非将记录写入外部系统。记录流入后,模型会根据指令处理它们,结构化输出会回流到流水线中。
AI Agent处理四类核心事项:
- 提示词设计——定义模型行为、目标和约束的系统指令(最大50 KB)。提示词会将每条记录作为上下文接收,且必须生成下游步骤可消费的输出
- 结构化输出——输出格式强制模型返回符合JSON Schema的数据,为映射提供可靠的字段提取能力。
json_schema返回自由格式响应。text返回二进制数据(如图像生成)blob - 工具调用——模型在处理过程中可调用网页搜索、MCP服务器工具、Celigo Tool资源或图像生成工具。工具可扩展模型超出其训练数据的能力
- 响应映射——从模型响应中提取字段并回流到记录中供下游步骤使用。在流程的条目上配置,但需在构建Agent时规划。响应可通过
pageProcessors[]获取。响应映射使用Transformation 1.0语法(提取/生成对)_json
AI Agent无需,除非使用BYOK(自带密钥)。若未配置,则使用平台托管的凭据。
_connectionId可在流程、API和工具中通用。
Two Types of AI Import
两种AI导入类型
AI Agent Imports
AI Agent导入项
Invoke an LLM for classification, extraction, summarization, translation, or generation. Two providers:
- OpenAI () -- GPT models via the OpenAI Responses API. Supports reasoning effort control, structured JSON output, web search, MCP tools, Celigo Tools, and image generation.
provider: "openai" - Gemini () -- Google Gemini models via LiteLLM proxy. Supports thinking config, Google Search grounding, URL context, file search, MCP tools, and Celigo Tools.
provider: "gemini"
调用LLM执行分类、提取、摘要、翻译或生成任务。支持两种供应商:
- OpenAI()——通过OpenAI Responses API调用GPT模型。支持推理力度控制、结构化JSON输出、网页搜索、MCP工具、Celigo Tools和图像生成。
provider: "openai" - Gemini()——通过LiteLLM代理调用Google Gemini模型。支持思考配置、Google Search grounding、URL上下文、文件搜索、MCP工具和Celigo Tools。
provider: "gemini"
Guardrail Imports
防护栏导入项
Safety and compliance checks applied to data flowing through integrations. Three sub-types:
- ai_agent -- uses an AI model to evaluate data against custom instructions (reuses the same config as AI Agent imports)
aiAgent - pii -- detects and optionally masks personally identifiable information (email, SSN, credit card, etc.)
- moderation -- checks content against moderation categories (hate speech, violence, harassment, etc.)
Guardrails do not require a unless using BYOK for the sub-type.
_connectionIdai_agentAI agent vs guardrail: pick by what the LLM produces. A guardrail renders a fixed verdict ( plus reasoning) that the parent's routing branches on -- reach for it when the user says "verify / check / validate / flag / screen". An AI agent step does work whose output flows onward as data -- reach for it when the user says "classify / extract / generate / summarize / decide". Guardrails flag; they never block on their own -- the parent flow/API/tool decides what happens to flagged records (see configuring-guardrails).
flagged: true|false应用于集成流程中数据的安全与合规检查。包含三个子类型:
- ai_agent——使用AI模型根据自定义指令评估数据(复用与AI Agent导入项相同的配置)
aiAgent - pii——检测并可选屏蔽个人身份信息(邮箱、社保号、信用卡等)
- moderation——检查内容是否符合审核类别(仇恨言论、暴力、骚扰等)
防护栏无需,除非子类型使用BYOK。
_connectionIdai_agentAI Agent vs 防护栏:根据LLM生成的内容选择。防护栏会生成固定的判定结果(加推理说明),供父级路由分支使用——当用户需求为“验证/检查/确认/标记/筛查”时使用。AI Agent步骤会执行实际处理,其输出作为数据流转到下游——当用户需求为“分类/提取/生成/摘要/决策”时使用。防护栏仅做标记,本身不会拦截数据——父级流程/API/工具决定如何处理标记的记录(详见configuring-guardrails)。
flagged: true|falseQuick Reference
快速参考
Adaptor Decision Matrix
适配器决策矩阵
| You need... | Use adaptorType | Config block | Read schema |
|---|---|---|---|
| LLM classification, extraction, generation | | | aiagent.yml |
| PII detection or masking | | | guardrail.yml |
| Content moderation | | | guardrail.yml |
| AI-based custom validation | | | guardrail.yml + aiagent.yml |
adaptorTypeAiAgentImportaiagentimport| 需求场景 | 使用adaptorType | 配置块 | 参考Schema |
|---|---|---|---|
| LLM分类、提取、生成 | | | aiagent.yml |
| PII检测或屏蔽 | | | guardrail.yml |
| 内容审核 | | | guardrail.yml |
| 基于AI的自定义验证 | | | guardrail.yml + aiagent.yml |
adaptorTypeAiAgentImportaiagentimportProvider Decision Matrix
供应商决策矩阵
| Provider | Config path | Instructions field | Models | Tool types |
|---|---|---|---|---|
| OpenAI | | | | |
| Gemini | | | | |
| 供应商 | 配置路径 | 指令字段 | 模型 | 工具类型 |
|---|---|---|---|---|
| OpenAI | | | | |
| Gemini | | | | |
Minimum Required Fields
必填字段
AiAgentImport: , , , and provider config ( or ). Instructions and model are required within the provider block.
nameadaptorType: "AiAgentImport"aiAgent.provideraiAgent.openai{}aiAgent.litellm{}GuardrailImport: , , , and the sub-type config (, , or ).
nameadaptorType: "GuardrailImport"guardrail.typeguardrail.pii{}guardrail.moderation{}guardrail.aiAgent{}AiAgentImport:、、,以及供应商配置(或)。供应商块内必须包含指令和模型。
nameadaptorType: "AiAgentImport"aiAgent.provideraiAgent.openai{}aiAgent.litellm{}GuardrailImport:、、,以及子类型配置(, 或)。
nameadaptorType: "GuardrailImport"guardrail.typeguardrail.pii{}guardrail.moderation{}guardrail.aiAgent{}Schema Index
Schema索引
All schemas are in references/schemas/:
- Base fields (all imports): request.yml
- Response shape: response.yml
- AI agent config: aiagent.yml -- provider, model, instructions, reasoning, temperature, output format, tools
- Guardrail config: guardrail.yml -- PII entities, moderation categories, AI-based validation, confidence threshold
所有Schema均位于references/schemas/:
- 基础字段(所有导入项):request.yml
- 响应结构:response.yml
- AI Agent配置:aiagent.yml——供应商、模型、指令、推理、温度、输出格式、工具
- 防护栏配置:guardrail.yml——PII实体、审核类别、基于AI的验证、置信度阈值
Input Fields
输入字段
An AI agent step receives an in-flight record and maps parts of it into one of four input fields. The mapping destination dropdown shows exactly these four -- no more:
| Field | Type | Purpose |
|---|---|---|
| string | Free text for the model to reason over. The most common input |
| object or array | The full structured record (or part of it) as JSON. Use when the model needs to see multiple fields together |
| array of | File references. Text files are sent inline; images and PDFs are converted to a pre-signed URL the model fetches; other file types error |
| string | Stable per-conversation identifier that retains and replays history across runs (see Conversation History) |
If no input mapping is defined, the agent receives the un-mapped in-flight record as by default.
recordAI Agent步骤会接收流转中的记录,并将其部分内容映射到四个输入字段之一。映射目标下拉列表仅显示这四个字段:
| 字段 | 类型 | 用途 |
|---|---|---|
| 字符串 | 供模型推理的自由文本。最常用的输入类型 |
| 对象或数组 | 完整的结构化记录(或其部分),以JSON格式传递。当模型需要查看多个字段的组合时使用 |
| | 文件引用。文本文件会直接内联发送;图片和PDF会转换为预签名URL供模型获取;其他文件类型会报错 |
| 字符串 | 稳定的会话标识符,可在多次运行中保留和重放历史记录(详见会话历史) |
若未定义输入映射,Agent默认会将未映射的流转记录作为接收。
recordOutput Formats
输出格式
The output format determines both what the model returns and which response variable carries it into response mapping:
| Format | Response variable | Use for |
|---|---|---|
| | Free-form text -- summaries, generated content, classifications parsed downstream |
| | Structured JSON conforming to a schema. Use when downstream steps need consistent fields. With |
| | Binary content stored in Celigo blob storage that downstream steps fetch or forward. Used for image generation |
The response-mapping dropdown only shows the response field the chosen output format can produce.
输出格式决定了模型返回的内容类型,以及哪个响应变量会将其带入响应映射:
| 格式 | 响应变量 | 适用场景 |
|---|---|---|
| | 自由格式文本——摘要、生成内容、需下游解析的分类结果 |
| | 符合Schema的结构化JSON。当下游步骤需要从响应中映射特定字段时使用。若设置 |
| | 存储在Celigo blob存储中的二进制内容,可供下游步骤获取或转发。用于图像生成场景 |
响应映射下拉列表仅显示所选输出格式可生成的响应字段。
Related Skills
相关技能
- configuring-imports > AI Imports -- how AI agents fit within the broader import category
- configuring-connections > Quick Reference -- MCP connections for tool use, HTTP connections for BYOK
- building-flows > How to Build a Flow -- wiring AI agents into flow pipelines
- building-tools > Tool Concepts -- building Celigo Tools that AI agents can invoke
- writing-mappings > Response Mapping Reference -- extracting fields from AI responses
- troubleshooting-flows > Diagnostic Workflow -- diagnosing AI agent failures
- writing-handlebars > Quick Reference -- dynamic expressions in AI prompts and field values
- configuring-imports > AI Imports——AI Agent在更广泛的导入类别中的定位
- configuring-connections > Quick Reference——用于工具调用的MCP连接、用于BYOK的HTTP连接
- building-flows > How to Build a Flow——将AI Agent接入流程流水线
- building-tools > Tool Concepts——构建可供AI Agent调用的Celigo Tools
- writing-mappings > Response Mapping Reference——从AI响应中提取字段
- troubleshooting-flows > Diagnostic Workflow——排查AI Agent故障
- writing-handlebars > Quick Reference——AI提示词和字段值中的动态表达式
How to Build an AI Agent
如何构建AI Agent
1. Determine the task
1. 确定任务
What should the AI model do with each record? Common patterns: classification (sentiment, routing), extraction (invoice parsing, address normalization), validation (business rules), generation (translations, summaries), enrichment (web search augmentation). The task determines the provider, model, output format, and whether tools are needed.
AI模型需要对每条记录执行什么操作?常见场景:分类(情感分析、路由)、提取(发票解析、地址标准化)、验证(业务规则)、生成(翻译、摘要)、补充(网页搜索增强)。任务类型决定了供应商、模型、输出格式以及是否需要工具。
2. Check for existing patterns
2. 检查现有模式
bash
undefinedbash
undefinedSearch for existing AI agents in the account
搜索账户中已有的AI Agent
celigo ai-agents list
celigo ai-agents list
Search across the entire account
搜索整个账户
celigo account search "ai agent"
celigo account search "<task keyword>"
undefinedceligo account search "ai agent"
celigo account search "<任务关键词>"
undefined3. Choose the provider and model
3. 选择供应商和模型
Use OpenAI for most tasks -- it has broader tool support and reasoning controls. Use Gemini when you need Google Search grounding, URL context retrieval, or file search.
Within each provider, choose the model based on the task complexity:
- Simple tasks (classification, routing): use smaller models (,
gpt-4.1-mini,gpt-4.1-nano,gpt-5-mini)gpt-5-nano - Complex tasks (multi-step reasoning, extraction): use larger models (,
gpt-4.1,gpt-5)gpt-5-pro - Cost-sensitive: smaller models process faster and cost less
大多数任务优先选择OpenAI——它支持更广泛的工具和推理控制。当需要Google Search grounding、URL上下文检索或文件搜索时,选择Gemini。
在每个供应商下,根据任务复杂度选择模型:
- 简单任务(分类、路由):使用小型模型(,
gpt-4.1-mini,gpt-4.1-nano,gpt-5-mini)gpt-5-nano - 复杂任务(多步推理、提取):使用大型模型(,
gpt-4.1,gpt-5)gpt-5-pro - 成本敏感场景:小型模型处理速度更快、成本更低
4. Write the instructions
4. 编写指令
The system instruction is the most important configuration. Be specific about the task, expected input shape, and desired output. Include examples for complex tasks. Set constraints for edge cases (empty fields, invalid data). Keep instructions focused on a single responsibility per agent.
系统指令是最重要的配置项。需明确任务、预期输入格式和期望输出。复杂任务需包含示例。为边缘情况(空字段、无效数据)设置约束。每个Agent的指令应聚焦单一职责。
5. Configure the output format
5. 配置输出格式
Three options:
- -- forces structured JSON output conforming to a schema. Use this whenever downstream steps need to map specific fields from the response. Define the schema in
json_schema(OpenAI) oroutput.format.jsonSchema(Gemini)responseFormat.jsonSchema - -- free-form text response. Use for summarization, translation, or when the entire response is one field
text - -- binary output (image generation use cases)
blob
For , set if you need guaranteed schema conformance (slightly higher latency).
json_schemastrict: true有三种选项:
- ——强制返回符合Schema的结构化JSON。当下游步骤需要从响应中映射特定字段时使用。在
json_schema(OpenAI)或output.format.jsonSchema(Gemini)中定义SchemaresponseFormat.jsonSchema - ——自由格式文本响应。用于摘要、翻译或整个响应为单一字段的场景
text - ——二进制输出(图像生成场景)
blob
对于,若需要保证Schema一致性,设置(会略微增加延迟)。
json_schemastrict: true6. Tune parameters
6. 调优参数
- (OpenAI) or
reasoning.effort(Gemini) -- controls depth of reasoning. UsethinkingConfig.thinkingLevelfor most tasks;"medium"for simple classification;"low"for complex analysis"high" - --
temperaturefor deterministic output (data extraction, classification);0.2for creative generation1.0+ - /
maxOutputTokens-- set based on expected response size.maxCompletionTokensfor short classifications;1000for detailed extractions;5000-20000for long-form generation100000+
- (OpenAI)或**
reasoning.effort**(Gemini)——控制推理深度。大多数任务使用thinkingConfig.thinkingLevel;简单分类使用"medium";复杂分析使用"low""high" - ——
temperature用于确定性输出(数据提取、分类);0.2用于创意生成1.0+ - /
maxOutputTokens——根据预期响应大小设置。短分类设置为maxCompletionTokens;详细提取设置为1000;长文本生成设置为5000-20000100000+
7. Add tools (if needed)
7. 添加工具(如有需要)
Tools extend what the model can do during processing:
- (OpenAI) /
web_search(Gemini) -- search the web for current information to enrich recordsgoogleSearch - -- connect to an MCP server for external tool calls. Requires an MCP connection (
mcp). Optionally restrict with_mcpConnectionIdallowedTools - -- invoke a Celigo Tool resource. Reference via
tool. Supports per-agent_toolIdoverrides - (OpenAI) -- generate images from text descriptions
image_generation - (Gemini) -- fetch and process URL content
urlContext - (Gemini) -- search uploaded files
fileSearch
工具可扩展模型在处理过程中的能力:
- (OpenAI)/
web_search(Gemini)——搜索网页获取最新信息以补充记录googleSearch - ——连接到MCP服务器调用外部工具。需要MCP连接(
mcp)。可通过_mcpConnectionId限制可用工具allowedTools - ——调用Celigo Tool资源。通过
tool引用。支持每个Agent的_toolId配置overrides - (OpenAI)——根据文本描述生成图像
image_generation - (Gemini)——获取并处理URL内容
urlContext - (Gemini)——搜索上传的文件
fileSearch
8. Configure BYOK (optional)
8. 配置BYOK(可选)
By default, AI agents use platform-managed credentials. To use your own API key, create an HTTP connection with your provider's API key and set on the import, or use .
_connectionIdceligo ai-agents replace-connection <agentId> <connectionId>默认情况下,AI Agent使用平台托管的凭据。若要使用自己的API密钥,创建包含供应商API密钥的HTTP连接,并在导入项上设置,或使用命令。
_connectionIdceligo ai-agents replace-connection <agentId> <connectionId>9. Build the JSON
9. 构建JSON
Read the schema files from the Schema Index. Start with request.yml for base fields, then aiagent.yml for the provider configuration block.
Celigo AI vs BYOK
Celigo AI vs BYOK
Cutting across both providers is a second decision: run the agent on Celigo AI (platform-managed credentials) or BYOK (bring your own key).
- Celigo AI -- no API key to manage. The trade is restriction: model choice is limited to Celigo's curated per-provider list (a subset of the GPT-5 and GPT-4.1 families on OpenAI; the Gemini 2.5 family on Gemini), and usage counts against the account's monthly AI token quota
- BYOK -- the agent uses your own API key (configured on a connection; see step 8 above). Any model the provider supports is available -- new releases, fine-tuned models, models off Celigo's curated list -- and quota and rate limiting move to your provider account
Default to Celigo AI for prototyping, low-volume agents, and agents happy with the curated model list. Reach for BYOK when you need a model that isn't on the list, when volume would exceed the monthly token quota, or when you want costs to land on your existing AI vendor billing.
Switching between Celigo AI and BYOK -- or changing the model -- can drop configuration that no longer applies: is BYOK-only, applies only to reasoning-capable models, and image modalities apply only to image-capable Gemini models. It is not a one-knob change.
serviceTierreasoning.effort除了供应商选择,还需决定是使用Celigo AI(平台托管凭据)还是BYOK(自带密钥)运行Agent。
- Celigo AI——无需管理API密钥。局限性:模型选择仅限于Celigo为每个供应商精选的列表(OpenAI的GPT-5和GPT-4.1系列子集;Gemini的Gemini 2.5系列),使用量会计入账户的月度AI令牌配额
- BYOK——Agent使用您自己的API密钥(在连接中配置;详见步骤8)。支持供应商提供的任何模型——新版本、微调模型、Celigo精选列表外的模型——配额和速率限制由您的供应商账户管控
原型开发、低流量Agent以及满足于精选模型列表的Agent默认使用Celigo AI。当需要列表外的模型、使用量会超出月度令牌配额,或希望成本计入现有AI供应商账单时,选择BYOK。
在Celigo AI和BYOK之间切换——或更换模型——可能会导致不再适用的配置被清除:仅适用于BYOK,仅适用于支持推理的模型,图像模态仅适用于支持图像的Gemini模型。这并非一键切换操作。
serviceTierreasoning.effortConversation History
会话历史
By default, AI agent steps are stateless -- each record is its own conversation and the agent has no memory of previous records. This keeps behavior reproducible and cost predictable.
To make an agent stateful, map a stable per-conversation identifier into its input field -- a Slack thread ID, session UUID, customer ID, or ticket number, whatever is unique per conversation. Celigo retains the conversation history for that identifier and replays it on subsequent calls, so the agent sees prior turns. Mapping , for example, makes every reply in a Slack thread aware of the earlier messages.
conversationHistoryIdrecord.slack_thread_idThe identifier is scoped per user and per agent: the same string used by two different agents is two separate conversations, and the same agent used by two different users is two separate conversations. The retained history is not accessible through public APIs or the UI -- it exists for the model to read, not for users to browse -- and idle conversations age out via a TTL that resets on each update.
默认情况下,AI Agent步骤是无状态的——每条记录都是独立的会话,Agent不会保留之前记录的记忆。这确保了行为可重现且成本可预测。
若要使Agent变为有状态,将稳定的会话标识符映射到其输入字段——例如Slack线程ID、会话UUID、客户ID或工单编号,任何会话唯一的标识即可。Celigo会保留该标识符对应的会话历史,并在后续调用中重放,因此Agent可以看到之前的对话回合。例如,映射可使Slack线程中的每条回复都能感知到之前的消息。
conversationHistoryIdrecord.slack_thread_id标识符的作用域为每个用户和每个Agent:同一个字符串被两个不同Agent使用时,会被视为两个独立的会话;同一个Agent被两个不同用户使用时,也会被视为两个独立的会话。保留的历史记录无法通过公开API或UI访问——仅供模型读取,不供用户浏览——闲置会话会通过TTL机制过期,每次更新都会重置TTL。
Capability Check Before Building
构建前的能力检查
Before building an agent, walk through each action the requirement says the agent should perform and confirm each one maps to a capability the agent will actually have at runtime. The goal is to surface gaps early, not to refuse capabilities.
Capabilities come from three places:
- Native to the chosen model -- OpenAI's and
web_search; Gemini'simage_generation,googleSearch,urlContext, and image-modality outputfileSearch - Tools wired into the agent -- tools and Celigo Tools
mcp - Downstream steps in the parent -- rendering output, writing to a destination, notifying a recipient (same shape whether the parent is a flow, API endpoint, or Tool)
For each action, ask which of the three covers it; if none do, that is a gap to raise before building. A common example is "generate a PDF invoice": no provider ships PDF rendering as a native capability, so the right shape is the agent emitting structured invoice content ( output) with a downstream step or Celigo Tool rendering the PDF. Equally, don't enable capabilities the requirement didn't ask for -- "classify support tickets" needs text classification (native), not "just in case."
json_schemaweb_search在构建Agent之前,逐一确认需求中Agent应执行的每个操作是否对应其运行时实际具备的能力。目的是提前发现缺口,而非拒绝需求。
能力来源于三个方面:
- 所选模型原生支持——OpenAI的和
web_search;Gemini的image_generation、googleSearch、urlContext和图像模态输出fileSearch - 接入Agent的工具——工具和Celigo Tools
mcp - 父级流程的下游步骤——渲染输出、写入目标、通知接收方(无论父级是流程、API端点还是Tool,结构都相同)
对于每个操作,确认由哪一方面提供支持;若均不支持,则需在构建前提出缺口。常见示例:“生成PDF发票”——没有供应商原生支持PDF渲染,正确的方案是Agent输出结构化发票内容(输出),然后由下游步骤或Celigo Tool渲染PDF。同样,不要启用需求未提及的能力——“分类支持工单”仅需要文本分类(原生能力),无需“以防万一”启用。
json_schemaweb_searchHow to Build a Guardrail
如何构建防护栏
1. Choose the guardrail type
1. 选择防护栏类型
- -- detect (and optionally mask) personally identifiable information. Configure which entity types to scan for in
pii. Note:guardrail.pii.entitiesreturns the redacted payload under amask: trueresponse field -- downstream steps only see it if you author a response-mapping write-back (see configuring-guardrails > PII: mask vs flag)masked - -- check content against harmful categories. Configure which categories in
moderationguardrail.moderation.categories - -- custom AI-powered validation using the same LLM configuration as AI Agent imports
ai_agent
- ——检测(并可选屏蔽)个人身份信息。在
pii中配置需要扫描的实体类型。注意:guardrail.pii.entities会在mask: true响应字段下返回脱敏后的负载——下游步骤仅在您编写了响应映射回写时才能看到(详见configuring-guardrails > PII: mask vs flag)masked - ——检查内容是否符合有害类别。在
moderation中配置需要检查的类别guardrail.moderation.categories - ——使用与AI Agent导入项相同的LLM配置进行自定义AI驱动验证
ai_agent
2. Set the confidence threshold
2. 设置置信度阈值
guardrail.confidenceThresholdguardrail.confidenceThreshold3. Build the JSON
3. 构建JSON
Read guardrail.yml for all configuration options. For the sub-type, also read aiagent.yml.
ai_agent参考guardrail.yml获取所有配置选项。对于子类型,还需参考aiagent.yml。
ai_agentCLI Commands
CLI命令
bash
undefinedbash
undefinedCRUD -- AI Agents
CRUD -- AI Agents
celigo ai-agents list
celigo ai-agents get <id>
celigo ai-agents create < agent.json
celigo ai-agents update <id> < agent.json
celigo ai-agents set <id> key=value [key2=value2 ...]
celigo ai-agents delete <id> [-y]
celigo ai-agents list
celigo ai-agents get <id>
celigo ai-agents create < agent.json
celigo ai-agents update <id> < agent.json
celigo ai-agents set <id> key=value [key2=value2 ...]
celigo ai-agents delete <id> [-y]
Invoke (test without creating a job)
调用(无需创建任务即可测试)
echo '[{"text":"classify this"}]' | celigo ai-agents invoke <id>
echo '[{"text":"classify this"}]' | celigo ai-agents invoke <id>
Clone and connection management
克隆和连接管理
celigo ai-agents clone <id>
celigo ai-agents replace-connection <id> <newConnectionId>
celigo ai-agents clone <id>
celigo ai-agents replace-connection <id> <newConnectionId>
Debug
调试
celigo ai-agents enable-debug <id> [--duration <minutes>]
celigo ai-agents disable-debug <id>
celigo ai-agents enable-debug <id> [--duration <minutes>]
celigo ai-agents disable-debug <id>
CRUD -- Guardrails
CRUD -- 防护栏
celigo guardrails list
celigo guardrails get <id>
celigo guardrails create < guardrail.json
celigo guardrails update <id> < guardrail.json
celigo guardrails set <id> key=value [key2=value2 ...]
celigo guardrails delete <id> [-y]
celigo guardrails list
celigo guardrails get <id>
celigo guardrails create < guardrail.json
celigo guardrails update <id> < guardrail.json
celigo guardrails set <id> key=value [key2=value2 ...]
celigo guardrails delete <id> [-y]
Invoke (test without creating a job)
调用(无需创建任务即可测试)
echo '[{"text":"check this content"}]' | celigo guardrails invoke <id>
echo '[{"text":"check this content"}]' | celigo guardrails invoke <id>
Clone and connection management
克隆和连接管理
celigo guardrails clone <id>
celigo guardrails replace-connection <id> <newConnectionId>
celigo guardrails clone <id>
celigo guardrails replace-connection <id> <newConnectionId>
Debug
调试
celigo guardrails enable-debug <id> [--duration <minutes>]
celigo guardrails disable-debug <id>
celigo guardrails enable-debug <id> [--duration <minutes>]
celigo guardrails disable-debug <id>
Discovery
发现
celigo account search "<keyword>"
celigo templates marketplace
<!-- TIER:3 -->celigo account search "<keyword>"
celigo templates marketplace
<!-- TIER:3 -->Pre-Submit Checklist
提交前检查清单
Required (AI Agent)
必填项(AI Agent)
- is exactly
adaptorType(case-sensitive)AiAgentImport - is set (
aiAgent.provideror"openai")"gemini" - Instructions are set (or
aiAgent.openai.instructions)aiAgent.litellm._overrides.gemini.systemInstruction - Model is set (or
aiAgent.openai.model)aiAgent.litellm.model - If using output: schema is defined in
json_schema(OpenAI) oroutput.format.jsonSchema(Gemini)responseFormat.jsonSchema
- 严格为
adaptorType(区分大小写)AiAgentImport - 已设置(
aiAgent.provider或"openai")"gemini" - 已设置指令(或
aiAgent.openai.instructions)aiAgent.litellm._overrides.gemini.systemInstruction - 已设置模型(或
aiAgent.openai.model)aiAgent.litellm.model - 若使用输出:已在
json_schema(OpenAI)或output.format.jsonSchema(Gemini)中定义SchemaresponseFormat.jsonSchema
Required (Guardrail)
必填项(防护栏)
- is exactly
adaptorType(case-sensitive)GuardrailImport - is set (
guardrail.type,"ai_agent", or"pii")"moderation" - Sub-type config is present: for PII,
guardrail.pii.entities[]for moderation,guardrail.moderation.categories[]for AI validationguardrail.aiAgent{}
- 严格为
adaptorType(区分大小写)GuardrailImport - 已设置(
guardrail.type,"ai_agent"或"pii")"moderation" - 已存在子类型配置:PII类型需,内容审核需
guardrail.pii.entities[],AI验证需guardrail.moderation.categories[]guardrail.aiAgent{}
Cross-resource consistency
跨资源一致性
- If using BYOK: references a valid HTTP connection with the provider's API key
_connectionId - If using MCP tools: references a valid MCP connection
_mcpConnectionId - If using Celigo Tools: references a valid Tool resource
_toolId - If response mapping needed: configured on the flow's entry, not on the agent itself
pageProcessors[]
- 若使用BYOK:引用了包含供应商API密钥的有效HTTP连接
_connectionId - 若使用MCP工具:引用了有效的MCP连接
_mcpConnectionId - 若使用Celigo Tools:引用了有效的Tool资源
_toolId - 若需要响应映射:已在流程的条目上配置,而非在Agent本身配置
pageProcessors[]
Gotchas
常见陷阱
- PUT erases omitted fields. Always GET first, modify, then PUT. The command handles this.
set - OpenAI and Gemini use different config paths. OpenAI instructions are at ; Gemini instructions are at
aiAgent.openai.instructions. Using the wrong path silently produces an agent with no instructions.aiAgent.litellm._overrides.gemini.systemInstruction - Gemini model IDs require the prefix. Use
gemini/, notgemini/gemini-2.5-pro. Without the prefix, LiteLLM cannot route to the correct provider.gemini-2.5-pro - output without a schema definition returns unpredictable JSON. Always define
json_schemawhen usingjsonSchemaoutput format.json_schema - Response mapping is on the flow, not the agent. AI responses are available via in the flow's
_jsonresponse mapping. Putting mapping config on the agent itself has no effect.pageProcessors[] - MCP tool connections must be type . Regular HTTP connections cannot be used as
mcpeven if they point to an MCP server URL._mcpConnectionId - defaults to 1000. For complex extractions or long-form generation, increase this or the response will be truncated silently.
maxOutputTokens - Off-list models are silently swapped without BYOK. Selecting a model that isn't on Celigo's curated list when no BYOK connection is wired up makes the engine substitute the provider's default and surface a warning. Model-gated parameters the resolved model doesn't accept are also stripped (e.g.,
model_correctionon areasoningmodel,gpt-4.1on a non-thinking Gemini model). Read the returned warnings rather than assuming your requested model and parameters ran.thinkingConfig - Unmapped inputs default to . With no input mapping defined, the entire in-flight record is passed to the agent as
record. Convenient for prototypes, but maprecord,text, orrecordexplicitly for precise control over what the model sees.files
- PUT请求会清除未提及的字段。始终先执行GET请求,修改后再执行PUT请求。命令会自动处理此问题。
set - OpenAI和Gemini使用不同的配置路径。OpenAI的指令位于;Gemini的指令位于
aiAgent.openai.instructions。使用错误路径会导致Agent无指令,且无任何提示。aiAgent.litellm._overrides.gemini.systemInstruction - Gemini模型ID需要前缀。需使用
gemini/,而非gemini/gemini-2.5-pro。若无该前缀,LiteLLM无法路由到正确的供应商。gemini-2.5-pro - 无Schema定义的输出会返回不可预测的JSON。使用
json_schema输出格式时,必须定义json_schema。jsonSchema - 响应映射配置在流程上,而非Agent上。AI响应可通过流程响应映射中的
pageProcessors[]获取。在Agent本身配置映射无效。_json - MCP工具连接必须为类型。即使指向MCP服务器URL,常规HTTP连接也无法用作
mcp。_mcpConnectionId - 默认值为1000。对于复杂提取或长文本生成,需增大该值,否则响应会被静默截断。
maxOutputTokens - 未在列表中的模型会在无BYOK时被静默替换。当未配置BYOK连接时,选择Celigo精选列表外的模型会导致引擎替换为供应商的默认模型,并显示警告。已解析模型不支持的模型专属参数也会被移除(例如
model_correction模型的gpt-4.1参数、非思考型Gemini模型的reasoning参数)。需查看返回的警告,不要假设请求的模型和参数已生效。thinkingConfig - 未映射的输入默认使用。若未定义输入映射,整个流转记录会作为
record传递给Agent。原型开发时很方便,但为了精确控制模型接收的内容,需显式映射record、text或record。files
Common Errors
常见错误
| Error | Cause | Fix |
|---|---|---|
422 | Wrong case | Use |
| Truncated AI response | | Increase to match expected response size |
| Empty or nonsensical output | Missing or vague instructions | Write specific instructions with expected input/output format |
| Wrong connection type | Use an MCP connection, not HTTP |
| Tool resource deleted or wrong ID | Verify tool exists with |
| Guardrail flags everything | | Increase threshold (e.g., 0.7 to 0.9) |
| Guardrail misses obvious PII | Missing entity types | Add all relevant entity types to |
| 错误 | 原因 | 修复方案 |
|---|---|---|
422 | 大小写错误 | 严格使用 |
| AI响应被截断 | | 根据预期响应大小增大该值 |
| 输出为空或无意义 | 指令缺失或模糊 | 编写明确的指令,包含预期的输入/输出格式 |
| 连接类型错误 | 使用MCP连接,而非HTTP连接 |
| Tool资源已删除或ID错误 | 使用 |
| 防护栏标记所有内容 | | 提高阈值(例如从0.7调整到0.9) |
| 防护栏遗漏明显的PII | 实体类型缺失 | 将所有相关实体类型添加到 |