/cognigy:agent-creationfrom cognigy
Guides building and configuring Cognigy AI Agents: checking environment capabilities, listing projects, ensuring an LLM exists, creating or modifying agents, and testing.
Ships in cognigy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Cognigy has two kinds of agent. With the user, call both "AI Agents"; say "legacy" only when you must tell them apart, and never say "V1", "V2" or "Agents V2".
check_capabilities once per conversation, before creating or changing any agent.aiAgents: "available" → first list the project's agents (list_resources { resourceType: 'agent', projectId }). If it has agents and every one has legacy: true, the project is legacy-only: use Path B with create_ai_agent { legacy: true }. Do the same when the user asked for a legacy agent. Otherwise build with manage_agent (Path A); a new project has no agents, so it gets Path A.aiAgents: "unavailable" → Path B, create_ai_agent without legacy. Say nothing about kinds.aiAgents: "unknown" → try Path A; if manage_agent fails with 403 or 404, use Path B.Existing agents: list_resources { resourceType: 'agent', projectId } returns both kinds. If the project has AI Agents they are in items; legacy agents are under legacyAgents and carry legacy: true, and are only used when the user names one. Pass each item's use on ({ agentId } or { aiAgentId }, plus projectId). A pasted UUID is a referenceId — find the matching item in that list and use its id.
manage_agent create gets no projectId; Path B when create_ai_agent gets none. Keep the returned projectId and run steps 3-6 for it before testing.isInPlatformLlm: true, shown as "Included by NiCE Cognigy"), which needs no connection. Either one is enough; skip steps 4-6.check_capabilities reports s2s available and the target project has no gpt-live-1 model: note any connected gpt-live-1 model you see and follow the voice-gateway-setup skill ("Speech-to-speech first") before copying it
referenceId from the response if you need to assign it explicitly later.
(See the llm-providers skill for valid provider/modelType values)llm when the plugin picked the model. A REST endpoint for testing is created too.
— Bind the text LLM from the shared steps by its referenceId. Omitted, the plugin binds the model create_ai_agent would pick (a connected or NiCE-provided one, the project default first). Never bind a speech-to-speech model (gpt-live-1).
— agentType: "text" for a chat agent, "voice" for a phone or voice agent. Omitted, the platform makes a voice agent.
— A voice agent runs speech-to-speech (S2S, also called voice-to-voice or V2V) when it can: create binds the project's gpt-live-1 model where s2s is available, and voiceLargeLanguageModelReferenceId: "" keeps it on speech. Relay the result's _hints.hint as it says (voice-gateway-setup skill).error (e.g. "language model isn't fully configured"), fix the LLM binding with manage_agent { operation: "update", largeLanguageModelReferenceId } before anything else.| Field | Purpose |
|---|---|
| name | Display name, also used when the agent introduces itself |
| role | Short role, e.g. "Customer support specialist" (max 100 chars). Opens the generated system prompt |
| description | Who the agent is, its personality and tone |
| instructions | How it does its job: procedures, rules, what to escalate (max 5000 chars; may hold CognigyScript) |
| largeLanguageModelReferenceId | The text LLM |
| llmConfig | { temperature, maxOutputTokens, reasoningEffort }. On update the whole block is replaced |
| knowledge | Knowledge search — see "Knowledge" below |
| guardrails | safetySettings switches (all on by default) and dataPrivacy.contactProfilesOption (none, completeProfile, profileMemoriesOnly, selectedProfileFields) |
| hooks | { preTurn: [{ handler: { kind: "conversationFlow", flowReferenceId } }] } — a pre-turn Flow that runs before every answer (see "Pre-turn hook"). null removes it |
| personaReferenceId | A brand persona shared by several agents. The UI requires one: create picks the project's first, or makes the default "NiCE" |
| image | Avatar URL or base64 data URI |
| skillReferenceIds / toolReferenceIds | create only; later use attach/detach |
| disabledToolReferenceIds | update only: switch attached tools off without detaching them |
Spread the configuration across role, description and instructions instead of putting everything in one field.
Components live in the project; an agent points at skills and tools by referenceId. Pass agentId on create to attach in the same call, or use attach / detach later.
catalog { component: "tool", projectId } lists what the platform ships and each tool's parameters. Then
create { component: "tool", projectId, agentId, config: { builtinSlug, name, description, parameters: { <key>: value | { mode, value } } } }.
mode: "dynamic" — you fix the value now (a URL, a method). mode: "aiFilled" — the LLM fills it per turn (a query, a payload). A plain value (url: "https://…") makes the parameter dynamic; pass { mode: "aiFilled" } to leave it to the LLM.description tells the LLM when to call the tool; write it for that.connection hold credentials. Never invent them: the user picks the Connection in the agent editor.http-request (call an API), knowledge-search, send-email, handoff-to-flow, execute-tool-flow (see "A Flow as a tool"); for voice agents voice-hangup, voice-transfer. Speech and call behaviour are the agent's voice_settings component, not a tool (voice-gateway-setup skill).catalog { component: "skill" } for the builtin ones (config: { builtinSlug }), or your own:
create { component: "skill", projectId, agentId, config: { name, description, instructions, bundledTools?: [tool referenceIds], resources?: [{ path, content, encoding: "utf8" }] } }.
update { component: "skill", componentId, config: { bundledTools } } replaces the skill's whole tool list. A bundled tool does not need to be attached to the agent: the agent gets it when it loads the skill.
instructions. With two or more, make one skill per journey: its description says when to use it, and its tools go in bundledTools. Skills hold steps, not facts; rules the agent needs on every turn stay in instructions. Write a skill for what the agent got wrong without one, so test with talk_to_agent first.create { component: "mcp_server", config: { name, url, authType: "none" | "oAuth2" | "customHeader", headers?, authConnectionReferenceId? } }. headers are plain, non-secret headers. oAuth2 and customHeader need authConnectionReferenceId, a Connection that holds the credentials (for customHeader also the header name); the user creates it in Cognigy, never invent one. Then discover_tools → sync_tools { import: ["<name>"] } → attach each imported tool by its referenceId. To remove a server, first sync_tools { remove: [imported tool referenceIds] }; the platform refuses to delete a server whose tools still exist.create { component: "persona", config: { name, description, speakingStyle: { formality, completeness }, voiceConfig: { ttsVendor, ttsVoice, ttsModel, ttsLabel } } }, then manage_agent update { personaReferenceId }. Every agent needs one, or the Cognigy UI can't save it: create sets it when you pass none (the result's persona), and a persona still in use can't be deleted. When create made the default "NiCE" (persona.created: true), offer to tailor it to the brand. The API requires real voiceConfig values (empty strings are rejected): copy them from an existing persona (list / get with component persona) or ask the user. Never invent them. Calls read only the language from it; the voice comes from voice_settings.delete is permanent and detaches the component from every agent (the result's detachedFrom lists the agents a deleted skill was taken off); tell the user before you delete one that agents use.Loading a skill adds an LLM call to that turn, and a loaded skill stays for the rest of the conversation. To make an agent faster:
instructions rather than a skill.bundledTools.instructions, skill text and tool descriptions short, and detach tools and skills the agent no longer uses.llmConfig.reasoningEffort answers faster.Create and fill a store first (knowledge-setup skill), then:
manage_agent { operation: "update", agentId, projectId, knowledge: { ragType: "cognigy", ragMode: "agent", onSearchFailure: "answerAnyway", cognigyParameters: { stores: ["<store referenceId>"], topK: 5 } } }.
ragMode "agent" lets the LLM decide when to search, "always" searches on every turn, "never" switches it off.
A pre-turn Flow runs before every answer and can rewrite the message or add context for that one turn.
manage_agent { operation: "create_flow", projectId, flowType: "preTurn", name } makes the Flow with its closing Continue to AI Agent node. Without that node the agent gives no answer.mode: "append" on the Start node (startNodeId) or on the node before, so Continue stays last. Set Continue's turnContext (label → value pairs the agent sees with the message) or text with manage_flow_nodes update on closingNodeId.manage_agent { operation: "update", agentId, projectId, hooks: { preTurn: [{ handler: { kind: "conversationFlow", flowReferenceId } }] } }.Use it when a tool needs Flow logic (several API calls, Code nodes, branching). The agent calls the tool, the Flow runs, and its Tool Result answer is what the call returns.
manage_agent { operation: "create_flow", projectId, flowType: "tool", name, answer? } makes the Flow with its closing Tool Result node. The call's arguments arrive in the Flow as input.data.toolArgs; answer (CognigyScript) is what the agent gets back, by default the arguments as JSON.mode: "append" on startNodeId, Tool Result stays last) and set the real answer with manage_flow_nodes update { nodeId: closingNodeId, config: { answer } }.manage_agent_components { operation: "create", component: "tool", projectId, agentId, config: { builtinSlug: "execute-tool-flow", name, description, parameters: { flowReferenceId, <argument>: { mode: "aiFilled", description } } } }. Every parameter besides flowReferenceId is an argument: aiFilled ones the LLM fills, a plain value is fixed. The description tells the LLM when to call the tool.A Flow that ends without Tool Result answers "The flow finished without returning an answer."; a failed one "The flow failed before returning an answer." Neither Flow kind can wait for the user (no Question nodes).
Only when check_capabilities reports customSystemPrompt: "available" and the user wants to edit the prompt itself — role, description and instructions cover most needs.
[[agent.*]] tokens the agent needs.reset_system_prompt goes back to the generated prompt.
— onBuildFailure decides what happens when the template cannot be built (too large, empty, or the script engine fails; a CognigyScript mistake only renders empty): "defaultPrompt" falls back to the generated prompt, "noAnswer" sends no reply.Only when Path A does not apply (see "Which kind to build").
legacy where check_capabilities said aiAgents is unavailable)
— Returns: agent, flow, endpoint, endpointUrl
— The default LLM is automatically assigned to the agent's job node. If llmStatus is "configured", no extra step is needed.
— error: "use_manage_agent" means nothing was created: this environment builds AI Agents — go to Path A unless the user asked for a legacy agent.Important: before creating a new tool, inspect the existing agent flow/tools first and make sure you are not reusing an existing toolId. Tool IDs must be unique within an agent flow.
update_ai_agent updates two layers: the AI Agent resource and the AI Agent Job Node.
| Field | Purpose | Example |
|---|---|---|
| name | Agent display name | "Acme Support Bot" |
| description | Agent persona — defines who the agent is, its personality, tone, and high-level behavior. This is the primary field for shaping agent identity. | "You are a friendly customer support agent for Acme Corp. You speak in a professional yet warm tone..." |
| instructions | Agent instructions — high-level guidance and constraints (up to 1000 chars). Use for guardrails and policies that apply regardless of the job. | "Never share internal pricing. Always verify customer identity before account changes." |
| Field | Purpose | Example |
|---|---|---|
| jobName | Job title — the role the agent is performing | "Customer Support Specialist" |
| jobDescription | Job description — detailed description of responsibilities, scope, and expertise areas for this job | "Handle customer inquiries about orders, returns, and product information. Escalate billing disputes to human agents." |
| jobInstructions | Job instructions — specific behavioral rules, step-by-step procedures, and output format requirements for the job | "1. Greet the customer. 2. Ask for their order number. 3. Look up the order using the search tool..." |
| llmProviderReferenceId | Which LLM the agent uses (from setup_llm or list_resources { resourceType: "llm_model" }) | "abc-123-def-456" |
| temperature | LLM temperature (0-1). Lower = more deterministic, higher = more creative. Default: 0.7 | 0.3 |
| maxTokens | Max tokens for LLM response (100-8000). Default: 4000 | 2000 |
update_ai_agent {
aiAgentId: "...",
name: "Acme Support Bot",
description: "You are a friendly and professional customer support agent for Acme Corp. You help customers with orders, returns, and product questions. You maintain a warm but efficient tone.",
instructions: "Never share internal pricing or competitor comparisons. Always verify identity before account changes.",
jobConfig: {
jobName: "Customer Support Specialist",
jobDescription: "Handle customer inquiries about orders, returns, shipping, and product information. You have access to the order database and knowledge base.",
jobInstructions: "1. Greet the customer warmly. 2. Identify their issue. 3. Use the search tool to look up relevant information. 4. Provide a clear answer. 5. Ask if there is anything else you can help with.",
temperature: 0.3,
maxTokens: 2000
}
}
Always use ALL relevant fields when configuring an agent. Do not put everything in description alone — distribute the configuration across the appropriate fields for best results.
Use the LLM Prompt node only when the user asks for it by name, e.g. "create an agent using an LLM Prompt node." Otherwise, build agents as described above.
When (and only when) the user explicitly asked for it:
create_ai_agent { name, agentNodeType: "llmPrompt", systemPrompt: "..." } — provisions project + flow + LLM Prompt node + REST endpoint. There is NO agent resource in this mode.systemPrompt is the full persona, job, and guardrail definition.manage_flow_nodes { operation: "update", flowId, nodeId, config: { prompt } } — NOT update_ai_agent (there is no agent to update).create_tool { flowId, ... } (only tool/mcp/http types). Test with talk_to_agent { endpointUrl }.toolId values can cause empty or failed responses. Check the flow/tools before assuming the problem is the LLM or connection.error: "backup_not_offered" without changing anything. Ask the user whether they want a backup, then call manage_snapshots { operation: "create", projectId, label } or { operation: "decline", projectId }, then retry the held call — see the snapshot-backups skill. This applies to manage_agent and manage_agent_components changes too, but NOT to an agent you created in this same session, so the build flow above is unaffected.testMode and the regular endpointUrl. It never falls back to a billable send on its own. If a send fails, read _hints and check whether the message was processed before re-sending it (see the troubleshooting skill). Cognigy documents a fair-use limit of 600 test messages per hour (scope unspecified).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cognigy/cognigy-plugin --plugin cognigy18 skills in this plugin
/a2a-setupUse when the user explicitly asks for A2A (Agent2Agent), wants an agent to call an external / third-party A2A agent or one in another project or tenant, or wants to expose a Cognigy agent to outside A2A callers. Covers the manage_a2a_server endpoint and the create_tool { toolType: 'a2a' } tool type. NOT for connecting agents that live in the same project — those use the native Handover to AI Agent tool./agent-red-teamUse when the user wants to red-team, adversarially test, jailbreak-test, or probe the guardrails of a Cognigy AI Agent — covers scoping consent, deriving the agent's policy surface from its config, generating targeted probes, scoring verdicts, and producing a standardised findings report./docs-lookupUse when the user asks how a Cognigy.AI feature, node, endpoint, setting, or concept works, asks for Cognigy documentation, best practices, or release/version behavior, or when you are unsure of platform behavior or valid configuration values and need to consult the official docs before answering or building./environmentsUse when Cognigy tools ask for an "environment", when the user works with several Cognigy environments or tenants (trial, a customer tenant), wants to compare or copy something between environments, or asks how to add another Cognigy environment./flow-nodesUse when adding, editing or debugging custom logic inside a Cognigy tool branch with manage_flow_nodes (code, HTTP Request, if/else and other nodes), or when rendering/visualizing a flow as a diagram — supported node types, config schemas, placement rules, the tool-first workflow, and the render operation./knowledge-setupUse when the user wants to add knowledge, RAG, or a knowledge store/source to a Cognigy agent — covers embedding vs Knowledge Search models, Knowledge AI settings, ingesting sources, and attaching knowledge as a tool.Other plugins' skills for the same job