شعار Agent Action Handshake

Agent Action Handshake

مؤسسة
friday-platform
agent-action-handshake

Canonical reference for the contract between an FSM action and the agent it invokes. Loads when authoring or debugging any combination of: `type: llm` inline action, `type: agent` action with `outputTo`, `type: agent` action with `inputFrom`, agent prompts that need to coordinate with the action invoking them. Covers what the runtime auto-injects per invocation kind (platform tools, `complete` when `outputTo` is set), `outputTo` semantics, `inputFrom` resolution, the four invocation kinds.

نظرة عامة

الناشرfriday-platform
المستودعfriday-studio
اسم المهارةagent-action-handshake
النجوم
102
التفريعات
5
الملفات المرفقة
تعليمات فقط
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها friday-platform على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Agent Action Handshake في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/agent-action-handshake
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/friday-platform/friday-studio.git /tmp/friday-studio
mkdir -p .claude/skills
cp -r /tmp/friday-studio/packages/system/skills/agent-action-handshake .claude/skills/agent-action-handshake
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Agent Action Handshake في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Agent Action Handshake تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Agent Action Handshake بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Agent ↔ FSM-action handshake

This is the contract between an FSM action and the agent it invokes. Most "platform bug" misdiagnoses live in the gap between "how the FSM authors the action" and "what the agent prompt expects." Read this once, then ground every job/agent edit in it.

The four invocation kinds

FSM actionReferenced agentRuntime path
type: llm inlinenone — the action carries provider, model, prompt, tools directlyfsm-engine.ts case "llm"
type: agentagents.<id> block with type: llmfsm-engine.ts case "agent" → runAgent → from-llm.ts
type: agentagents.<id> with type: atlascase "agent" → runAgent → bundled-agent handler
type: agentagents.<id> with type: usercase "agent" → runAgent → ProcessAgentExecutor (NATS subprocess)

Each path has the same outputTo contract but different tool surfaces and prompt-composition rules.

What the runtime auto-injects

Regardless of invocation kind, the LLM-side agent (any agent that's type: llm) sees:

  • Platform tools — full PLATFORM_TOOL_NAMES set from packages/agent-sdk/src/platform-tools.ts (~35 entries spanning memory, artifacts, fs, shell/data, state, HITL, and flow-control like delegate). These inject on top of the agent's config.tools allowlist regardless of what's in tools:. See source for the exact set.
  • complete tool — injected when the action declares outputTo. The LLM MUST call this to surface output (see "The complete contract" below).
  • failStep tool — injected for inline type: llm FSM actions (see fsm-engine.ts case "llm"). The LLM calls this to deliberately fail the step with a structured reason. NOT injected on the type: agent → type: llm path that goes through from-llm.ts; an agent reachable through both shapes can't assume the tool is present.

What's NOT auto-injected:

  • MCP server tools — those come from agents.<id>.config.tools (workspace-scope MCP only) or from the inline type: llm action's tools: array.

The complete contract

The single most important rule: if an action has outputTo, the agent's prompt MUST instruct the LLM to call complete with the structured output.

When the action is:

yaml
- type: agent
  agentId: stale-report-agent
  outputTo: response

The runtime injects a complete tool with input schema {response: string} (or richer if outputType is declared). The agent's prompt should end with:

When done, call the `complete` tool with:
  { "response": "<the full final text>" }
This is how the FSM captures your output. Do not stream the text as
your final assistant message — the runtime reads it from `complete`.

Without this instruction, the LLM streams prose, never calls complete, and the runtime throws:

LLM action with outputTo 'response' did not call complete

outputType and structured output

When you set outputType: SomeDoc, the runtime looks up fsm.documentTypes.SomeDoc for a JSON Schema and feeds it to the complete tool's input schema. The LLM must produce data matching the schema.

yaml
documentTypes:
  EmailDraft:
    type: object
    properties:
      to: { type: string }
      subject: { type: string }
      body: { type: string }
    required: [to, subject, body]

states:
  drafting:
    entry:
      - type: agent
        agentId: drafter
        outputTo: draft
        outputType: EmailDraft

The agent's prompt should know about to, subject, body — either from the prompt body or from a worked example.

inputFrom and document chaining

inputFrom reads a prior step's outputTo document and feeds it into the next step's input. String form chains one prior; array form concatenates multiple labeled.

yaml
states:
  draft:
    entry:
      - type: agent
        agentId: drafter
        outputTo: draft-doc
      - type: emit
        event: DONE
    on: { DONE: { target: review } }
  review:
    entry:
      - type: agent
        agentId: reviewer
        inputFrom: draft-doc       # reads from draft-doc

Bulky inputs are passed as artifactRefs plus a compact summary — the agent reads the full data via parse_artifact(<id>) if needed.

Pattern A vs Pattern B

Two job shapes:

  • Pattern A (execution.strategy: sequential): list of agent IDs that run in order. Final agent's assistant text becomes the session output natively. Use when the work is a single LLM conversation, no document chaining needed, output is plain text.
  • Pattern B (fsm:): state machine with named states, entry actions, and explicit outputTo documents. Required when you need branching, multi-step document flow, parallel actions, or HITL elicitation.

Don't migrate Pattern A → Pattern B "to get outputTo." The migration introduces the complete injection contract, which is the single most common source of empty-output failures. If a Pattern A job is producing empty output, fix the agent's prompt first.

Cross-references

  • @friday/writing-workspace-jobs — FSM authoring shapes.
  • @friday/workspace-api — agent CRUD.
  • @friday/delegate-handoff — sibling contract for the parent ↔ delegate-child boundary.
  • @friday/debugging-empty-output — what happens when this contract is violated.
  • @friday/debugging-runtime-errors — did not call complete and related errors.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Agent Action Handshake؟

Canonical reference for the contract between an FSM action and the agent it invokes. Loads when authoring or debugging any combination of: `type: llm` inline action, `type: agent` action with `outputTo`, `type: agent` action with `inputFrom`, agent prompts that need to coordinate with the action invoking them. Covers what the runtime auto-injects per invocation kind (platform tools, `complete` when `outputTo` is set), `outputTo` semantics, `inputFrom` resolution, the four invocation kinds.

لماذا تستخدم Agent Action Handshake على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Agent Action Handshake عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Agent Action Handshake في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/agent-action-handshake. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Agent Action Handshake؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Agent Action Handshake؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Agent Action Handshake معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Agent Action Handshake مجانية؟

نشرها friday-platform على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇