Creavax
دليل قوالب CREAVAX للذكاء الاصطناعي

أنشئ قوالب كريفاكسباستخدام JSON نظيف وصالح

أعط هذا الدليل إلى ChatGPT أو Claude أو Gemini أو أي نظام ذكاء اصطناعي آخر قبل أن تطلب منه إنشاء قالب كريفاكس. يحدد الدليل بنية الحزمة وقواعد الاتصال الأساسية بين Agent / Model / Output.

Input → Agent Agent → Model Agent → Agent Agent → Output ممنوع Model → Output
01 / طريقة الاستخدام

أعط الذكاء الاصطناعي القواعد قبل الفكرة

انسخ الدليل أو نزّله وأرسله إلى الذكاء الاصطناعي، ثم صف القالب المطلوب. يجب أن يعيد الذكاء الاصطناعي حزمة .creavax-template.json صالحة فقط. الصق JSON في Build with AI وتحقق منه قبل إنشاء Draft.

1. انسخ الدليل

استخدم الدليل الكامل أدناه لكي يفهم النموذج بنية كريفاكس.

2. صف القالب

أخبر الذكاء الاصطناعي بالهدف والمدخلات المطلوبة والمخرج النهائي المتوقع.

3. استلم JSON فقط

احفظ الحزمة المعادة أو انسخها كملف .creavax-template.json.

4. تحقق داخل كريفاكس

يتحقق Build with AI من المخطط والقدرات وسير العمل قبل الاستيراد.

02 / قاعدة الرسم البياني الحرجة

الـ Agent يملك التنفيذ والمخرج

A Model is the execution dependency of an Agent. It must never be wired directly to the final Output. Image/reference inputs connect to the Agent and remain available to that Agent's Model at runtime.

قاعدة سير العمل في كريفاكس
Correct:
Input -> Agent
Agent -> Model
Agent -> Output

Forbidden:
Model -> Output
03 / دليل الذكاء الاصطناعي

انسخ هذا إلى أي نظام ذكاء اصطناعي

هذا هو الموجّه المساعد القابل للنقل. كُتب عمدًا بشكل محايد تجاه المزود ويطلب من النموذج إعادة JSON قالب كريفاكس فقط.

creavax-ai-template-creator-guide.txt
You are creating an importable template package for Creavax Template Builder.

CANONICAL LIVE CONTEXT
If web access is available, read the current Creavax rules, schema and the current visible admin-curated Template Builder models with their real capabilities first:
https://creavax.com/developers/templates/ai-context.json

The models exposed for Template Builder discovery come from the exact visible Admin Curated Models category memberships. Curated membership controls which real models are offered in the builder; it does not change a model's real capability contract. Keep template model slots portable and requirement-based; do not hard-code curated category IDs, provider IDs or model_key values inside template.models.

CREAVAX MODEL SOURCE-OF-TRUTH RULE
- Use only the models and capabilities explicitly declared by Creavax Live Models Catalog / live AI Context.
- Do not analyze, infer, guess, add or expand model capabilities yourself.
- Never infer capability from model name, family, provider, marketing page, external documentation, general AI knowledge, similarity to another model, provider reputation or prior knowledge.
- If a capability, operation, input, output, feature or runtime control is absent or unknown in Creavax, treat it as unsupported. Unknown != Supported.
- Reference-image support does NOT mean primary image input, image_to_image or image_edit unless Creavax explicitly declares those capabilities.
- If your own knowledge conflicts with Creavax, Creavax always wins. Do not use or assume a real model that is not present in the current live model catalog.
- First derive the Template requirements; then read the live catalog only to understand which declared capabilities are currently available. Keep the portable Template provider-neutral and never hard-code a real model_key.

Your final answer must be one valid .creavax-template.json document. Do not create application code, React components, Laravel/PHP code, ZIP patches, explanations, or installation steps.

Required root structure:
{
  "schema_version": "1.0",
  "type": "creavax_template",
  "template": { ... }
}

Creavax workflow architecture:
INPUT -> AGENT
AGENT -> MODEL
AGENT -> AGENT
AGENT -> OUTPUT

The Model is an execution dependency of an Agent. The Model is NOT the producer node of the final Template Output.

Correct:
{ "from": "product_scene_creator", "to": "image_model" }
{ "from": "product_scene_creator", "to": "final_image" }

Forbidden:
{ "from": "image_model", "to": "final_image" }

Never connect a Model directly to an Output. Creavax may reject that graph with:
Output must be connected to an Agent, not directly to a Model.

INPUTS
- Every user-configurable value must be an Input.
- Use meaningful unique snake_case keys.
- Canonical buyer input types include text, select, number, image, video, audio, three_d and file.
- Select inputs should include a valid default and unique label/value options when appropriate. Numeric inputs use type "number" and may include a numeric default.

AGENTS
- Each Agent must have a unique key, name and clear system_prompt.
- The system_prompt should explain how to use inputs, what to preserve, what to generate, the expected result and important restrictions.
- Complex templates may use multiple Agents connected as a directed workflow. Agent -> Agent is supported.
- An upstream Agent's result becomes runtime input for the downstream Agent. Chains and branches are allowed, but Agent cycles/loops are not.
- Each Agent may use up to three Model slots.
- Each Model slot/node belongs to exactly one Agent. Never connect the same Model slot to multiple Agents. If two Agents need the same capability, create two separate Model slots; Creavax may resolve both slots to the same real provider model.
- Do not add extra Models only to fill all three slots. Every connected Model is an executable step and can add latency and credit cost.
- When an Agent genuinely benefits from multiple Model stages, connect them explicitly with target_port values chatModel1, chatModel2 and chatModel3 to preserve execution order.
- A Model slot may define its own instruction and prompt_composition. Use these for stage-specific work instead of forcing every Model in the Agent to share one generic prompt.
- prompt_composition is optional, but when provided it MUST be non-empty. {{prompt}} is optional: use it only to choose where structured connected text inputs are inserted. Without {{prompt}}, Creavax appends those structured inputs after the authored prompt text.
- Image/file inputs remain real media/reference bindings and must not be replaced by filenames in prompt text. If no custom final Prompt text is required, omit prompt_composition.
- A later Model in the same Agent may declare depends_on with one or more earlier Model keys. Creavax passes those earlier outputs into the later Model. A dependency must point to an earlier slot in the same Agent.
- Agent -> Agent is also a data connection: the downstream Agent can receive the upstream Agent's final result when its Model accepts that result type.
- Execution follows the Agent graph automatically: independent Agents may run in parallel; a downstream Agent waits only for its connected upstream Agent dependencies; mixed graphs combine parallel branches with sequential hand-offs.
- Do not hardcode provider-specific model names unless the user explicitly asks for one.

MODELS
- Template Builder model discovery uses the exact visible model memberships configured in Admin > Curated Models.
- Curated category membership controls discovery/availability only. It must never be used to invent or rewrite a model's inputs, outputs, operations, features or runtime controls.
- Define a Model slot by capability requirements, not by curated category, provider ID or model_key.
- Describe only the inputs, outputs, operations and optional features genuinely required by the Agent.
- Provider request fields are not automatically semantic input modalities. A prompt/instruction field, JSON/config value, reference URL, task ID, mask, bounding box or provider-specific control must not create a new semantic input or generation operation unless that endpoint independently supports it.
- The live AI Context lists only the currently visible admin-curated models available to Template Builder, together with their real capability contracts. Use that list to understand what can currently be resolved; do not bind the portable JSON to a specific listed model.
- Never supplement that live capability contract with external model knowledge. Missing or unknown capability means unsupported for Template compatibility.
- Reference-image support alone must never be treated as image input, image_to_image or image_edit. Those must be explicitly declared by Creavax.
- If a preferred or referenced real model is unavailable or unregistered, Creavax may replace it only with an active model that satisfies the complete inputs + outputs + operations + features + required runtime-controls intersection.
- Example for image editing:
  "requirements": {
    "inputs": ["image", "text"],
    "outputs": ["image"],
    "operations": ["image_edit"],
    "features": []
  }

AGENT SYSTEM PROMPT
- Every object in template.agents MUST include a non-empty system_prompt.
- Missing, null, empty ("") or whitespace-only system_prompt values are invalid and will be rejected during import.
- The system_prompt should define the Agent role, responsibilities, how it interprets connected Inputs, expected behavior and how it should use its connected Models.
- Never generate a placeholder Agent with an empty system_prompt.
- Valid example:
  { "key": "product_agent", "name": "Product Agent", "system_prompt": "Preserve the uploaded product identity, follow the buyer instructions, and use the connected image model to create the requested advertising result." }

MULTI-MODEL AGENTS
- Use multiple Models only when each slot has a distinct job. Connected Model slots execute in chatModel1 -> chatModel2 -> chatModel3 order.
- Give each Model a stage-specific instruction. prompt_composition is optional; if defined it must be non-empty. {{prompt}} is only an optional placement token for connected structured text inputs.
- Use depends_on to pass an earlier Model result into a later Model in the same Agent.
- Example:
  "models": [
    {
      "key": "draft_image_model",
      "label": "Draft Image Model",
      "requirements": { "inputs": ["image", "text"], "outputs": ["image"], "operations": ["image_edit"], "features": [] },
      "instruction": "Create the first advertising composition."
    },
    {
      "key": "refine_image_model",
      "label": "Refine Image Model",
      "requirements": { "inputs": ["image", "text"], "outputs": ["image"], "operations": ["image_edit"], "features": [] },
      "instruction": "Refine the previous result while preserving the product exactly.",
      "depends_on": ["draft_image_model"]
    }
  ]
  "connections": [
    { "from": "product_agent", "to": "draft_image_model", "target_port": "chatModel1" },
    { "from": "product_agent", "to": "refine_image_model", "target_port": "chatModel2" }
  ]

RUNTIME MODEL SETTINGS
- When a user-facing Input must control a real model setting, use model.setting_bindings.
- Model compatibility is strict intersection: every required input, output, operation, feature and bound runtime setting must be supported by the resolved real model.
- Every setting_bindings[].setting is promoted to a required runtime control before model selection; candidates missing that control are excluded before execution/provider invocation.
- This is intended for portable runtime controls such as video duration, aspect ratio, resolution, quality, FPS or output count.
- Every setting_binding must reference an existing Input whose schema type is valid for that setting. The setting must be a canonical supported runtime control, and the binding must not conflict with the Model slot requirements.
- Use only Input types supported by the live Creavax Template schema. The canonical numeric buyer input type is "number"; use it for numeric values and setting bindings.
- Use cast to convert the selected value to the real runtime type: string, integer, number or boolean.
- Example for dynamic video duration:
  {
    "key": "video_model",
    "label": "Compatible Video Model",
    "requirements": {
      "inputs": ["image", "text"],
      "outputs": ["video"],
      "operations": ["video_generation"],
      "features": []
    },
    "setting_bindings": [
      { "setting": "duration_seconds", "input": "video_duration", "cast": "integer" }
    ]
  }
- The runtime value is applied before model routing and pricing, so a longer duration can produce a higher credit cost when the selected provider model is billed by duration.
- Never bind Inputs to provider identity, model identity, billing internals, workflow ids or other protected settings. Creavax rejects unsafe bindings.

IMAGE / REFERENCE INPUTS
- Connect the image Input to the Agent.
- Creavax runtime can pass an Agent's connected image/reference Inputs to that Agent's Model.
- Do not add a visible Image -> Model connection merely to provide the reference image.

OUTPUTS
- Outputs represent final workflow results.
- Every final Output must be connected from the Agent that produces it, never directly from its Model.

CONNECTIONS
Before returning JSON, verify:
1. Every from/to key exists.
2. Every required Input is connected to the Agent that uses it.
3. Every Model is connected from exactly one Agent that owns/uses it. A Model slot must never be shared by multiple Agents.
4. Agent -> Agent connections may be used for multi-step workflows; they create both data and execution dependencies.
5. Every final Output is connected from an Agent.
6. No Model -> Output connection exists.
7. No Agent cycle/loop exists.
8. No duplicate or meaningless connections exist.
9. All keys are unique.
10. Every defined prompt_composition is non-empty. {{prompt}} is optional; without it, Creavax appends structured connected text inputs automatically. Media inputs remain separate runtime bindings.

COMMERCE
- seller_markup is supported in template JSON and represents the creator markup percentage.
- Example: "seller_markup": 25

TRANSLATIONS AND SEO
- Include useful English copy and Persian and Arabic translations when appropriate.
- Use template.translations.fa and template.translations.ar for localized title/description.
- Keep internal machine keys untranslated and stable.
- SEO supports title, description and keywords.
- SEO keywords are limited to a maximum of 10 unique items.
- Example: "seo": { "title": "...", "description": "...", "keywords": ["..."] }

DO NOT
- invent or change Creavax Model Capability rules;
- create Curated Mapping or Classification rules;
- create source code or a ZIP;
- return Markdown commentary around the JSON.

FINAL CHECK
- schema_version is "1.0"
- type is "creavax_template"
- template exists
- JSON syntax is valid
- no comments inside JSON
- no trailing commas
- all connection endpoints exist
- INPUT -> AGENT
- AGENT -> MODEL
- every MODEL slot has exactly one AGENT owner
- every AGENT has a non-empty system_prompt
- AGENT -> AGENT when a multi-step workflow is needed
- independent AGENTS may run in parallel; dependent AGENTS wait for upstream AGENTS
- AGENT -> OUTPUT
- no Agent cycles
- never MODEL -> OUTPUT
- no more than 10 SEO keywords
- provider request fields do not create semantic input modalities or operations unless the endpoint independently supports them
- unavailable/unregistered preferred models may be replaced only by a model satisfying the full inputs + outputs + operations + features + required runtime-controls intersection
- every setting_bindings entry references an existing compatible Input, uses a canonical supported runtime control and does not conflict with Model requirements
- duration/resolution/etc. controls use setting_bindings so pricing and provider settings receive the real runtime value

Return only the final valid JSON, ready to save as:
template-name.creavax-template.json
04 / مثال

حزمة Product in Scene بسيطة

يوضح هذا المثال الرسم البياني الصحيح: تنتقل صورة المنتج إلى Agent، ويستخدم Agent نموذج Model متوافقًا لتحرير الصور، وتخرج الصورة النهائية من Agent.

product-in-scene.creavax-template.json
{
  "schema_version": "1.0",
  "type": "creavax_template",
  "template": {
    "name": "Product in Scene",
    "slug": "product-in-scene",
    "category": "Product Photography",
    "description": "Turn a simple product photo into a premium commercial advertising scene.",
    "seller_markup": 20,
    "translations": {
      "fa": { "title": "محصول در صحنه", "description": "عکس محصول را به تصویر تبلیغاتی حرفه‌ای تبدیل کنید." },
      "ar": { "title": "المنتج داخل المشهد", "description": "حوّل صورة المنتج إلى مشهد إعلاني احترافي." }
    },
    "seo": {
      "title": "Product in Scene AI",
      "description": "Create professional product advertising images with AI.",
      "keywords": ["product photography", "product ads", "AI image edit"]
    },
    "inputs": [
      { "key": "product_image", "type": "image", "label": { "en": "Product Image", "fa": "تصویر محصول" }, "required": true },
      { "key": "scene_style", "type": "select", "label": { "en": "Scene Style", "fa": "سبک صحنه" }, "required": true, "default": "auto", "options": [{ "label": "Auto", "value": "auto" }, { "label": "Luxury", "value": "luxury" }] }
    ],
    "agents": [
      { "key": "product_scene_creator", "name": "Product Scene Creator", "system_prompt": "Preserve the product identity and create a professional advertising scene." }
    ],
    "models": [
      { "key": "image_model", "label": "Compatible Image Edit Model", "requirements": { "inputs": ["image", "text"], "outputs": ["image"], "operations": ["image_edit"], "features": [] } }
    ],
    "outputs": [
      { "key": "final_image", "type": "image", "label": "Final Advertising Image" }
    ],
    "connections": [
      { "from": "product_image", "to": "product_scene_creator" },
      { "from": "scene_style", "to": "product_scene_creator" },
      { "from": "product_scene_creator", "to": "image_model" },
      { "from": "product_scene_creator", "to": "final_image" }
    ]
  }
}
تنزيل قالب Social Product Campaignقالب ثانٍ جاهز للاستيراد لإعلانات المنتجات على الشبكات الاجتماعية.
دليل Template Builder بالذكاء الاصطناعي في كريفاكس — أنشئ قوالب JSON صالحة بالذكاء الاصطناعي