Logo di Self Improving Agent

Self Improving Agent

Community
zhaono1
self-improving-agent

Usalo quando un errore, una correzione dell’utente, un problema ricorrente nel flusso di lavoro o un successo verificato fa emergere una lezione riutilizzabile. Raccoglie candidati circoscritti e anonimizzati, esegue test di comportamento eseguibili e separa la convalida dall’applicazione nelle indicazioni permanenti.

Add to TypingMind

Panoramica

Pubblicato dazhaono1
Repositoryagent-playbook
Nome della skillself-improving-agent
Stelle
79
Fork
12
File inclusi
4
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 4

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da zhaono1 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Self Improving Agent in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/zhaono1/agent-playbook/tree/main/skills/self-improving-agent
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zhaono1/agent-playbook.git /tmp/agent-playbook
mkdir -p .claude/skills
cp -r /tmp/agent-playbook/skills/self-improving-agent .claude/skills/self-improving-agent
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Self Improving Agent in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Self Improving Agent non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Self Improving Agent non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Self-Improving Agent

Turn evidence from completed work into a small, auditable behavior change. The default result is a candidate or no change—not an automatic rewrite of skills.

Use This Skill When

  • A tool or workflow failed in a way that may recur.
  • The user corrected an assumption, requirement, or operating rule.
  • The same workaround appeared more than once.
  • A focused test proved a better reusable method.
  • The user asks to review or consolidate learning candidates.

Do not use it for routine session summaries, raw transcript storage, speculative ideas without evidence, or project facts that belong in project documentation.

Required Outcome

Every run ends in exactly one state:

  1. candidate: reusable but not yet validated.
  2. validated: representative evidence supports the lesson, but no owner change is claimed yet.
  3. applied: the validated lesson was installed in one named durable owner with a change reference.
  4. rejected: disproved, unsafe, too specific, or obsolete.
  5. superseded or rolled_back: an applied/validated lesson was replaced or reverted.
  6. no-delta: no reusable behavior change was found.
  7. open-question: evidence is insufficient and the missing proof is named.

An artifact is not proof of improvement. An applied lesson must change future behavior and have a representative check that demonstrates the change.

Start Packet

Before editing durable guidance, state:

  • Future behavior: what the agent should do differently next time.
  • Representative task: one concrete scenario that should now succeed.
  • Evidence: current source, failure output, user correction, or focused test.
  • Owner: the one skill, instruction file, script, or runtime component that owns it.
  • Write boundary: files allowed to change and information that must remain local.
  • Proof: the command, eval, or review that confirms the new behavior.

If any item is unknown, capture a candidate and stop before validation or application.

Lifecycle

1. Capture the Signal

Prefer facts over interpretation. Record only the minimum reusable summary; do not copy transcripts, tool inputs, credentials, private paths, or customer data.

Claude Code failure hooks explicitly enabled with apb init --hooks can call:

bash
agent-playbook self-improve

Manual corrections or successes use an explicit summary and evidence label:

bash
apb self-improve capture \
  --kind correction \
  --summary "Verify the current source before relying on cached state" \
  --evidence "focused-test"

The CLI stores redacted events and deduplicated candidates under ~/.agent-playbook/self-improvement/. Override the root with AGENT_PLAYBOOK_DATA_DIR or --data-dir.

2. Assess Reusability

Keep a candidate only when all are true:

  • It describes future behavior, not just what happened.
  • It is useful beyond one private task or repository.
  • It does not conflict with a current authoritative source.
  • A narrow owner and a realistic validation path exist.

Use apb behavior inbox to inspect the prioritized queue. Repeated evidence increases occurrence count; it does not automatically increase truth. Use apb behavior owners <candidate-id> --repo . for local suggestions, but treat every result as a review candidate rather than an ownership decision.

3. Validate

Choose the smallest proof that can falsify the candidate, encode it as an executable artifact, and run it with apb self-improve eval. See references/eval-artifact.md for the schema and safety boundary.

CandidateMinimum proof
Prompt or workflow ruleRepresentative prompt plus rubric
CLI/runtime behaviorFocused automated test
External integrationLive capability check against current docs/runtime
Safety ruleNegative test showing the unsafe path is blocked
Repeated heuristicMultiple independent episodes or explicit human confirmation

Separate facts, hypotheses, and missing evidence. Structural validation alone does not prove that guidance is semantically current or executable by the host.

4. Validate, Apply, or Reject

Run the artifact first. A baseline scenario is recommended when the previous behavior can be reproduced safely; at least one candidate scenario is required:

bash
apb self-improve eval cand-123 --artifact behavior-eval.json

apb self-improve review cand-123 \
  --decision validate \
  --reason "baseline reproduced and candidate scenarios passed" \
  --eval-result /path/printed/by/the/eval/command.json

Validation accepts only a passing CLI-generated eval result for the same candidate. It does not claim runtime behavior changed.

Generate a local Behavior Change Proposal before editing the owner:

bash
apb behavior proposal cand-123 \
  --owner "skill:self-improving-agent" \
  --output behavior-proposal.md

The proposal contains the behavior diff intent, eval proof, acceptance criteria, privacy boundary, and rollback plan. It does not edit the owner or create a remote pull request.

After changing exactly one durable owner, record the application separately:

bash
apb self-improve review cand-123 \
  --decision apply \
  --reason "installed after the focused test passed" \
  --owner "skill:self-improving-agent" \
  --change-ref "commit:abc123"

Other decisions:

bash
apb self-improve review cand-123 --decision observe --reason "needs a second episode"
apb self-improve review cand-123 --decision reject --reason "project-specific exception"

Apply into the narrowest owner:

  1. Executable test, script, or validator when behavior can be enforced.
  2. The owning skill or its reference when agent judgment is required.
  3. Project instructions only for project-wide constraints.
  4. A knowledge notebook for durable facts that should be retrieved, not always loaded.

Never silently modify repository rules, publish packages, or trigger external actions as a side effect of capture.

5. Prove the Loop

Run the representative task after application. Report:

  • candidate id and final state;
  • evidence used and what remains uncertain;
  • durable owner changed;
  • executable eval result and artifact hash;
  • rollback path.

If the new rule does not change the representative behavior, revert or reject it.

Knowledge Export

Export applied rules and open candidates as Markdown for Obsidian or another local knowledge system:

bash
apb self-improve export --output /path/to/vault/Agent/Learning.md

The export is a sink, not the source of truth. Candidate and active-rule state remain structured and auditable in the CLI data directory.

Host Boundary

Skills describe judgment; host adapters provide events and actions. Check the current host before claiming support:

  • Claude Code: deterministic failure hook installed only by explicit apb init --hooks.
  • Codex, Gemini, DeepSeek Harness: skill distribution is supported; learning event wiring depends on each host's current extension API.
  • Unsupported hooks must remain manual or adapter-specific, never simulated by undocumented behavior.

Use apb conformance to inspect local-static contracts. A proven distribution or hook configuration does not prove host discovery or runtime invocation; those remain unverified until an observed host run supplies bounded evidence.

See references/learning-lifecycle.md for schemas and adapter contracts. Use evals/cases.json with evals/rubric.md when changing this skill.

Done Checklist

  • Candidate/no-delta decision is explicit.
  • Stored text is minimal, redacted, and portable.
  • Current authoritative sources were checked when relevant.
  • Validation uses a passing executable eval result for the same candidate.
  • Application names one durable owner and a concrete change reference.
  • Representative behavior was tested after application.
  • No private project detail entered public skill assets.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Self Improving Agent?

Usalo quando un errore, una correzione dell’utente, un problema ricorrente nel flusso di lavoro o un successo verificato fa emergere una lezione riutilizzabile. Raccoglie candidati circoscritti e anonimizzati, esegue test di comportamento eseguibili e separa la convalida dall’applicazione nelle indicazioni permanenti.

Perché usare Self Improving Agent su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Self Improving Agent è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Self Improving Agent in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/zhaono1/agent-playbook/tree/main/skills/self-improving-agent. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Self Improving Agent?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Self Improving Agent?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Self Improving Agent: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Self Improving Agent è gratuita?

Sì. È pubblicata su GitHub da zhaono1 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇