prompts

Documentation for writing Synapse prompts with Laravel Blade templates. Blade is Laravel's system for generating text from reusable templates and input values.

In plain words
What is it for?
Use it to create prompt templates, insert runtime inputs, add few-shot examples, and mark different message types with Synapse's message tags.
Why use it?
It lets prompts be assembled from application data and clearly separated into system, user, assistant, and tool messages.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/usethefork/synapse/prompts
Clone the repo
git clone --depth 1 https://github.com/UseTheFork/synapse
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 749 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00749
Opus 5 $0.00000 $0.00375
Sonnet 5 $0.00000 $0.00150
Haiku 4.5 $0.00000 $0.00075

Measured yesterday against content hash 3f1b67dc01e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/prompts.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prompts

One of the powerful features of Synapse is its integration with Laravel's Blade system for generating prompts. This means you can leverage all Blade template functionalities within your prompts.

How It Works

At runtime, Synapse retrieves the view specified in the agent's $promptView variable. It uses the inputs provided in the handle function, along with any inputs injected by traits such as memory. The prompt is rendered as plain text using Laravel's standard view method.

Synapse Message Syntax

Synapse introduces custom tags to distinguish between message types in the compiled prompt view. This syntax allows you to easily create few-shot prompts by differentiating user, agent, system, and tool messages. The base tag used for this is <message></message>. Content wrapped in a <message></message> tag is treated as an individual message.

<message> Anatomy

The <message> tag includes one required and two optional properties:

  • role: Required. Must be one of system, user, or assistant.
  • tool: Optional. A Base64-encoded JSON array containing keys like tool_call_id, tool_name, tool_arguments, and tool_content.
  • image: Optional. A Base64-encoded JSON array containing keys like image_url and detail.

Example

Here’s an example setup:

<?php
use UseTheFork\Synapse\Agent;
use UseTheFork\Synapse\Contracts\Agent\HasOutputSchema;
use UseTheFork\Synapse\Contracts\Integration;
use UseTheFork\Synapse\Contracts\Memory;
use UseTheFork\Synapse\Integrations\OpenAIIntegration;
use UseTheFork\Synapse\Memory\CollectionMemory;
use UseTheFork\Synapse\Traits\Agent\ValidatesOutputSchema;
use UseTheFork\Synapse\ValueObject\SchemaRule;

class WelcomeEmailAgent extends Agent implements HasOutputSchema
{
    use ValidatesOutputSchema;

    protected string $promptView = 'Prompts.WelcomeEmailPrompt';

    public function resolveIntegration(): Integration
    {
        return new OpenAIIntegration;
    }

    public function resolveMemory(): Memory
    {
        return new CollectionMemory;
    }

    public function resolveOutputSchema(): array
    {
        return [
            SchemaRule::make([
                'name' => 'welcomeEmail',
                'rules' => 'required|string',
                'description' => 'the welcome email.',
            ]),
        ];
    }
}

$welcomeEmailAgent = new WelcomeEmailAgent;
$result = $welcomeEmailAgent->handle(['user' => User::first('2')]);

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 103 lines · 0 tokens per session scan A 3f1b67dc01e7

Subscribe to this mod's changes

prompts is an agent published in the GitHub repository UseTheFork/synapse (50 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 749 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories