Ai Agent Architecturesのロゴ

Ai Agent Architectures

コミュニティ
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/*).

概要

公開者j4flmao
リポジトリagent-skills
スキル名ai-agent-architectures
スター
41
フォーク
6
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    j4flmaoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Ai Agent Architectures」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAi Agent Architecturesを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAi Agent Architecturesを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Ai Agent Architecturesは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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/*).

TypingMindでAi Agent Architecturesを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Ai Agent Architecturesはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAi Agent Architecturesをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agentsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Ai Agent Architecturesを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Ai Agent Architecturesで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAi Agent Architecturesを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Ai Agent Architectures」は無料ですか?

はい。j4flmaoがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇