Logo de Agent Action Handshake

Agent Action Handshake

Organização
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.

Visão geral

Publicado porfriday-platform
Repositóriofriday-studio
Nome da habilidadeagent-action-handshake
Estrelas
102
Forks
5
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Sem arquivos extras

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por friday-platform no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Agent Action Handshake no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/agent-action-handshake
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Agent Action Handshake em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Agent Action Handshake automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Agent Action Handshake não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Perguntas frequentes

O que a habilidade de IA Agent Action Handshake faz?

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.

Por que usar Agent Action Handshake no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Agent Action Handshake é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Agent Action Handshake no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/friday-platform/friday-studio/tree/main/packages/system/skills/agent-action-handshake. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Agent Action Handshake?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Agent Action Handshake?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Agent Action Handshake com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Agent Action Handshake é gratuita?

A habilidade é publicada no GitHub por friday-platform. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇