Logo di Ai Agent Architectures

Ai Agent Architectures

Community
j4flmao
ai-agent-architectures

Use this skill when the user says 'build an AI agent', 'agent architecture', 'design an autonomous agent', 'agent system prompt', 'agent with tools and memory', 'which agent framework'. Entry point for single-agent design: decomposes the request into loop, tools, memory, planning, and evaluation, then routes depth to the child skills. Do NOT use for: workflow pattern selection (ai/agentic-workflows), multi-agent orchestration (ai/multi-agent-systems), or harness concerns like sandboxing and tracing (harness-engineering/*).

Panoramica

Pubblicato daj4flmao
Repositoryagent-skills
Nome della skillai-agent-architectures
Stelle
41
Fork
6
File inclusi
1
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: 1

    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 j4flmao su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Ai Agent Architectures 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/j4flmao/agent-skills/tree/main/skills/ai/ai-agents
  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/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/ai/ai-agents .claude/skills/ai-agent-architectures
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Ai Agent Architectures 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 Ai Agent Architectures 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 Ai Agent Architectures 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à.

AI Agent Architectures

Purpose

Design a single LLM agent end to end: the control loop, the tool surface, memory, planning strategy, guardrails, and how it is evaluated. This parent skill makes the top-level decisions and hands detail to its children: core-architectures (loop mechanics), tool-calling-principles (tool contracts), memory-systems (state and recall), and multi-agent-topology (when one agent is not enough).

Agent Protocol

Trigger

"build an agent", "agent architecture", "autonomous agent", "agent design review", "agent framework choice", "agent system prompt".

Input Context

  • Task domain, success criteria, and expected task length (steps, minutes).
  • Tools/APIs available and their side effects.
  • Model/provider constraints, latency and cost budget.
  • Data the agent must remember across turns or sessions.
  • Risk profile: what is the worst action the agent could take?

Output Artifact

Architecture brief: component table, loop diagram (Mermaid sequence), tool list with schemas, memory plan, guardrails, eval plan.

Response Format

Loop: {react|plan-execute|workflow}  Model: {tier}  Max steps: {n}
Tools ({count}; split past ~10-15 or on eval evidence): {name: side-effect level}
Memory: working={strategy} | long-term={store} | episodic={yes/no}
Guardrails: {input, output, action approvals}
Eval: {dataset, metric, pass threshold}
Children to consult: {skill paths}

Completion Criteria

  • Each component (loop, tools, memory, planning, guardrails, eval) has an explicit decision.
  • Small, cohesive toolset per agent; split only when evals show tool or domain confusion (repo heuristic: ~10-15 tools).
  • Destructive tools have human approval or dry-run.
  • Eval dataset exists before prompt iteration starts.

Component Map

ComponentDecisionDefaultChild skill
Control loopReAct vs plan-and-execute vs fixed workflowFixed workflow if steps knowncore-architectures, ../agentic-workflows
ToolsGranularity, schemas, error contractFew coarse tools with strict schemastool-calling-principles
Working memoryWhat stays in contextSystem prompt + plan + recent turnsmemory-systems
Long-term memoryRetrieval store, write policyExplicit "remember" writes, hybrid retrievalmemory-systems
PlanningExplicit plan object or implicitExplicit plan for > ~5 stepsreferences/planning-strategies.md
GuardrailsInput/output filters, approvalsApproval on irreversible actions../../harness-engineering/sandbox-execution
ObservabilityTraces, costOne span per LLM/tool call../../harness-engineering/agent-observability

Minimal Agent Loop (Anthropic Messages API)

python
from __future__ import annotations

import json
import os

import anthropic

client = anthropic.Anthropic()          # reads ANTHROPIC_API_KEY
MODEL = os.environ["AGENT_MODEL"]        # pin the model id in config, not in code
MAX_STEPS = 12

TOOLS = [{
    "name": "search_orders",
    "description": "Look up orders by customer email. Read-only. Returns at most 20 orders.",
    "input_schema": {
        "type": "object",
        "properties": {"email": {"type": "string", "format": "email"}},
        "required": ["email"],
    },
}]


def run_tool(name: str, args: dict) -> str:
    if name == "search_orders":
        return json.dumps(search_orders(args["email"]))   # your implementation
    raise ValueError(f"unknown tool {name}")


def run_agent(user_msg: str) -> str:
    messages = [{"role": "user", "content": user_msg}]
    for _ in range(MAX_STEPS):
        resp = client.messages.create(
            model=MODEL, max_tokens=2048, system=SYSTEM_PROMPT, tools=TOOLS, messages=messages
        )
        messages.append({"role": "assistant", "content": resp.content})
        if resp.stop_reason != "tool_use":
            return "".join(b.text for b in resp.content if b.type == "text")
        results = []
        for block in resp.content:
            if block.type != "tool_use":
                continue
            try:
                out, is_error = run_tool(block.name, block.input), False
            except Exception as exc:  # report to the model so it can recover
                out, is_error = f"{type(exc).__name__}: {exc}", True
            results.append({"type": "tool_result", "tool_use_id": block.id,
                            "content": out, "is_error": is_error})
        messages.append({"role": "user", "content": results})
    raise RuntimeError(f"agent exceeded {MAX_STEPS} steps without finishing")

The OpenAI-style equivalent uses tools=[{"type": "function", "function": {...}}] and returns tool_calls on the assistant message; answers go back as role: "tool" messages with tool_call_id.

System Prompt Skeleton

Role and goal: one paragraph, the outcome not the persona.
Constraints: what must never happen; which actions need confirmation.
Tools: when to use each (descriptions live in schemas; keep this short).
Process: plan first for multi-step tasks; verify results before answering.
Output: exact format of the final answer.
Stop condition: when to finish or ask the user.

Framework Choice

NeedOption
Full control, few toolsProvider SDK + your own loop (above)
Graph state, checkpoints, HITLLangGraph
Agent features with managed tool loopProvider agent SDKs (OpenAI Agents SDK, Claude Agent SDK)
Tool interoperability across hostsExpose tools via MCP servers

Frameworks change quickly; check the current docs before committing, and keep business logic out of framework-specific classes so you can switch.

Anti-Patterns

  • God agent: dozens of overlapping tools in one prompt; tool selection accuracy drops. Split by responsibility once evals show confusion.
  • Prompt-only safety: "never delete files" in the prompt with a delete tool exposed. Remove the capability or gate it.
  • Silent tool failures: returning empty strings on error; the model invents results. Return structured errors with is_error.
  • No step cap: runaway loops and bills.
  • Vibes-based iteration: tweaking prompts without a fixed eval set.

Checklist

  • Loop type chosen; step cap and timeout set.
  • Cohesive, non-overlapping tools, each with strict JSON Schema and failure semantics.
  • Memory plan: what is in context, what is retrieved, what is written and when.
  • Approval gates on state-changing tools.
  • Tracing and cost tracking from day one.
  • Eval set with task success metric and regression gate.

References

  • Planning Strategies — CoT, ToT, Plan-and-Solve, LLMCompiler.
  • Child skills: core-architectures/, tool-calling-principles/, memory-systems/, multi-agent-topology/.

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 Ai Agent Architectures?

Use this skill when the user says 'build an AI agent', 'agent architecture', 'design an autonomous agent', 'agent system prompt', 'agent with tools and memory', 'which agent framework'. Entry point for single-agent design: decomposes the request into loop, tools, memory, planning, and evaluation, then routes depth to the child skills. Do NOT use for: workflow pattern selection (ai/agentic-workflows), multi-agent orchestration (ai/multi-agent-systems), or harness concerns like sandboxing and tracing (harness-engineering/*).

Perché usare Ai Agent Architectures su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Ai Agent Architectures è 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 Ai Agent Architectures in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents. 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 Ai Agent Architectures?

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 Ai Agent Architectures?

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

La skill IA Ai Agent Architectures è gratuita?

Sì. È pubblicata su GitHub da j4flmao 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 👇