एजेंट स्पेसिफ़िकेशन फ़ॉर्मैट
Tajo एजेंट markdown फ़ाइलों में तय किए जाते हैं. हर फ़ाइल में YAML फ़्रंटमैटर (पहचान, टूल, पाबंदियां) और एक markdown बॉडी (निर्देश, रणनीति, नियम) होती है. यह फ़ॉर्मैट मल्टी-एजेंट ऑर्केस्ट्रेशन सिस्टम में इस्तेमाल होने वाले प्रोडक्शन एजेंट पैटर्न से प्रेरित है.
फ़ाइल की संरचना
---name: agent-namedescription: What this agent does (max 160 chars)version: 1.0.0temperature: 0.2max_tokens: 4096tools: - brevo_contacts - brevo_email_campaign_management - brevo_sms_campaignstriggers: - event: cart_abandoned - schedule: "0 */4 * * *"permissions: - contacts:read - email:send - sms:send---
# Agent Name
Instructions for the agent in natural language...फ़्रंटमैटर के फ़ील्ड
ज़रूरी फ़ील्ड
| फ़ील्ड | टाइप | विवरण |
|---|---|---|
name | स्ट्रिंग | kebab-case में अनोखा पहचानकर्ता (जैसे cart-recovery-agent) |
description | स्ट्रिंग | यह एजेंट क्या करता है (अधिकतम 160 अक्षर) |
version | स्ट्रिंग | सिमेंटिक वर्ज़न (जैसे 1.0.0) |
tools | ऐरे | Brevo MCP सर्वर के वे मॉड्यूल जिन तक यह एजेंट पहुंच सकता है |
व्यवहार से जुड़े फ़ील्ड
| फ़ील्ड | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
temperature | फ़्लोट | 0.3 | LLM का temperature. कम मान = ज़्यादा निश्चित नतीजे. डेटा से जुड़े कामों के लिए 0.1-0.2 और कैम्पेन डिज़ाइन के लिए 0.3-0.5 रखें |
max_tokens | इंटीजर | 4096 | हर टर्न में जवाब की अधिकतम लंबाई |
model | स्ट्रिंग | claude-sonnet-4-6 | इस्तेमाल किया जाने वाला LLM मॉडल |
ट्रिगर फ़ील्ड
| फ़ील्ड | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
triggers | ऐरे | [] | वे इवेंट, शेड्यूल या वेबहुक जो इस एजेंट को सक्रिय करते हैं |
triggers[].event | स्ट्रिंग | - | इवेंट का नाम (जैसे cart_abandoned, customer_created) |
triggers[].schedule | स्ट्रिंग | - | Cron एक्सप्रेशन (जैसे रोज़ सुबह 9 बजे के लिए 0 9 * * *) |
triggers[].webhook | स्ट्रिंग | - | वेबहुक पाथ (जैसे /agents/cart-recovery/trigger) |
triggers[].conditions | ऐरे | [] | ट्रिगर के लिए फ़िल्टर शर्तें |
triggers[].debounce | स्ट्रिंग | - | डिबाउंस विंडो (जैसे 5m, 1h) |
अनुमति से जुड़े फ़ील्ड
| फ़ील्ड | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
permissions | ऐरे | [] | ऑडिट ट्रेल के लिए ज़रूरी अनुमति स्कोप |
related_agents | ऐरे | [] | उन एजेंट्स की ID जिन्हें यह एजेंट काम सौंप सकता है |
escalation | स्ट्रिंग | - | एजेंट के अनिश्चित होने पर काम कहां भेजा जाए (human, supervisor-agent) |
टूल: Brevo MCP सर्वरों से मैपिंग
tools फ़ील्ड, Brevo MCP सर्वर मॉड्यूल के नामों का संदर्भ देता है. हर मॉड्यूल mcp.brevo.com पर एक खास एंडपॉइंट से जुड़ा होता है:
tools: # Contacts & Segmentation - brevo_contacts # /v1/brevo_contacts/mcp - brevo_lists # /v1/brevo_lists/mcp - brevo_segments # /v1/brevo_segments/mcp - brevo_attributes # /v1/brevo_attributes/mcp
# Campaigns & Messaging - brevo_email_campaign_management # /v1/brevo_email_campaign_management/mcp - brevo_templates # /v1/brevo_templates/mcp - brevo_sms_campaigns # /v1/brevo_sms_campaigns/mcp - brevo_whatsapp_campaigns # /v1/brevo_whatsapp_campaigns/mcp
# Analytics - brevo_campaign_analytics # /v1/brevo_campaign_analytics/mcp
# Sales CRM - brevo_deals # /v1/brevo_deals/mcp - brevo_companies # /v1/brevo_companies/mcp - brevo_tasks # /v1/brevo_tasks/mcp - brevo_pipelines # /v1/brevo_pipelines/mcp - brevo_notes # /v1/brevo_notes/mcpTip
अपने एजेंट को जितने टूल कम से कम चाहिए, उतने ही दें. कम टूल = बेहतर AI तर्क और तेज़ जवाब. सभी उपलब्ध मॉड्यूल के लिए Brevo MCP सर्वर देखें.
ट्रिगर
इवेंट ट्रिगर
आपके सिस्टम में कुछ होने पर एजेंट को सक्रिय करें:
triggers: - event: cart_abandoned conditions: - cart_value: "> 50" - items_count: ">= 1" - time_since_activity: "> 30m" debounce: 5mशेड्यूल ट्रिगर
एजेंट को तय अंतराल पर चलाएं:
triggers: - schedule: "0 9 * * MON" # Every Monday at 9am timezone: "America/New_York" - schedule: "0 */4 * * *" # Every 4 hours - schedule: "0 0 1 * *" # First day of each monthवेबहुक ट्रिगर
एजेंट को HTTP के ज़रिए चलाएं:
triggers: - webhook: /agents/win-back/trigger method: POST authentication: api_keyMarkdown बॉडी: निर्देश
एजेंट स्पेक की बॉडी प्राकृतिक भाषा में लिखे निर्देश होते हैं. इसे ऐसे लिखें जैसे आप किसी कुशल मार्केटर को ब्रीफ़ दे रहे हों:
संरचना
# Agent Name
Context paragraph, what this agent does and why.
## Strategy
Step-by-step approach the agent should follow.
## Decision Framework
Rules for making choices (e.g., which channel to use based on cart value).
## Rules
Hard constraints, things the agent must ALWAYS or NEVER do.
## Templates
References to Brevo template IDs, SMS copy, WhatsApp templates.
## Metrics
Events to track for measuring success.असरदार निर्देश लिखना
सिर्फ़ लक्ष्य नहीं, रणनीति के बारे में साफ़-साफ़ लिखें:
## BadRe-engage churned customers.
## GoodWhen a customer hasn't purchased in 90+ days:1. Check their last 3 orders for product category preferences2. Create a personalized discount based on AOV (10% if AOV > $100, 15% if < $100)3. Send email with subject line referencing their preferred category4. Wait 72 hours, if no open, send SMS with discount code5. Wait 7 days, if no purchase, mark as deep-churn and stop sequenceगार्डरेल साफ़ तौर पर तय करें:
## Rules- NEVER send more than 3 messages per sequence- NEVER contact customers who unsubscribed- ALWAYS check if the customer converted before sending the next step- ALWAYS respect quiet hours (no SMS 9pm-9am local time)- If unsure about a decision, escalate to human reviewमल्टी-एजेंट चेन
जटिल वर्कफ़्लो के लिए कई एजेंट को एक चेन में जोड़ें. हर एजेंट एक चरण संभालता है और संदर्भ अगले को सौंप देता है:
name: quarterly-retention-campaignsteps: - agent: customer-intelligence input: | Analyze customer segments for Q2 retention campaign. Goal: {task}
Identify: 1. At-risk customers (declining purchase frequency) 2. VIP customers (top 10% by LTV) 3. Win-back candidates (90+ days since last order)
- agent: campaign-designer input: | Design retention campaigns for these segments: {previous}
Create differentiated approaches per segment: - At-risk: gentle nudge with product recommendations - VIP: exclusive early access or loyalty reward - Win-back: aggressive discount with urgency
- agent: campaign-executor input: | Execute these campaigns via Brevo: {previous}
Use appropriate channels per segment preference. Set up A/B tests for subject lines. Schedule sends for optimal times.
- agent: campaign-reporter input: | Generate the retention campaign launch report: {previous}
Include: segments targeted, campaigns created, expected reach, A/B test configurations.चेन वेरिएबल
| वेरिएबल | विवरण |
|---|---|
{task} | मूल लक्ष्य या अनुरोध |
{previous} | पिछले चरण का आउटपुट |
{step_N} | चरण N का आउटपुट (गिनती 0 से शुरू) |
{artifacts_dir} | फ़ाइल आउटपुट के लिए डायरेक्टरी |
पहले से बने एजेंट स्पेक
कैम्पेन ऑर्केस्ट्रेटर
---name: campaign-orchestratordescription: Design and execute multi-channel campaigns from natural language promptsversion: 2.0.0temperature: 0.3tools: - brevo_contacts - brevo_segments - brevo_email_campaign_management - brevo_templates - brevo_sms_campaigns - brevo_whatsapp_campaigns - brevo_campaign_analyticstriggers: - webhook: /agents/campaign/trigger method: POST---
# Campaign Orchestrator
You are a multi-channel marketing campaign specialist.Given a campaign brief, you design, build, and launchcampaigns across email, SMS, and WhatsApp via Brevo.
## Process1. Parse the campaign brief (audience, message, goal, timeline)2. Create or identify the target segment in Brevo3. Select the best channel(s) based on audience preference data4. Build campaign content using existing templates or creating new ones5. Configure send schedule and A/B tests6. Launch and report initial delivery metrics
## Channel Selection- Email: default for all campaigns- SMS: add for time-sensitive offers or cart recovery- WhatsApp: add for conversational campaigns or high-value segments
## Rules- ALWAYS preview campaigns before sending- NEVER send to unsubscribed contacts- ALWAYS set up tracking for campaign attribution- Maximum 2 A/B test variants per campaignकस्टमर इंटेलिजेंस एजेंट
---name: customer-intelligencedescription: Autonomous segmentation, RFM scoring, and churn predictionversion: 1.5.0temperature: 0.2tools: - brevo_contacts - brevo_segments - brevo_attributes - brevo_lists - brevo_campaign_analyticstriggers: - schedule: "0 6 * * MON" timezone: "UTC"---
# Customer Intelligence Agent
You analyze customer data in Brevo to generate actionablesegments and insights for marketing teams.
## Weekly Analysis1. Pull contact activity data from campaign analytics2. Calculate RFM scores (Recency, Frequency, Monetary)3. Identify segment shifts (customers moving between tiers)4. Flag churn risks (declining engagement over 4+ weeks)5. Generate segment recommendations for upcoming campaigns
## Segment Definitions- Champions: R=5, F=5, M=5, recent, frequent, high-value- Loyal: R>=3, F>=4, M>=3, consistent buyers- At Risk: R<=2, F>=3, M>=3, were loyal, now fading- Hibernating: R=1, F>=2, M>=2, long gone, were once active- New: first purchase in last 30 days
## OutputProduce a markdown report with:- Segment sizes and week-over-week changes- Top 10 at-risk customers by LTV- Recommended actions per segment- Suggested campaign themes for the weekडिप्लॉयमेंट
एजेंट को प्रोग्राम से चलाना
import { TajoAgent } from "@tajo/agent-sdk";
const agent = new TajoAgent({ specPath: "./agents/cart-recovery-agent.md", brevoToken: process.env.BREVO_MCP_TOKEN, model: "claude-sonnet-4-6", // Only connect the MCP servers listed in the agent's tools field autoConnectServers: true,});
const result = await agent.run( "Recover abandoned carts over $50 from the last 4 hours");
console.log(result.summary);console.log(result.toolCalls); // Full audit trailconsole.log(result.metrics); // Events trackedClaude Code के ज़रिए चलाना
# Point to your agent spec and let Claude execute itclaude "Run the agent defined in ./agents/cart-recovery-agent.md for today's abandoned carts"Cron से शेड्यूल करना
# Run the customer intelligence agent every Monday at 6am0 6 * * MON claude --print "Run ./agents/customer-intelligence.md weekly analysis" >> /var/log/tajo-agents.log 2>&1अगले कदम
- Brevo MCP सर्वर, उपलब्ध टूल और सर्वर कॉन्फ़िगरेशन
- अपना पहला एजेंट बनाना, व्यावहारिक ट्यूटोरियल
- स्किल्स रेफ़रेंस, Tajo Skills जो एजेंट्स के साथ जुड़ती हैं
- MCP आर्किटेक्चर का अवलोकन, यह सब मिलकर कैसे काम करता है