Logo: Ai Agent Architectures

Ai Agent Architectures

Communautéit
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/*).

Iwwersiicht

Editeurj4flmao
Repositoryagent-skills
Skill-Nummai-agent-architectures
Stären
41
Forks
6
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    j4flmao huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Ai Agent Architectures an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ai Agent Architectures an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Ai Agent Architectures automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ai Agent Architectures net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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/.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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/*).

Firwat Ai Agent Architectures op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ai Agent Architectures besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Ai Agent Architectures an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Ai Agent Architectures benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Ai Agent Architectures benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ai Agent Architectures domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Ai Agent Architectures gratis?

Jo. j4flmao huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇