@chandshantanu/agentbuilder-mcp-server 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,724 @@
1
+ # Agent Creation Guide - MCP Server
2
+
3
+ ## Overview
4
+
5
+ The AgentBuilder MCP server now supports complete agent creation and configuration workflow. Sellers can create, configure, and publish agents directly through Claude Code without needing to access the web dashboard.
6
+
7
+ **New Capabilities**:
8
+ - ✅ Create new agents from scratch
9
+ - ✅ Define wizard configuration for user onboarding
10
+ - ✅ Set LangGraph workflow definitions
11
+ - ✅ Validate agent before publishing
12
+ - ✅ Publish to marketplace
13
+
14
+ ---
15
+
16
+ ## Quick Start
17
+
18
+ ### Prerequisites
19
+
20
+ 1. **Seller Account**: You need a seller account
21
+ - Email: `shantanu.chandra@banxwayglobal.com`
22
+ - Password: See CLAUDE.md for credentials
23
+
24
+ 2. **MCP Connection**: Establish connection to AgentBuilder
25
+ ```
26
+ Use tool: set_connection
27
+ Connection ID: mcp_conn_xxx (from dashboard)
28
+ ```
29
+
30
+ 3. **Claude Code**: Ensure you're using Claude Code with MCP server configured
31
+
32
+ ---
33
+
34
+ ## Complete Workflow
35
+
36
+ ### Step 1: Create Agent
37
+
38
+ Create a new agent with basic information:
39
+
40
+ ```json
41
+ {
42
+ "name": "Instagram DM Sales Agent",
43
+ "description": "AI-powered sales agent that responds to Instagram DMs with product recommendations",
44
+ "detailed_description": "This agent connects to your Instagram Business account and e-commerce platform to automatically respond to customer inquiries with personalized product recommendations using RAG and GPT-4.",
45
+ "type": "conversational",
46
+ "category": "Sales",
47
+ "tags": ["instagram", "sales", "e-commerce", "ai"],
48
+ "is_public": false,
49
+ "pricing": {
50
+ "model": "subscription",
51
+ "monthly_price": 2999,
52
+ "currency": "INR",
53
+ "trial_enabled": true,
54
+ "trial_duration_days": 30
55
+ }
56
+ }
57
+ ```
58
+
59
+ **Tool**: `create_agent`
60
+
61
+ **Response**:
62
+ ```json
63
+ {
64
+ "id": "65f1a2b3c4d5e6f7a8b9c0d1",
65
+ "name": "Instagram DM Sales Agent",
66
+ "slug": "instagram-dm-sales-agent",
67
+ "status": "draft",
68
+ "created_at": "2026-02-06T..."
69
+ }
70
+ ```
71
+
72
+ **Save the `id` for next steps!**
73
+
74
+ ---
75
+
76
+ ### Step 2: Set Wizard Configuration
77
+
78
+ Define the onboarding wizard for users who subscribe to your agent:
79
+
80
+ ```json
81
+ {
82
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1",
83
+ "wizard_configuration": {
84
+ "required_oauth_providers": [
85
+ "facebook"
86
+ ],
87
+ "required_credentials": [
88
+ {
89
+ "key": "openrouter_api_key",
90
+ "label": "OpenRouter API Key",
91
+ "type": "api_key",
92
+ "required": true,
93
+ "placeholder": "sk-or-v1-...",
94
+ "help_text": "Get your API key from openrouter.ai",
95
+ "validation_regex": "^sk-or-v1-",
96
+ "secure": true,
97
+ "setup_guide": {
98
+ "title": "How to get OpenRouter API key",
99
+ "steps": [
100
+ "1. Go to openrouter.ai",
101
+ "2. Sign up or log in",
102
+ "3. Navigate to Keys section",
103
+ "4. Generate new API key"
104
+ ],
105
+ "documentation_url": "https://openrouter.ai/docs/quick-start"
106
+ }
107
+ }
108
+ ],
109
+ "required_platform_config": [
110
+ {
111
+ "key": "platform_type",
112
+ "label": "E-Commerce Platform",
113
+ "type": "select",
114
+ "options": ["shopify", "woocommerce", "custom"],
115
+ "required": true,
116
+ "help_text": "Select your e-commerce platform"
117
+ },
118
+ {
119
+ "key": "shopify_store_url",
120
+ "label": "Shopify Store URL",
121
+ "type": "url",
122
+ "required": true,
123
+ "depends_on": "platform_type=shopify",
124
+ "placeholder": "https://yourstore.myshopify.com",
125
+ "help_text": "Your Shopify store URL"
126
+ },
127
+ {
128
+ "key": "shopify_api_key",
129
+ "label": "Shopify API Key",
130
+ "type": "api_key",
131
+ "required": true,
132
+ "depends_on": "platform_type=shopify",
133
+ "secure": true
134
+ }
135
+ ],
136
+ "custom_wizard_steps": [
137
+ {
138
+ "step_id": "instagram_page_selection",
139
+ "title": "Select Instagram Page",
140
+ "description": "Choose which Instagram Business account to connect",
141
+ "component_name": "InstagramPageSelector",
142
+ "after_step": "oauth",
143
+ "required": true
144
+ },
145
+ {
146
+ "step_id": "product_catalog_sync",
147
+ "title": "Sync Product Catalog",
148
+ "description": "Configure product synchronization settings",
149
+ "component_name": "ProductCatalogSync",
150
+ "after_step": "instagram_page_selection",
151
+ "required": true
152
+ }
153
+ ],
154
+ "configuration_defaults": {
155
+ "sync_frequency": "realtime",
156
+ "product_fields": ["name", "price", "description", "images", "inventory"],
157
+ "response_tone": "friendly",
158
+ "max_products_per_response": 3
159
+ }
160
+ }
161
+ }
162
+ ```
163
+
164
+ **Tool**: `set_agent_wizard_config`
165
+
166
+ **What gets validated**:
167
+ - ✅ OAuth providers are valid (facebook, instagram, google, etc.)
168
+ - ✅ Credential fields have required properties (key, label, type)
169
+ - ✅ Platform config types are valid (select, text, url, etc.)
170
+ - ✅ Conditional logic (depends_on) references existing fields
171
+ - ✅ Custom steps have required properties
172
+
173
+ ---
174
+
175
+ ### Step 3: Set Agent Graph
176
+
177
+ Define the LangGraph workflow that executes when the agent runs:
178
+
179
+ ```json
180
+ {
181
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1",
182
+ "graph": {
183
+ "nodes": [
184
+ {
185
+ "id": "webhook_receiver",
186
+ "type": "webhook",
187
+ "config": {
188
+ "path": "/webhook/instagram",
189
+ "method": "POST"
190
+ }
191
+ },
192
+ {
193
+ "id": "extract_message",
194
+ "type": "transformer",
195
+ "config": {
196
+ "extract": ["message_text", "sender_id", "conversation_id"]
197
+ }
198
+ },
199
+ {
200
+ "id": "classify_intent",
201
+ "type": "llm_classifier",
202
+ "config": {
203
+ "model": "openai/gpt-4o-mini",
204
+ "categories": [
205
+ "product_inquiry",
206
+ "pricing_question",
207
+ "availability_check",
208
+ "order_status",
209
+ "general_support"
210
+ ],
211
+ "system_prompt": "Classify customer intent based on Instagram DM"
212
+ }
213
+ },
214
+ {
215
+ "id": "search_products",
216
+ "type": "vector_search",
217
+ "config": {
218
+ "embedding_model": "text-embedding-3-small",
219
+ "index_name": "products",
220
+ "top_k": 5,
221
+ "similarity_threshold": 0.7
222
+ }
223
+ },
224
+ {
225
+ "id": "generate_response",
226
+ "type": "llm_chat",
227
+ "config": {
228
+ "model": "openai/gpt-4o",
229
+ "system_prompt": "You are a helpful sales assistant for {business_name}. Respond to customer inquiries about products with relevant recommendations.",
230
+ "max_tokens": 500,
231
+ "temperature": 0.7
232
+ }
233
+ },
234
+ {
235
+ "id": "send_instagram_reply",
236
+ "type": "api_call",
237
+ "config": {
238
+ "method": "POST",
239
+ "url": "https://graph.facebook.com/v18.0/{page_id}/messages",
240
+ "headers": {
241
+ "Authorization": "Bearer {instagram_access_token}"
242
+ },
243
+ "body": {
244
+ "recipient": {"id": "{sender_id}"},
245
+ "message": {"text": "{generated_response}"}
246
+ }
247
+ }
248
+ },
249
+ {
250
+ "id": "log_conversation",
251
+ "type": "database_insert",
252
+ "config": {
253
+ "collection": "conversations",
254
+ "fields": ["sender_id", "message_text", "response", "intent", "timestamp"]
255
+ }
256
+ }
257
+ ],
258
+ "edges": [
259
+ {
260
+ "from": "webhook_receiver",
261
+ "to": "extract_message"
262
+ },
263
+ {
264
+ "from": "extract_message",
265
+ "to": "classify_intent"
266
+ },
267
+ {
268
+ "from": "classify_intent",
269
+ "to": "search_products",
270
+ "condition": "intent in ['product_inquiry', 'availability_check']"
271
+ },
272
+ {
273
+ "from": "classify_intent",
274
+ "to": "generate_response",
275
+ "condition": "intent not in ['product_inquiry', 'availability_check']"
276
+ },
277
+ {
278
+ "from": "search_products",
279
+ "to": "generate_response"
280
+ },
281
+ {
282
+ "from": "generate_response",
283
+ "to": "send_instagram_reply"
284
+ },
285
+ {
286
+ "from": "send_instagram_reply",
287
+ "to": "log_conversation"
288
+ }
289
+ ],
290
+ "entry_point": "webhook_receiver"
291
+ }
292
+ }
293
+ ```
294
+
295
+ **Tool**: `set_agent_graph`
296
+
297
+ **Available Node Types**:
298
+ - `webhook` - Receive webhooks
299
+ - `transformer` - Transform data
300
+ - `llm_classifier` - Classify with LLM
301
+ - `vector_search` - RAG search
302
+ - `llm_chat` - Generate responses
303
+ - `api_call` - External API calls
304
+ - `database_insert` - Save to database
305
+ - `delay` - Wait/delay
306
+ - `conditional` - Conditional branching
307
+ - `parallel` - Parallel execution
308
+ - `loop` - Loop execution
309
+
310
+ **What gets validated**:
311
+ - ✅ All node types are valid
312
+ - ✅ All edges reference existing nodes
313
+ - ✅ Entry point exists in nodes
314
+ - ✅ No circular dependencies
315
+ - ✅ Required config for each node type
316
+
317
+ ---
318
+
319
+ ### Step 4: Add Media (Optional but Recommended)
320
+
321
+ Add icon, banner, and screenshots for better marketplace presence:
322
+
323
+ ```json
324
+ {
325
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1",
326
+ "updates": {
327
+ "icon_url": "https://your-cdn.com/instagram-dm-agent-icon.png",
328
+ "banner_url": "https://your-cdn.com/instagram-dm-agent-banner.png",
329
+ "screenshots": [
330
+ "https://your-cdn.com/screenshot-1.png",
331
+ "https://your-cdn.com/screenshot-2.png",
332
+ "https://your-cdn.com/screenshot-3.png"
333
+ ],
334
+ "demo_url": "https://youtube.com/watch?v=...",
335
+ "video_url": "https://your-cdn.com/promo-video.mp4"
336
+ }
337
+ }
338
+ ```
339
+
340
+ **Tool**: `update_agent`
341
+
342
+ ---
343
+
344
+ ### Step 5: Validate Agent
345
+
346
+ Before publishing, validate your agent configuration:
347
+
348
+ ```json
349
+ {
350
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1"
351
+ }
352
+ ```
353
+
354
+ **Tool**: `validate_agent_configuration`
355
+
356
+ **Response**:
357
+ ```json
358
+ {
359
+ "valid": true,
360
+ "errors": [],
361
+ "warnings": [
362
+ "Testing status unknown. Ensure agent has been tested before publishing."
363
+ ],
364
+ "checklist": {
365
+ "wizard_configuration": true,
366
+ "agent_graph": true,
367
+ "pricing": true,
368
+ "metadata": true,
369
+ "testing": false
370
+ }
371
+ }
372
+ ```
373
+
374
+ **If validation fails**, fix the errors and run validation again.
375
+
376
+ ---
377
+
378
+ ### Step 6: Publish Agent
379
+
380
+ Once validation passes, publish to marketplace:
381
+
382
+ ```json
383
+ {
384
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1"
385
+ }
386
+ ```
387
+
388
+ **Tool**: `publish_agent`
389
+
390
+ **Response (for Sellers)**:
391
+ ```json
392
+ {
393
+ "success": true,
394
+ "message": "Agent submitted for review",
395
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1",
396
+ "agent_name": "Instagram DM Sales Agent",
397
+ "status": "pending_review",
398
+ "marketplace_url": "/agents/instagram-dm-sales-agent"
399
+ }
400
+ ```
401
+
402
+ **Response (for Admins)**:
403
+ ```json
404
+ {
405
+ "success": true,
406
+ "message": "Agent published successfully",
407
+ "agent_id": "65f1a2b3c4d5e6f7a8b9c0d1",
408
+ "agent_name": "Instagram DM Sales Agent",
409
+ "status": "active",
410
+ "marketplace_url": "/agents/instagram-dm-sales-agent"
411
+ }
412
+ ```
413
+
414
+ ---
415
+
416
+ ## Tool Reference
417
+
418
+ ### create_agent
419
+
420
+ **Description**: Create a new agent with basic information
421
+
422
+ **Required Parameters**:
423
+ - `name` (string): Agent name (1-100 chars)
424
+ - `description` (string): Short description (max 1000 chars)
425
+ - `type` (enum): conversational | workflow | analytical | creative | research | automation
426
+ - `category` (string): Agent category (e.g., Sales, Customer Support)
427
+
428
+ **Optional Parameters**:
429
+ - `detailed_description` (string): Long description (max 5000 chars)
430
+ - `tags` (array): Tags for discoverability (max 20)
431
+ - `wizard_configuration` (object): Wizard config (can also set separately)
432
+ - `graph` (object): Agent graph (can also set separately)
433
+ - `pricing` (object): Pricing configuration
434
+ - `icon_url`, `banner_url`, `screenshots`, `demo_url`, `video_url`
435
+ - `is_public` (boolean): Default false
436
+
437
+ ---
438
+
439
+ ### set_agent_wizard_config
440
+
441
+ **Description**: Set or update wizard configuration for agent onboarding
442
+
443
+ **Required Parameters**:
444
+ - `agent_id` (string): Agent ID
445
+ - `wizard_configuration` (object): Complete wizard config
446
+
447
+ **Wizard Configuration Structure**:
448
+ ```typescript
449
+ {
450
+ required_oauth_providers: string[], // e.g., ["facebook", "instagram"]
451
+ required_credentials: CredentialField[],
452
+ required_platform_config: PlatformConfigField[],
453
+ custom_wizard_steps: CustomWizardStep[],
454
+ configuration_defaults: object
455
+ }
456
+ ```
457
+
458
+ **Credential Field**:
459
+ ```typescript
460
+ {
461
+ key: string, // Field name in config
462
+ label: string, // UI label
463
+ type: "api_key" | "oauth" | "password" | "text" | "secret",
464
+ required: boolean,
465
+ placeholder?: string,
466
+ help_text?: string,
467
+ validation_regex?: string,
468
+ secure?: boolean, // Encrypt in database
469
+ setup_guide?: {
470
+ title: string,
471
+ steps: string[],
472
+ documentation_url: string
473
+ }
474
+ }
475
+ ```
476
+
477
+ **Platform Config Field**:
478
+ ```typescript
479
+ {
480
+ key: string,
481
+ label: string,
482
+ type: "select" | "text" | "url" | "number" | "checkbox" | "textarea",
483
+ options?: string[], // Required for select type
484
+ required: boolean,
485
+ depends_on?: string, // e.g., "platform_type=shopify"
486
+ placeholder?: string,
487
+ help_text?: string
488
+ }
489
+ ```
490
+
491
+ ---
492
+
493
+ ### set_agent_graph
494
+
495
+ **Description**: Set LangGraph workflow definition
496
+
497
+ **Required Parameters**:
498
+ - `agent_id` (string): Agent ID
499
+ - `graph` (object): Complete graph definition
500
+
501
+ **Graph Structure**:
502
+ ```typescript
503
+ {
504
+ nodes: Array<{
505
+ id: string,
506
+ type: string, // See available node types
507
+ config: object
508
+ }>,
509
+ edges: Array<{
510
+ from: string,
511
+ to: string,
512
+ condition?: string // Optional condition
513
+ }>,
514
+ entry_point: string // Node ID to start execution
515
+ }
516
+ ```
517
+
518
+ ---
519
+
520
+ ### validate_agent_configuration
521
+
522
+ **Description**: Validate agent before publishing
523
+
524
+ **Required Parameters**:
525
+ - `agent_id` (string): Agent ID
526
+
527
+ **Returns**:
528
+ ```typescript
529
+ {
530
+ valid: boolean,
531
+ errors: string[],
532
+ warnings: string[],
533
+ checklist: {
534
+ wizard_configuration: boolean,
535
+ agent_graph: boolean,
536
+ pricing: boolean,
537
+ metadata: boolean,
538
+ testing: boolean
539
+ }
540
+ }
541
+ ```
542
+
543
+ ---
544
+
545
+ ### publish_agent
546
+
547
+ **Description**: Publish agent to marketplace
548
+
549
+ **Required Parameters**:
550
+ - `agent_id` (string): Agent ID
551
+
552
+ **Behavior**:
553
+ - **Sellers**: Agent status → `pending_review`
554
+ - **Admins**: Agent status → `active`
555
+
556
+ ---
557
+
558
+ ### update_agent
559
+
560
+ **Description**: Update existing agent metadata
561
+
562
+ **Required Parameters**:
563
+ - `agent_id` (string): Agent ID
564
+ - `updates` (object): Fields to update (partial)
565
+
566
+ **Updatable Fields**:
567
+ - All create_agent fields except `creator_id`
568
+ - Can update wizard_configuration and graph separately using dedicated tools
569
+
570
+ ---
571
+
572
+ ## Examples
573
+
574
+ ### Example 1: Simple Chatbot Agent
575
+
576
+ ```json
577
+ {
578
+ "name": "Customer Support Bot",
579
+ "description": "24/7 AI customer support assistant",
580
+ "type": "conversational",
581
+ "category": "Customer Support",
582
+ "graph": {
583
+ "nodes": [
584
+ {"id": "receive", "type": "webhook"},
585
+ {"id": "respond", "type": "llm_chat", "config": {"model": "gpt-4o"}},
586
+ {"id": "send", "type": "api_call"}
587
+ ],
588
+ "edges": [
589
+ {"from": "receive", "to": "respond"},
590
+ {"from": "respond", "to": "send"}
591
+ ],
592
+ "entry_point": "receive"
593
+ }
594
+ }
595
+ ```
596
+
597
+ ### Example 2: Research Agent
598
+
599
+ ```json
600
+ {
601
+ "name": "Market Research Agent",
602
+ "description": "Automated market research and analysis",
603
+ "type": "research",
604
+ "category": "Analytics",
605
+ "graph": {
606
+ "nodes": [
607
+ {"id": "trigger", "type": "webhook"},
608
+ {"id": "search_web", "type": "api_call"},
609
+ {"id": "analyze", "type": "llm_chat"},
610
+ {"id": "save", "type": "database_insert"}
611
+ ],
612
+ "edges": [
613
+ {"from": "trigger", "to": "search_web"},
614
+ {"from": "search_web", "to": "analyze"},
615
+ {"from": "analyze", "to": "save"}
616
+ ],
617
+ "entry_point": "trigger"
618
+ }
619
+ }
620
+ ```
621
+
622
+ ---
623
+
624
+ ## Best Practices
625
+
626
+ ### 1. Wizard Configuration
627
+
628
+ ✅ **DO**:
629
+ - Provide clear help text for all fields
630
+ - Include setup guides for complex credentials
631
+ - Use validation regex for API keys
632
+ - Mark sensitive fields as `secure: true`
633
+ - Test the wizard flow before publishing
634
+
635
+ ❌ **DON'T**:
636
+ - Ask for unnecessary credentials
637
+ - Use vague labels like "Key 1", "Key 2"
638
+ - Skip placeholder examples
639
+ - Forget to validate OAuth scopes
640
+
641
+ ### 2. Agent Graph
642
+
643
+ ✅ **DO**:
644
+ - Start with webhook receiver
645
+ - Use descriptive node IDs
646
+ - Add error handling nodes
647
+ - Log important events
648
+ - Test each node independently
649
+
650
+ ❌ **DON'T**:
651
+ - Create circular dependencies
652
+ - Skip entry_point validation
653
+ - Use hardcoded credentials in config
654
+ - Forget to handle edge cases
655
+
656
+ ### 3. Publishing
657
+
658
+ ✅ **DO**:
659
+ - Add icon and banner before publishing
660
+ - Write detailed descriptions
661
+ - Include screenshots and demo video
662
+ - Test with real users first
663
+ - Monitor after publishing
664
+
665
+ ❌ **DON'T**:
666
+ - Publish without validation
667
+ - Skip testing phase
668
+ - Use generic descriptions
669
+ - Ignore validation warnings
670
+
671
+ ---
672
+
673
+ ## Troubleshooting
674
+
675
+ ### Validation Errors
676
+
677
+ **"Wizard configuration not set"**
678
+ - Run `set_agent_wizard_config` first
679
+
680
+ **"Agent graph not set"**
681
+ - Run `set_agent_graph` first
682
+
683
+ **"Invalid OAuth provider: xxx"**
684
+ - Use valid providers: facebook, instagram, google, etc.
685
+ - See validator for complete list
686
+
687
+ **"Node type 'xxx' not found"**
688
+ - Use valid node types (webhook, llm_classifier, etc.)
689
+ - See available node types list
690
+
691
+ **"Edge references non-existent node 'xxx'"**
692
+ - Check all edge `from` and `to` reference valid node IDs
693
+
694
+ **"Entry point 'xxx' not found in nodes"**
695
+ - Ensure `entry_point` matches a node ID
696
+
697
+ ### Publishing Errors
698
+
699
+ **"Agent validation failed"**
700
+ - Run `validate_agent_configuration` to see specific errors
701
+ - Fix errors and try again
702
+
703
+ **"Permission required: agents.create"**
704
+ - You need seller role or higher
705
+ - Contact admin to upgrade account
706
+
707
+ **"Agent not found"**
708
+ - Check agent_id is correct
709
+ - Ensure you're authenticated
710
+
711
+ ---
712
+
713
+ ## Support
714
+
715
+ For issues or questions:
716
+ - GitHub: https://github.com/anthropics/claude-code/issues
717
+ - Documentation: See CLAUDE.md
718
+ - Backend API: https://agentsapi.chatslytics.com
719
+
720
+ ---
721
+
722
+ **Last Updated**: 2026-02-06
723
+ **Version**: 1.0.0
724
+ **Author**: Development Team