Skip to main content

Build self-improving agent skills with cognee

Workflow preview

Workflow preview
100%
Build self-improving agent skills with cognee preview
Open on n8n.io

1. Workflow Overview

Quick overview A self improving loop for agent skills, powered by the cognee Verified Node. When a skill's review scores below your threshold, it proposes a rewrite, and you approve the before/afte...

Best for

  • Engineering automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger, n8n-nodes-base.set, n8n-nodes-cognee.cognee, n8n-nodes-base.if, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Andrej Milicevic.

Original n8n.io source

1.1 Workflow description

Title
Build self-improving agent skills with cognee
Workflow name
Build self-improving agent skills with cognee

Quick overview

A self-improving loop for agent skills, powered by the cognee Verified Node. When a skill's review scores below your threshold, it proposes a rewrite, and you approve the before/after diff before it's applied. No code required.

How it works

  1. Execute your workflow.
  2. Set the demo inputs (skill name, dataset name, skill procedure markdown, review task text, and the score threshold).
  3. Ingest the skill into cognee.
  4. Cognee reviews the skill’s performance and returns a JSON with a score and gaps.
  5. If the score is below the threshold, the workflow requests a cognee improvement proposal for the skill.
  6. The workflow retrieves the full proposal from cognee and builds a human-readable before/after diff.
  7. If the proposal is approved, the workflow applies the improvement in cognee, fetches the updated skill, and outputs the updated procedure and diff.

Setup

  1. Create a cognee API credential in n8n and use it in all cognee nodes (Ingest Skill, Review Skill, Propose Improvement, Get Proposal, Apply Improvement, Get Skill). Information for the credential (URL and API key) can be found in your Cognee Cloud account.
  2. Update the skill parameters (skill_name, dataset_name, skill_markdown, task_text, score_threshold, and approved) to match your use case.
  3. Ensure the referenced cognee dataset name exists so the skill can be stored and retrieved consistently.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Initiate Manually

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 9 - Set Skill Parameters

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Ingest Skill Data

Type / Role
n8n-nodes-cognee.cognee - cognee
Config choices
Version 1

Block 11 - Review Skill Data

Type / Role
n8n-nodes-cognee.cognee - cognee
Config choices
Version 1

Block 12 - Evaluate Skill Improvement

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 13 - Generate Improvement Proposal

Type / Role
n8n-nodes-cognee.cognee - cognee
Config choices
Version 1

Block 14 - Extract Proposal Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Retrieve Improvement Proposal

Type / Role
n8n-nodes-cognee.cognee - cognee
Config choices
Version 1

Block 16 - Compile Review Packet

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Check Approval Status

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Implement Skill Enhancement

Type / Role
n8n-nodes-cognee.cognee - cognee
Config choices
Version 1

Block 19 - Retrieve Updated Skill

Type / Role
n8n-nodes-cognee.cognee - cognee
Config choices
Version 1

Block 20 - Display Skill Changes

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Hold for Review Status

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - Confirm No Improvement Needed

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

3. Summary Table

Workflow Build self-improving agent skills with cognee
Complexity advanced
Nodes 22
Categories Engineering, AI Summarization
Author Andrej Milicevic
Published 24 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16609/16609.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build self-improving agent skills with cognee do?

Quick overview A self improving loop for agent skills, powered by the cognee Verified Node. When a skill's review scores below your threshold, it proposes a rewrite, and you approve the before/afte...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI Summarization use case.