|
2844 | 2844 | "Routing-decision count — facts ambiguous between self and world that required deliberate routing" |
2845 | 2845 | ], |
2846 | 2846 | "last_updated": "2026-05-22" |
| 2847 | + }, |
| 2848 | + { |
| 2849 | + "id": "reflexive-metacognitive-agent", |
| 2850 | + "name": "Reflexive Metacognitive Agent", |
| 2851 | + "aliases": [ |
| 2852 | + "Self-Model Agent", |
| 2853 | + "Capability-Aware Agent" |
| 2854 | + ], |
| 2855 | + "category": "cognition-introspection", |
| 2856 | + "intent": "Agent maintains an explicit self-model of its own capabilities, confidence and limitations, and reasons over that model when accepting / refusing / handing off tasks.", |
| 2857 | + "context": "A team has an agent. The default agent accepts whatever task it is given and proceeds. There is no explicit self-model — the agent does not represent 'what I am good at' or 'what I should refuse'.", |
| 2858 | + "problem": "Without an explicit self-model, the agent has no principled way to refuse tasks outside its competence or hand off to a more suitable peer. Refusals are ad-hoc, based on prompt-level instructions that are inconsistent across calls. Differs from confidence-reporting (which is per-output) by making the self-model an *input* to decision-making, not just an output.", |
| 2859 | + "forces": [ |
| 2860 | + "Maintaining an explicit self-model requires upfront capability characterization.", |
| 2861 | + "Self-model drift — the agent's actual capabilities change with model updates.", |
| 2862 | + "Reasoning over a self-model adds a step to every decision." |
| 2863 | + ], |
| 2864 | + "therefore": "Therefore: the agent carries an explicit, structured self-model (capabilities, confidence calibrations, declared limitations); decision logic reasons over the self-model before accepting a task — accept, refuse, or hand off.", |
| 2865 | + "solution": "Self-model is a structured artifact: {capabilities: [...], confidence-by-task-class: {...}, declared-limitations: [...]}. At task acceptance, agent reasons over self-model: does this task fall in my capabilities? what's my confidence for this class? are any declared limitations triggered? Output: accept / refuse-with-reason / handoff-to-peer-with-capability-X. Self-model refreshed periodically against eval-suite results. Pair with confidence-reporting, decentralized-swarm-handoff, refusal, typed-refusal-codes.", |
| 2866 | + "consequences": { |
| 2867 | + "benefits": [ |
| 2868 | + "Principled refusals and handoffs based on declared self-model.", |
| 2869 | + "Self-model as a versionable artifact, not implicit prompt behavior.", |
| 2870 | + "Eval-driven self-model updates — agent's known capabilities track measured reality." |
| 2871 | + ], |
| 2872 | + "liabilities": [ |
| 2873 | + "Upfront capability characterization is work.", |
| 2874 | + "Self-model drift if not refreshed against evals.", |
| 2875 | + "Reasoning over self-model adds a step to every task-acceptance." |
| 2876 | + ] |
| 2877 | + }, |
| 2878 | + "constrains": "The agent does not accept tasks without consulting its self-model; the self-model is an explicit artifact, not implicit prompt behavior.", |
| 2879 | + "known_uses": [ |
| 2880 | + { |
| 2881 | + "system": "Joakim Vivas: 17 Patrones de Arquitecturas Agénticas de IA (Reflexive Metacognitive)", |
| 2882 | + "status": "available", |
| 2883 | + "url": "https://www.joakimvivas.com/tech/17-patrones-arquitecturas-agenticas-ia/" |
| 2884 | + } |
| 2885 | + ], |
| 2886 | + "related": [ |
| 2887 | + { |
| 2888 | + "pattern": "confidence-reporting", |
| 2889 | + "relation": "complements" |
| 2890 | + }, |
| 2891 | + { |
| 2892 | + "pattern": "decentralized-swarm-handoff", |
| 2893 | + "relation": "complements" |
| 2894 | + }, |
| 2895 | + { |
| 2896 | + "pattern": "refusal", |
| 2897 | + "relation": "complements" |
| 2898 | + }, |
| 2899 | + { |
| 2900 | + "pattern": "typed-refusal-codes", |
| 2901 | + "relation": "complements" |
| 2902 | + }, |
| 2903 | + { |
| 2904 | + "pattern": "awareness", |
| 2905 | + "relation": "specialises" |
| 2906 | + } |
| 2907 | + ], |
| 2908 | + "references": [ |
| 2909 | + { |
| 2910 | + "type": "blog", |
| 2911 | + "title": "17 Patrones de Arquitecturas Agénticas de IA", |
| 2912 | + "year": 2026, |
| 2913 | + "url": "https://www.joakimvivas.com/tech/17-patrones-arquitecturas-agenticas-ia/" |
| 2914 | + } |
| 2915 | + ], |
| 2916 | + "status_in_practice": "experimental", |
| 2917 | + "tags": [ |
| 2918 | + "cognition", |
| 2919 | + "metacognition", |
| 2920 | + "self-model", |
| 2921 | + "refusal" |
| 2922 | + ], |
| 2923 | + "example_scenario": "A research agent's self-model: {capabilities: [literature-search, summarization], confidence: {medical-research: 0.6, legal-research: 0.3}, limitations: [no-citation-verification]}. Asked a legal-research question, the agent consults self-model, sees 0.3 confidence, refuses-with-reason and hands off to a legal-specialist peer. Without self-model, the agent would have attempted and produced low-quality output.", |
| 2924 | + "applicability": { |
| 2925 | + "use_when": [ |
| 2926 | + "Agent operates in a domain where competence boundaries are clear.", |
| 2927 | + "Handoff to peer agents is feasible.", |
| 2928 | + "Eval suite can refresh self-model periodically." |
| 2929 | + ], |
| 2930 | + "do_not_use_when": [ |
| 2931 | + "Single general-purpose agent with no peers to hand off to.", |
| 2932 | + "Capability boundaries are not characterizable.", |
| 2933 | + "No eval suite to refresh self-model." |
| 2934 | + ] |
| 2935 | + }, |
| 2936 | + "diagram": { |
| 2937 | + "type": "flow", |
| 2938 | + "mermaid": "flowchart TD\n Task[Incoming task] --> Self[Self-model]\n Self --> Reason[Reason: capability? confidence? limitation?]\n Reason -->|in scope| Acc[Accept]\n Reason -->|out of scope| Ref[Refuse with reason]\n Reason -->|peer better| Hand[Hand off]\n Eval[Eval suite] -.refreshes.-> Self\n" |
| 2939 | + }, |
| 2940 | + "components": [ |
| 2941 | + "Self-model artifact — structured capability/confidence/limitation record", |
| 2942 | + "Self-model reasoner — decides accept/refuse/handoff", |
| 2943 | + "Refusal-with-reason emitter — structured refusal output", |
| 2944 | + "Handoff mechanism — to peer with matching capability", |
| 2945 | + "Self-model refresher — eval-driven updates" |
| 2946 | + ], |
| 2947 | + "last_updated": "2026-05-23" |
| 2948 | + }, |
| 2949 | + { |
| 2950 | + "id": "subject-first-agent-architecture", |
| 2951 | + "name": "Subject-First Agent Architecture (ENA Stateful Core)", |
| 2952 | + "aliases": [ |
| 2953 | + "ENA Stateful Core", |
| 2954 | + "State-First Agent", |
| 2955 | + "Inverted-LLM-Control" |
| 2956 | + ], |
| 2957 | + "category": "cognition-introspection", |
| 2958 | + "intent": "Invert the LLM-centric pipeline: the agent is a stateful subject whose decision logic chooses whether to invoke the LLM at all, treating the model as one tool among many.", |
| 2959 | + "context": "The dominant pattern: LLM at the center, state and tools as periphery — each request flows Context+Prompt → LLM → Action. The Russian Habr 2026 source proposes inverting this: agent state at the center, LLM as a tool the agent decides whether to call.", |
| 2960 | + "problem": "LLM-centric pipelines make every decision stochastic. The agent has no way to 'stay silent' on routine queries where its current state already answers the question. Every request goes through the LLM even when the agent could answer from state. Differs from existing llm-as-periphery by being more specific: the *agent state-first decision logic* is the load-bearing concept.", |
| 2961 | + "forces": [ |
| 2962 | + "LLM-centric pipelines are the SDK default.", |
| 2963 | + "State-first design requires bespoke control logic — not just framework configuration.", |
| 2964 | + "Not invoking the LLM means giving up flexibility on edge cases." |
| 2965 | + ], |
| 2966 | + "therefore": "Therefore: the agent is a stateful subject — a process/class with persistent internal state and decision logic; at each request, the decision logic chooses whether the state suffices to respond, or whether to invoke the LLM (or another tool) for assistance.", |
| 2967 | + "solution": "Implement the agent as a stateful process. Internal state includes goals, history, confidence, conflict signals. Decision logic at each request: (a) does state suffice to respond? if yes, respond from state; (b) is there internal conflict warranting reflection? if yes, run hidden reasoning trace; (c) does the query need external information or generation? if yes, invoke LLM or tool. The LLM is one tool among many, not the central decision-maker. Pair with llm-as-periphery, stateless-reducer-agent, reflexive-metacognitive-agent, awareness.", |
| 2968 | + "consequences": { |
| 2969 | + "benefits": [ |
| 2970 | + "Routine queries answered from state without LLM cost.", |
| 2971 | + "Agent can 'stay silent' or 'think' when state is uncertain.", |
| 2972 | + "LLM stochasticity contained to specific decisions." |
| 2973 | + ], |
| 2974 | + "liabilities": [ |
| 2975 | + "Bespoke control logic — not framework-configurable.", |
| 2976 | + "State design is upfront work.", |
| 2977 | + "Risk of over-trusting state on edge cases the LLM should have caught." |
| 2978 | + ] |
| 2979 | + }, |
| 2980 | + "constrains": "The LLM is invoked only when state-first decision logic decides it is needed; LLM is not the default decision-maker.", |
| 2981 | + "known_uses": [ |
| 2982 | + { |
| 2983 | + "system": "Habr (Russian): Субъектный подход к архитектуре агентов: инверсия управления LLM", |
| 2984 | + "status": "available", |
| 2985 | + "url": "https://habr.com/ru/articles/987518/" |
| 2986 | + } |
| 2987 | + ], |
| 2988 | + "related": [ |
| 2989 | + { |
| 2990 | + "pattern": "llm-as-periphery", |
| 2991 | + "relation": "specialises" |
| 2992 | + }, |
| 2993 | + { |
| 2994 | + "pattern": "stateless-reducer-agent", |
| 2995 | + "relation": "complements" |
| 2996 | + }, |
| 2997 | + { |
| 2998 | + "pattern": "reflexive-metacognitive-agent", |
| 2999 | + "relation": "complements" |
| 3000 | + }, |
| 3001 | + { |
| 3002 | + "pattern": "awareness", |
| 3003 | + "relation": "complements" |
| 3004 | + }, |
| 3005 | + { |
| 3006 | + "pattern": "meditation-mode", |
| 3007 | + "relation": "complements" |
| 3008 | + } |
| 3009 | + ], |
| 3010 | + "references": [ |
| 3011 | + { |
| 3012 | + "type": "blog", |
| 3013 | + "title": "Субъектный подход к архитектуре агентов: инверсия управления LLM", |
| 3014 | + "year": 2026, |
| 3015 | + "url": "https://habr.com/ru/articles/987518/" |
| 3016 | + } |
| 3017 | + ], |
| 3018 | + "status_in_practice": "experimental", |
| 3019 | + "tags": [ |
| 3020 | + "cognition", |
| 3021 | + "architecture", |
| 3022 | + "state-first", |
| 3023 | + "llm-as-tool" |
| 3024 | + ], |
| 3025 | + "example_scenario": "A long-running personal assistant has stateful subject design. User asks 'what's my next meeting?' — decision logic checks state, finds the schedule in memory, responds directly without LLM (free, fast). User asks 'help me draft a follow-up email' — decision logic checks state, finds insufficient context, invokes LLM to draft. The LLM is called only when state is insufficient.", |
| 3026 | + "applicability": { |
| 3027 | + "use_when": [ |
| 3028 | + "Long-running agent where state accumulates meaningfully.", |
| 3029 | + "Routine queries are common and answerable from state.", |
| 3030 | + "Engineering team can build bespoke control logic." |
| 3031 | + ], |
| 3032 | + "do_not_use_when": [ |
| 3033 | + "Short-lived or single-call agents where state never accumulates.", |
| 3034 | + "Every query genuinely requires LLM judgment.", |
| 3035 | + "Team capacity limits bespoke control logic." |
| 3036 | + ] |
| 3037 | + }, |
| 3038 | + "diagram": { |
| 3039 | + "type": "flow", |
| 3040 | + "mermaid": "flowchart TD\n Req[Request] --> Dec[State-first decision logic]\n State[(Agent state)] --> Dec\n Dec -->|state suffices| Resp[Respond from state]\n Dec -->|need reflection| Refl[Hidden reasoning trace]\n Dec -->|need external| LLM[Invoke LLM/tool]\n Refl --> Resp\n LLM --> Resp\n" |
| 3041 | + }, |
| 3042 | + "components": [ |
| 3043 | + "Stateful subject — process/class with persistent internal state", |
| 3044 | + "State-first decision logic — chooses LLM/tool invocation per request", |
| 3045 | + "Hidden reasoning trace — internal reflection without LLM", |
| 3046 | + "LLM-as-tool wrapper — invoked only when decision logic decides" |
| 3047 | + ], |
| 3048 | + "last_updated": "2026-05-23" |
2847 | 3049 | } |
2848 | 3050 | ] |
2849 | 3051 | } |
0 commit comments