Ai Agent Architectures logo

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

Overview

Publisherj4flmao
Repositoryagent-skills
Skill nameai-agent-architectures
Stars
41
Forks
6
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by j4flmao on GitHub. Read the source before you install it.

Installation

Install the Ai Agent Architectures AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ai Agent Architectures in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ai Agent Architectures on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ai Agent Architectures is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ai Agent Architectures AI skill do?

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

Why use Ai Agent Architectures on TypingMind?

Because you install it once and use it with any model. Ai Agent Architectures is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ai Agent Architectures in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/j4flmao/agent-skills/tree/main/skills/ai/ai-agents. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ai Agent Architectures?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ai Agent Architectures?

As many as you like. As long as a model supports skills, you can use Ai Agent Architectures with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ai Agent Architectures AI skill free?

Yes. It is published on GitHub by j4flmao under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇