Configuring AI Agents
Configure Celigo AI agent and guardrail imports -- LLM-powered steps that classify, extract, validate, or generate data within flows. Use when creating agent imports (OpenAI, Gemini), guardrails (PII, moderation), or configuring prompts, structured output, or BYOK connections.
- Skill ID
- celigo/ai/configuring-ai-agents
- Publisher
- celigo
- Repository
- ai
- Installs
- 0
- Files
- 5
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
celigo/ai/configuring-ai-agentsInstalls these files- SKILL.md
- references/schemas/aiagent.yml
- references/schemas/guardrail.yml
- references/schemas/request.yml
- references/schemas/response.yml
What this skill tells the agent
<!-- TIER:1 -->
Configuring AI Agents
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 --
json_schemaoutput format forces the model to return data conforming to a JSON Schema, enabling reliable field extraction for mapping.textreturns free-form responses.blobreturns binary data (image generation) - 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
pageProcessors[]entry, but planned when building the agent. The response is available via_json. Response mapping uses Transformation 1.0 syntax (extract/generate pairs)
AI agents do not require a _connectionId unless using BYOK (bring your own key). Without one, platform-managed credentials are used.
Used across flows, APIs, and tools.
Two Types of AI Import
AI Agent Imports
Invoke an LLM for classification, extraction, summarization, translation, or generation. Two providers:
- OpenAI (
provider: "openai") -- GPT models via the OpenAI Responses API. Supports reasoning effort control, structured JSON output, web search, MCP tools, Celigo Tools, and image generation. - Gemini (
provider: "gemini") -- Google Gemini models via LiteLLM proxy. Supports thinking config, Google Search grounding, URL context, file search, MCP tools, and Celigo Tools.
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
aiAgentconfig as AI Agent imports) - 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 _connectionId unless using BYOK for the ai_agent sub-type.
AI agent vs guardrail: pick by what the LLM produces. A guardrail renders a fixed verdict (flagged: true|false 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).
Quick Reference
Adaptor Decision Matrix
| You need... | Use adaptorType | Config block | Read schema |
|---|---|---|---|
| LLM classification, extraction, generation | AiAgentImport | aiAgent{} | aiagent.yml |
| PII detection or masking | GuardrailImport | guardrail{} | guardrail.yml |
| Content moderation | GuardrailImport | guardrail{} | guardrail.yml |
| AI-based custom validation | GuardrailImport with guardrail.type: "ai_agent" | guardrail.aiAgent{} | guardrail.yml + aiagent.yml |
adaptorType is case-sensitive: AiAgentImport, not aiagentimport.
Provider Decision Matrix
| Provider | Config path | Instructions field | Models | Tool types |
|---|---|---|---|---|
| OpenAI | aiAgent.openai{} | openai.instructions | gpt-4.1-mini, gpt-5-mini, gpt-5, gpt-4.1, gpt-5-pro, gpt-4.1-nano | web_search, mcp, tool, image_generation |
| Gemini | aiAgent.litellm{} | litellm._overrides.gemini.systemInstruction | gemini/gemini-2.5-pro, gemini/gemini-2.5-flash | googleSearch, urlContext, fileSearch, mcp, tool |
Minimum Required Fields
AiAgentImport: name, adaptorType: "AiAgentImport", aiAgent.provider, and provider config (aiAgent.openai{} or aiAgent.litellm{}). Instructions and model are required within the provider block.
GuardrailImport: name, adaptorType: "GuardrailImport", guardrail.type, and the sub-type config (guardrail.pii{}, guardrail.moderation{}, or guardrail.aiAgent{}).
Schema Index
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
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 |
|---|---|---|
text | string | Free text for the model to reason over. The most common input |
record | object or array | The full structured record (or part of it) as JSON. Use when the model needs to see multiple fields together |
files | array of { name, blobKey } | File references. Text files are sent inline; images and PDFs are converted to a pre-signed URL the model fetches; other file types error |
conversationHistoryId | 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 record by default.
Output Formats
The output format determines both what the model returns and which response variable carries it into response mapping:
| Format | Response variable | Use for |
|---|---|---|
text | _text | Free-form text -- summaries, generated content, classifications parsed downstream |
json_schema | _json | Structured JSON conforming to a schema. Use when downstream steps need consistent fields. With strict: true, non-conforming outputs fail rather than pass through |
blob | blobKey | 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.
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
More from celigo
Use this skill in a project
Open any RiverX project, search the Skills panel for celigo/ai/configuring-ai-agents, and install it in one click.
