{"_id":"@apptrix/automata-agent-provider","name":"@apptrix/automata-agent-provider","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@apptrix/automata-agent-provider","version":"1.0.1","description":"SDK for creating service provider agents","main":"dist/index.js","types":"dist/index.d.ts","type":"module","scripts":{"build":"tsc","dev":"tsx watch example.ts","example":"tsx example.ts","prepare":"npm run build"},"keywords":["agent","provider","sdk","automata"],"publishConfig":{"access":"public"},"license":"MIT","dependencies":{"@types/jsonwebtoken":"^9.0.10","fastify":"^5.1.0","@fastify/rate-limit":"^10.0.1","jsonwebtoken":"^9.0.2","dotenv":"^16.3.1"},"devDependencies":{"@types/node":"^20.10.5","tsx":"^4.7.0","typescript":"^5.3.3"},"_id":"@apptrix/automata-agent-provider@1.0.1","_nodeVersion":"22.5.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-/pxAwcsNiIwMul92QjeaXYOuyD5dL3fnHK9e1KNOioKtdA/FqIdzHigUdnFvaqnxLYFEjebbFQS8H/QjkOnZwA==","shasum":"a1a89449a79e7e12ee13d0c1035e515918e3a44a","tarball":"https://registry.npmjs.org/@apptrix/automata-agent-provider/-/automata-agent-provider-1.0.1.tgz","fileCount":15,"unpackedSize":55047,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCeKujoYg15wloAOiFbL9cZ8nDT9N334vr307Ac9tNp6gIgQO27BMiizlmPUQ2/ckivv0QAWuggFPCPoNrcp2hymqs="}]},"_npmUser":{"name":"heliomendes","email":"helio5_mendes@hotmail.com"},"directories":{},"maintainers":[{"name":"heliomendes","email":"helio5_mendes@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/automata-agent-provider_1.0.1_1764877033861_0.847413682770561"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-04T19:37:13.768Z","1.0.1":"2025-12-04T19:37:14.008Z","modified":"2025-12-04T19:37:14.318Z"},"maintainers":[{"name":"heliomendes","email":"helio5_mendes@hotmail.com"}],"description":"SDK for creating service provider agents","keywords":["agent","provider","sdk","automata"],"license":"MIT","readme":"# Agent Provider SDK\n\n**Build discoverable service agents that auto-register with the Automata Registry**\n\nThe Provider SDK lets you create agents that expose services via HTTP, automatically register with Registry Central, and get discovered by consumers searching for your capabilities.\n\n---\n\n## Why Use This SDK?\n\n✅ **Auto-Registration**: Start your agent and it automatically appears in the registry\n✅ **Maximum Discoverability**: Optimize intents, categories, and tags to be found by the right consumers\n✅ **Schema Validation**: Define `inputSchema` to ensure consumers send valid parameters\n✅ **JWT Security**: Built-in authentication with execution keys\n✅ **Simple HTTP API**: Expose `/execute` and `/health` endpoints automatically\n✅ **Production-Ready**: HTTPS support, rate limiting, and metadata\n\n---\n\n## Installation\n\n```bash\nnpm install @apptrix/automata-agent-provider\n```\n\n---\n\n## Quick Start\n\n```typescript\nimport { AgentProvider } from '@apptrix/automata-agent-provider';\n\nconst agent = new AgentProvider({\n  id: 'agent:restaurant:copacabana',\n  name: 'RestauranteCopacabana',\n  description: 'Searches for restaurants in Copacabana, Rio de Janeiro',\n\n  // 🎯 Discoverability fields (MOST IMPORTANT)\n  intents: ['food.restaurant.search'],\n  tasks: ['search_restaurants', 'get_menu', 'get_hours'],  // Available operations\n  categories: ['food', 'restaurant.search'],\n  tags: ['restaurant', 'food', 'copacabana', 'brazilian', 'seafood'],\n\n  locationScope: 'Copacabana,Rio de Janeiro,Brazil',\n  languages: ['pt-BR', 'en-US'],\n  version: '1.0.0',\n  port: 4001,\n\n  // Production: provide public HTTPS endpoint\n  publicEndpoint: 'https://restaurant-copacabana.example.com',\n\n  // Optional: define input schema for validation\n  inputSchema: {\n    type: 'object',\n    properties: {\n      cuisine: { type: 'string' },\n      maxPrice: { type: 'number' },\n      rating: { type: 'number', minimum: 1, maximum: 5 },\n    },\n    required: ['cuisine'],\n  },\n\n  meta: {\n    priceRange: { min: 30, max: 200 },\n    averageRating: 4.5,\n  },\n});\n\n// Define execution handler\nagent.onExecute(async (request) => {\n  const { task, params } = request;\n\n  if (task === 'search_restaurants') {\n    const { cuisine, maxPrice = 200 } = params || {};\n\n    // Your business logic here\n    const restaurants = await searchRestaurants(cuisine, maxPrice);\n\n    return {\n      success: true,\n      data: { restaurants },\n    };\n  }\n\n  return {\n    success: false,\n    error: 'Unknown task',\n  };\n});\n\n// Start agent (binds HTTP server + auto-registers)\nawait agent.start();\n```\n\n---\n\n## 🎯 Maximize Discoverability: Intents, Categories, and Tags\n\nThe Registry uses **three key fields** to match your agent with consumers. Understanding these is critical to being found:\n\n### 1. **Intents** (Most Specific)\nIntents describe the **exact action** your agent performs using dot notation.\n\n**Best Practices:**\n- Use hierarchical naming: `domain.subdomain.action`\n- Be specific: `food.restaurant.search` NOT `search`\n- Support multiple intents if your agent handles different actions\n\n**Examples:**\n```typescript\nintents: ['food.restaurant.search']\nintents: ['travel.hotel.book', 'travel.hotel.search']\nintents: ['finance.invoice.generate', 'finance.invoice.send']\nintents: ['communication.email.send']\n```\n\n**Common Intent Patterns:**\n- `{domain}.{service}.search` - Search/query operations\n- `{domain}.{service}.book` - Booking/reservation operations\n- `{domain}.{service}.generate` - Content generation\n- `{domain}.{service}.send` - Communication operations\n- `{domain}.{service}.validate` - Validation operations\n\n### 2. **Categories** (Broader Grouping)\nCategories group your agent within a domain hierarchy.\n\n**Best Practices:**\n- Use 2-3 categories: broad → specific\n- First category is the domain (e.g., `food`, `travel`, `finance`)\n- Second category is the subdomain (e.g., `restaurant.search`, `hotel.booking`)\n\n**Examples:**\n```typescript\ncategories: ['food', 'restaurant.search']\ncategories: ['travel', 'hotel', 'booking']\ncategories: ['finance', 'accounting', 'invoice']\ncategories: ['communication', 'email', 'marketing']\n```\n\n### 3. **Tags** (Free-Form Keywords)\nTags are flexible keywords that describe attributes, features, locations, or specializations.\n\n**Best Practices:**\n- Include location-specific tags (neighborhood, city, region)\n- Add feature tags (e.g., `real-time`, `webhook`, `api`)\n- Include domain-specific attributes (e.g., `luxury`, `budget`, `family-friendly`)\n- Use lowercase with hyphens (e.g., `pet-friendly`, not `Pet Friendly`)\n\n**Examples:**\n```typescript\n// Restaurant agent\ntags: ['restaurant', 'food', 'copacabana', 'brazilian', 'seafood', 'budget-friendly']\n\n// Hotel agent\ntags: ['hotel', 'booking', 'miami-beach', 'luxury', 'pet-friendly', 'ocean-view']\n\n// Invoice agent\ntags: ['invoice', 'pdf', 'api', 'real-time', 'webhook', 'stripe-compatible']\n```\n\n### 4. **Tasks** (Available Operations)\nTasks list the specific operations your agent can perform. This helps the Consumer SDK's LLM select the appropriate task for each request.\n\n**Best Practices:**\n- Use clear, descriptive names (e.g., `get_quote`, `book_room`, `send_email`)\n- Use snake_case for consistency\n- List all available operations your agent supports\n- Keep task names aligned with your intents\n\n**Examples:**\n```typescript\n// Hotel agent\ntasks: ['search_hotels', 'book_room', 'cancel_booking', 'get_availability']\n\n// Restaurant agent\ntasks: ['search_restaurants', 'get_menu', 'get_hours', 'make_reservation']\n\n// Invoice agent\ntasks: ['generate_invoice', 'send_invoice', 'validate_invoice', 'get_status']\n```\n\n**Why it matters:** When consumers call `validateAgentRelevance()`, the LLM uses your `tasks` list to select the most appropriate task for the user's request. Without tasks defined, consumers must manually specify the task name.\n\n---\n\n## 🔍 Discoverability Example\n\nHere's how a well-configured agent appears in searches:\n\n```typescript\nconst agent = new AgentProvider({\n  id: 'agent:hotel:miami-luxury',\n  name: 'MiamiLuxuryHotels',\n  description: 'Book luxury hotels in Miami Beach with ocean views and premium amenities',\n\n  // Consumer searches: \"Find me a luxury hotel in Miami Beach\"\n  // ✅ LLM extracts intent: travel.hotel.book\n  intents: ['travel.hotel.book', 'travel.hotel.search'],\n\n  // ✅ LLM selects appropriate task from available operations\n  tasks: ['search_hotels', 'book_room', 'get_availability', 'cancel_booking'],\n\n  // ✅ LLM extracts categories: ['travel', 'hotel']\n  categories: ['travel', 'hotel', 'booking'],\n\n  // ✅ LLM extracts tags: ['luxury', 'miami-beach', 'ocean-view']\n  tags: ['hotel', 'luxury', 'miami-beach', 'ocean-view', 'pet-friendly', 'spa', 'pool'],\n\n  // ✅ Location matching\n  locationScope: 'Miami Beach,Florida,USA',\n\n  languages: ['en-US', 'es-ES'],\n  version: '1.0.0',\n  port: 4002,\n  publicEndpoint: 'https://miami-hotels.example.com',\n\n  // Optional: guide consumers on valid params\n  inputSchema: {\n    type: 'object',\n    properties: {\n      checkIn: { type: 'string', format: 'date' },\n      checkOut: { type: 'string', format: 'date' },\n      guests: { type: 'number', minimum: 1 },\n      roomType: { type: 'string', enum: ['standard', 'deluxe', 'suite'] },\n    },\n    required: ['checkIn', 'checkOut', 'guests'],\n  },\n});\n```\n\n**Result:** Your agent ranks high when consumers search for:\n- \"luxury hotel in Miami\"\n- \"book hotel Miami Beach\"\n- \"pet-friendly ocean view hotel Florida\"\n\n---\n\n## 🛡️ Input Schema Validation\n\nDefine an `inputSchema` to ensure consumers send valid parameters:\n\n```typescript\nconst agent = new AgentProvider({\n  // ... other config\n  inputSchema: {\n    type: 'object',\n    properties: {\n      city: { type: 'string', minLength: 2 },\n      checkIn: { type: 'string', format: 'date' },\n      checkOut: { type: 'string', format: 'date' },\n      guests: { type: 'number', minimum: 1, maximum: 10 },\n      budget: { type: 'number', minimum: 0 },\n    },\n    required: ['city', 'checkIn', 'checkOut'],\n  },\n});\n```\n\n**Benefits:**\n1. **Consumer SDK auto-validates** before calling your agent\n2. **LLM uses the schema** to build valid params from natural language\n3. **Consumers see clear errors** if they send invalid data\n4. **Registry displays schema** so consumers know what to send\n\n---\n\n## 📚 API Reference\n\n### Constructor\n\n```typescript\nnew AgentProvider(config: AgentConfig)\n```\n\n**AgentConfig:**\n```typescript\ninterface AgentConfig {\n  id: string;                    // Unique ID (e.g., 'agent:restaurant:copacabana')\n  name: string;                  // Display name\n  description: string;           // Service description (be specific!)\n\n  // 🎯 Discoverability (CRITICAL)\n  intents: string[];             // Exact actions (e.g., ['food.restaurant.search'])\n  tasks?: string[];              // Optional - Available task names (e.g., ['get_quote', 'get_menu'])\n  categories: string[];          // Domain hierarchy (e.g., ['food', 'restaurant.search'])\n  tags: string[];                // Keywords (e.g., ['japanese', 'budget', 'copacabana'])\n\n  locationScope: string;         // Geographic scope (City,State,Country)\n  languages: string[];           // Supported languages (e.g., ['en-US', 'pt-BR'])\n  version: string;               // Version (semver)\n\n  port: number;                  // Local bind port\n  registryUrl?: string;          // Optional - defaults based on NODE_ENV\n  publicEndpoint?: string;       // Required in production (HTTPS)\n\n  inputSchema?: JSONSchema;      // Optional - defines expected input\n  meta?: Record<string, any>;    // Optional - custom metadata\n\n  llm?: {                        // Optional - only if you use callLLM helper\n    provider: 'openai' | 'claude' | 'gemini' | 'deepseek' | 'openrouter';\n    apiKey: string;\n    model: string;\n    temperature?: number;\n  };\n}\n```\n\n### Methods\n\n#### `agent.onExecute(handler)`\nDefines the execution handler called when consumers invoke your agent.\n\n```typescript\ntype ExecuteHandler = (request: ExecuteRequest) => Promise<ExecuteResponse>;\n\ninterface ExecuteRequest {\n  task: string;\n  params?: Record<string, any>;\n}\n\ninterface ExecuteResponse {\n  success: boolean;\n  data?: any;\n  error?: string;\n}\n```\n\n**Example:**\n```typescript\nagent.onExecute(async (request) => {\n  const { task, params } = request;\n\n  switch (task) {\n    case 'search_hotels':\n      return { success: true, data: await searchHotels(params) };\n\n    case 'book_hotel':\n      return { success: true, data: await bookHotel(params) };\n\n    default:\n      return { success: false, error: `Unknown task: ${task}` };\n  }\n});\n```\n\n#### `await agent.start()`\nStarts the HTTP server and registers with Registry Central.\n\n**What happens:**\n1. Binds HTTP server to `HOST:PORT` (defaults: `0.0.0.0:3000`)\n2. Sends `POST /register` to Registry Central\n3. Logs confirmation\n4. Agent is now discoverable in searches\n\n#### `await agent.stop()`\nStops the HTTP server.\n\n#### `await agent.callLLM(prompt, systemPrompt?)`\nHelper method to call configured LLM (requires `llm` config).\n\n**Parameters:**\n- `prompt: string` - User prompt to send to LLM\n- `systemPrompt?: string` - Optional system prompt for context\n\n**Returns:** `Promise<string>` - LLM response content (auto-cleans JSON markdown blocks)\n\n**Example:**\n```typescript\nconst agent = new AgentProvider({\n  // ... other config\n  llm: {\n    provider: 'openai',\n    apiKey: process.env.LLM_API_KEY!,\n    model: 'gpt-4o-mini',\n    temperature: 0.7,\n  },\n});\n\nagent.onExecute(async (request) => {\n  if (request.task === 'analyze_menu') {\n    const menuText = request.params?.menu;\n\n    const analysis = await agent.callLLM(\n      `Analyze this restaurant menu and extract dishes: ${menuText}`,\n      'You are a restaurant menu analyzer. Return JSON with dish names and prices.'\n    );\n\n    return {\n      success: true,\n      data: JSON.parse(analysis),\n    };\n  }\n});\n```\n\n**Note:** Only available if `llm` is configured in `AgentConfig`. Throws error if LLM not configured.\n\n---\n\n## 🌐 Exposed Endpoints\n\nWhen you call `agent.start()`, these endpoints are automatically exposed:\n\n### `POST /execute`\nMain endpoint for task execution.\n\n**Request:**\n```json\n{\n  \"task\": \"search_restaurants\",\n  \"params\": {\n    \"cuisine\": \"japanese\",\n    \"maxPrice\": 150\n  }\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"restaurants\": [\n      {\n        \"name\": \"Sushi Bar Copacabana\",\n        \"price\": 120,\n        \"rating\": 4.5\n      }\n    ]\n  }\n}\n```\n\n### `GET /health`\nHealth check endpoint.\n\n**Response:**\n```json\n{\n  \"status\": \"ok\",\n  \"agentId\": \"agent:restaurant:copacabana\"\n}\n```\n\n---\n\n## 🚀 Auto-Registration\n\nWhen you call `agent.start()`, the SDK:\n\n1. **Starts HTTP server** on configured port\n2. **Calls Registry Central** `POST /register` with all metadata\n3. **Sends public endpoint** (required in production)\n4. **Logs confirmation** to console\n\n**Development (HTTP):**\n```typescript\nconst agent = new AgentProvider({\n  // ... config\n  port: 4001,\n  // No publicEndpoint needed - uses http://localhost:4001\n});\n```\n\n**Production (HTTPS):**\n```typescript\nconst agent = new AgentProvider({\n  // ... config\n  port: 4001,\n  publicEndpoint: 'https://your-domain.com', // Required!\n});\n```\n\n> **⚠️ Important:** In production, consumers call your `publicEndpoint`, NOT `http://localhost`. Make sure your HTTPS endpoint is publicly accessible.\n\n---\n\n## 🌍 Environment Variables\n\nCreate a `.env` file:\n\n```bash\n# Environment\nNODE_ENV=development  # or production\n\n# Registry URL (optional - auto-detected)\n# If unset:\n#   NODE_ENV=production -> https://automata.apptrixcloud.com\n#   otherwise          -> https://automata-dev.apptrixcloud.com\nREGISTRY_URL=https://automata-dev.apptrixcloud.com\n\n# Server config\nHOST=0.0.0.0              # Bind address\nPORT=4001                 # Local bind port\nPUBLIC_ENDPOINT=https://your-domain.com  # Required in production\n\n# Security (REQUIRED)\nJWT_SECRET=your-secret-key-min-32-chars\n# IMPORTANT: This secret is sent to Registry (encrypted) and used to sign execution keys\n# Each provider has its own secret for isolated security\n\n# LLM (optional - only needed if you use callLLM helper)\nLLM_PROVIDER=openai\nLLM_MODEL=gpt-4o-mini\nLLM_API_KEY=your-api-key\nLLM_TEMPERATURE=0.7\n```\n\n---\n\n## 🔐 Security Architecture\n\n### How Authentication Works\n\nThe Provider SDK implements a secure three-layer authentication system:\n\n#### 1. Provider → Registry (Registration)\n\nWhen you call `agent.start()`, the SDK automatically:\n\n1. **Sends JWT_SECRET** to Registry via `x-provider-secret` header\n2. **Registry encrypts** your secret with AES-256-CBC\n3. **Stores encrypted secret** in database\n4. **Returns authentication token** (24h validity)\n\n```typescript\n// You don't need to handle this - it's automatic\nawait agent.start();\n// ✅ Your JWT_SECRET is now securely stored in Registry\n```\n\n#### 2. Consumer → Registry (Search)\n\nWhen a consumer searches for agents:\n\n1. **Registry finds matching agents** (including yours)\n2. **Retrieves your encrypted secret** from database\n3. **Decrypts your secret**\n4. **Generates execution key** signed with YOUR secret\n5. **Returns execution key** to consumer (5min validity)\n\n#### 3. Consumer → Provider (Execution)\n\nWhen a consumer executes a task on your agent:\n\n1. **Consumer sends execution key** via Authorization header\n2. **Your agent validates** the key using YOUR JWT_SECRET\n3. **Validates agent_id** matches your agent\n4. **Validates expiration** (5 minutes)\n5. **Executes task** if valid\n\n```typescript\n// You don't need to handle this - SDK validates automatically\nagent.onExecute(async (request) => {\n  // ✅ If this code runs, the execution key was valid\n  return { success: true, data: {...} };\n});\n```\n\n### Security Benefits\n\n✅ **Isolated Security**: Each provider has its own JWT_SECRET\n✅ **Encrypted Storage**: Secrets are never stored in plain text\n✅ **Short-lived Keys**: Execution keys expire in 5 minutes\n✅ **Local Validation**: You validate keys without calling Registry\n✅ **No Shared Secrets**: Compromising one provider doesn't affect others\n\n### JWT_SECRET Requirements\n\n- **Minimum length**: 32 characters\n- **Keep it secret**: Never commit to git\n- **Use environment variable**: Always load from `.env`\n- **Unique per provider**: Don't reuse across different agents\n- **Strong random**: Use cryptographically secure random string\n\n```bash\n# Good examples\nJWT_SECRET=a8f3c9d2e7b4a1f6c8d3e9b2a7f4c1d8e6b9a3f7c2d5e8b1a4f9c6d3e7b2a5f8\n\n# Bad examples\nJWT_SECRET=secret              # Too short\nJWT_SECRET=12345678901234567890123456789012  # Not random\nJWT_SECRET=agent-weather-br    # Predictable\n```\n\n### Production Security Checklist\n\n- [ ] Set strong `JWT_SECRET` (min 32 chars)\n- [ ] Use `publicEndpoint` with HTTPS\n- [ ] Set `NODE_ENV=production`\n- [ ] Enable rate limiting (built-in)\n- [ ] Validate input parameters\n- [ ] Handle errors gracefully\n- [ ] Monitor invalid execution attempts\n- [ ] Keep SDK updated\n\n---\n\n## 💡 Best Practices\n\n### 1. **Optimize for Discovery**\n- Use **specific intents**: `food.restaurant.search` NOT `search`\n- Add **many relevant tags**: location, features, attributes\n- Write **descriptive description**: consumers see this in search results\n- Set **precise locationScope**: `Neighborhood,City,Country` format\n\n### 2. **Define Input Schema**\n- Always define `inputSchema` for complex agents\n- Mark fields as `required` appropriately\n- Use JSON Schema formats (`date`, `email`, etc.)\n- Consumers get better validation and error messages\n\n### 3. **Handle Errors Gracefully**\n- Always return `{ success: false, error: \"...\" }` on errors\n- Provide **helpful error messages**\n- Don't throw unhandled exceptions\n\n### 4. **Version Your Agent**\n- Use semantic versioning: `1.0.0`, `1.1.0`, `2.0.0`\n- Bump version on breaking changes\n- Document changes in your description\n\n### 5. **Production Checklist**\n- Set `publicEndpoint` to your HTTPS URL\n- Configure rate limiting (built-in with Fastify)\n- Set `JWT_SECRET` environment variable\n- Use `NODE_ENV=production`\n- Test health check: `GET https://your-domain.com/health`\n\n### 6. **Location Scope**\nBe as specific as possible:\n- ✅ `Copacabana,Rio de Janeiro,Brazil`\n- ✅ `Miami Beach,Florida,USA`\n- ❌ `Brazil` (too broad)\n\n### 7. **Unique Agent IDs**\nUse namespaced IDs:\n- Format: `agent:{domain}:{service}:{location}`\n- Examples:\n  - `agent:restaurant:copacabana`\n  - `agent:hotel:miami-beach`\n  - `agent:invoice:stripe-api`\n\n---\n\n## 📖 Complete Example\n\nSee [example.ts](./example.ts) for a working restaurant search agent.\n\n### Run the Example\n\n```bash\n# Install dependencies\nnpm install\n\n# Run example\nnpm run example\n\n# Test the agent\ncurl -X POST http://localhost:4001/execute \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"task\":\"search_restaurants\",\"params\":{\"cuisine\":\"japanese\"}}'\n```\n\n---\n\n## 🛠️ Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Dev mode (watch)\nnpm run dev\n\n# Run specific example\nnpm run agency          # Agency agent\nnpm run hotel:miami     # Miami hotel agent\nnpm run hotel:schema    # Hotel with input schema\n```\n\n---\n\n## 📁 Project Structure\n\n```\nsdk-agent-provider/\n├── src/\n│   ├── agent-provider.ts   # Core SDK class\n│   ├── types.ts            # TypeScript interfaces\n│   └── index.ts            # Exports\n├── example.ts              # Basic example\n├── agency-agent.ts         # Agency example\n├── hotel-miami.ts          # Hotel example\n├── hotel-booking-schema.ts # Schema example\n├── package.json\n└── tsconfig.json\n```\n\n---\n\n## 🔗 Related Documentation\n\n- **Consumer SDK**: Search and execute agents → [sdk-agent-consumer](../sdk-agent-consumer)\n- **Registry Central**: Run your own registry → [registry-central](../registry-central)\n\n---\n\n## 🚢 Publishing to NPM\n\nTo publish your provider agent as a package:\n\n```bash\n# Build\nnpm run build\n\n# Publish\nnpm publish --access public\n```\n\n---\n\n## 📝 Next Steps\n\nAfter creating your provider agent:\n\n1. **Start Registry Central**\n   ```bash\n   cd ../registry-central\n   docker-compose up\n   ```\n\n2. **Start your provider agent**\n   ```bash\n   npm run example\n   ```\n\n3. **Test with Consumer SDK**\n   ```bash\n   cd ../sdk-agent-consumer\n   npm run example\n   ```\n\n4. **Verify registration**\n   ```bash\n   curl https://automata-dev.apptrixcloud.com/search \\\n     -H \"Authorization: Bearer YOUR_JWT\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"categories\":[\"food\"],\"limit\":10}'\n   ```\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-1ddc12446f858abfbad82b5460d29c17"}