Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugin/skills/agent-creation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ update_ai_agent {

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.

## LLM Prompt node — explicit request ONLY

The AI Agent node is ALWAYS how agents are built. Cognigy also has an **LLM Prompt** node (a raw LLM call with a freeform system prompt), and the plugin supports it — but ONLY when the user explicitly asks for it by name, e.g. "create an agent using an LLM Prompt node". NEVER offer it, never fall back to it when something fails, and never ask the user to choose between the two.

When (and only when) the user explicitly asked for it:

- New agent: `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 completely freeform and is the entire behavior definition — persona, job, AND guardrails all live in that one prompt, so write constraints into it explicitly.
- Iterate with `manage_flow_nodes { operation: "update", flowId, nodeId, config: { prompt } }` — NOT update_ai_agent (there is no agent to update).
- Tools: `create_tool { flowId, ... }` (only tool/mcp/http types). Test with `talk_to_agent { endpointUrl }`.

## Key facts

- create_ai_agent auto-provisions: flow, AI Agent Job Node, REST endpoint
Expand Down
55 changes: 55 additions & 0 deletions plugin/skills/flow-nodes/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Use `manage_flow_nodes` to add logic nodes **inside tool branches only**. Nodes

**Voice exception — Set Session Config:** The one node that _should_ run before the AI Agent node is a `setSessionConfig` (Set Session Config) node, and only in **voice** flows. It applies per-session speech settings (barge-in, ASR, STT/TTS, input timeouts) and must be the **first** node. The `audit_voice_agent` tool checks for this and can create it by `prepend`ing before the AI Agent node. Do not add any other pre-agent nodes.

**LLM Prompt exception — explicit request only:** The `llmPrompt` node (`llmPromptV2` — a raw LLM call driven by a freeform system prompt) is the one node type that legitimately lives at the **top level** of a flow, in flows that have **no AI Agent node at all**. It is supported ONLY when the user **explicitly asks for an LLM Prompt node by name**. NEVER offer it, never use it as a fallback for the AI Agent node, and never ask the user to choose between the two — the AI Agent node (via `create_ai_agent`) is always the default for anything agent-shaped. Reading and updating llmPromptV2 nodes that already exist in a flow is always fine. See the [LLM Prompt section](#llmprompt--llm-prompt-explicit-request-only) for config.

## Quick Start (tool-first workflow)

```
Expand Down Expand Up @@ -311,6 +313,59 @@ Call an external API.

---

### llmPrompt — LLM Prompt (explicit request ONLY)

Category: service

A raw LLM call driven by a **freeform system prompt** (`config.prompt`). Supports tools, streaming/storage options, image handling, and custom model options.

**STEERING — read first:**

- Create this node ONLY when the user explicitly asked for an "LLM Prompt" node. The AI Agent node is ALWAYS the default for agents — never offer llmPrompt as an alternative, never fall back to it, never ask the user to choose.
- For a **new** agent built on an LLM Prompt node ("create an agent using an LLM Prompt node"), use `create_ai_agent { agentNodeType: "llmPrompt", systemPrompt }` — it provisions project + flow + node + endpoint in one call. Use `manage_flow_nodes create` only to add an llmPrompt node to an **existing** flow.
- Unlike every other node in this guide, llmPrompt is a **top-level flow node** (placed after `start` via `mode: "append"`), not a tool-branch helper. A flow can be driven entirely by it, with no aiAgentJob node.
- `prompt` is a fully freeform system prompt — there are no separate persona/guardrail fields like the AI Agent node has. All behavior AND all guardrails must live in the prompt text itself, so treat it with care: include explicit constraints (what the agent must never do) directly in the prompt.
- The backend auto-creates a `llmPromptDefault` branch (not deletable) and a placeholder tool under every new llmPromptV2 node; the plugin removes the placeholder tool automatically.
- Flows driven by an LLM Prompt node have **no agent resource**: `update_ai_agent` does not apply (update the prompt via `manage_flow_nodes update`), and tools are addressed with `create_tool { flowId }` / `update_tool { flowId }` / `list_resources { resourceType: "tool", flowId }` instead of aiAgentId. Only `tool`, `mcp`, and `http` tool types work under it (no knowledge/send_email).

**Config (key fields — `get` the node for the full set):**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| prompt | string | Yes | Freeform system prompt. Supports CognigyScript and the `@cognigyRecentConversation` / `@cognigyRecentUserInputs` transcript tags (optionally with a turn limit, e.g. `@cognigyRecentConversation:3`) |
| llmProviderReferenceId | string | No | LLM referenceId, or `"default"` for the project's Generative AI default |
| storeLocation | string | No | `stream` (stream to output), `input`, or `context` |
| immediateOutput | boolean | No | Output the result immediately (with `storeLocation: "stream"`) |
| inputKey / contextKey | string | No | Where to store the result for `input`/`context` storage (default `promptResult`) |
| chatTranscriptSteps | number | No | Previous conversation turns included in the request (default 50) |
| usePromptMode | boolean | No | Single-prompt mode — no conversation context; prompt must be non-empty |
| temperature / topP / maxTokens / frequencyPenalty / presencePenalty / seed | number | No | Sampling controls (samplingMethod picks `temperature` vs `topP`) |
| responseFormat | string | No | `default`, `text`, or `json` |
| toolChoice | string | No | `auto`, `required`, or `none` — how tools are selected |
| useStrict | boolean | No | Strict mode for tool argument schemas |
| processImages / transcriptImageHandling | boolean / string | No | Image attachment handling (`minify`, `drop`, `keep`) |
| customModelOptions / customRequestOptions | object | No | Provider-specific overrides (e.g. `{ "model": "..." }`, `{ "stream": true }`) |
| errorHandling / errorMessage / logErrorToSystem | string / string / boolean | No | `continue` (default), `stop`, or go-to error handling |

**Example (only after an explicit user request):**

```json
{
"operation": "create",
"flowId": "<flowId>",
"nodeType": "llmPrompt",
"label": "Summarize Conversation",
"parentNodeId": "<startNodeId or preceding top-level node>",
"mode": "append",
"config": {
"prompt": "A user talked to a chatbot:\n@cognigyRecentConversation\n\nSummarize the conversation in two sentences.",
"storeLocation": "context",
"contextKey": "summary"
}
}
```

---

## Branching nodes

`ifThenElse` and `lookup` nodes auto-create child branch nodes when created:
Expand Down
13 changes: 13 additions & 0 deletions plugin/skills/tools-setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,19 @@ If the tool was originally created without `preProcessCode` / `postProcessCode`,
- Tool IDs come from create_tool response or list_resources
- Tool IDs must be unique within an agent flow. If a tool already exists for an action, reuse it.

## Tools under an LLM Prompt node (flowId addressing)

Flows driven by an LLM Prompt (`llmPromptV2`) node instead of an AI Agent node have **no agent resource**, so there is no aiAgentId. For those flows — and only those — address tools by flow:

- Create: create_tool { flowId, toolType, name, config }
- List: list_resources { resourceType: "tool", flowId }
- Update: update_tool { flowId, toolNodeId, ... }
- Remove: delete_resource { resourceType: "tool", id: toolId, flowId }

Tools attach to the flow's aiAgentJob node when one exists, otherwise to its llmPromptV2 node. Under an LLM Prompt node only `tool`, `mcp`, and `http` types are supported (no knowledge/send_email — those descriptors don't exist there). Everything else works the same: the same tool branch, the same Resolve Tool Action node, the same `input.aiAgent.toolArgs` parameter access, and the same manage_flow_nodes workflow for logic inside the branch.

Reminder: the LLM Prompt node itself is created only on explicit user request — see the flow-nodes guide. This section is about working with tools once such a flow exists.

## Prerequisites

- Agent MUST be created via create_ai_agent (not manually) — tools need the auto-provisioned flow
Expand Down
6 changes: 6 additions & 0 deletions plugin/skills/troubleshooting/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ description: "Use when a Cognigy agent returns empty responses, a tool call or c
3. Check agent description is not empty: get_resource { resourceType: "agent", id }
4. Check endpoint is connected: get_resource { resourceType: "endpoint", id }
Verify flowId is set and URLToken exists
5. Endpoint JUST created (seconds ago)? Endpoint config propagates briefly, and a
session whose FIRST message hit the stale config stays cached as broken — wait a
few seconds and retry with a NEW sessionId, not the same one.
6. LLM Prompt flows: the assigned LLM must have a connection (`connectionId` set on
the llm_model). A connectionless LLM fails silently — the node's default error
handling is "continue" with an empty message, which looks like an empty response.

## create_ai_agent failed

Expand Down
Loading
Loading