Create AtlasClaw Provider
Guide for creating new providers that integrate external systems with the AtlasClaw AI Agent.
Quick Start Checklist
Provider Creation Progress:
- [ ] 1. Gather requirements (system type, auth method, capabilities)
- [ ] 2. Create provider directory structure
- [ ] 3. Write PROVIDER.md with LLM context fields
- [ ] 4. Create skills for each capability
- [ ] 5. Add configuration to atlasclaw.json
- [ ] 6. Test provider loading and skill execution
Phase 1: Gather Requirements
Before creating a provider, determine:
| Question |
Example Answer |
| Provider type |
servicenow, github, datadog |
| Display name |
ServiceNow, GitHub, Datadog |
| Authentication method |
Basic Auth, API Token, OAuth 2.0, Cookie |
| Base URL pattern |
https://instance.service-now.com |
| Key capabilities |
CRUD incidents, manage users, query metrics |
| Target keywords |
incident, ticket, alert, deployment |
Phase 2: Directory Structure
Create provider at: {workspace}/providers/{provider-name}/
providers/{provider-name}/
├── PROVIDER.md # Required - provider metadata and documentation
├── README.md # Optional - human documentation
├── skills/ # Required - at least one skill
│ └── {skill-name}/
│ ├── SKILL.md # Required - skill metadata
│ └── scripts/ # Required for executable skills
│ └── handler.py
└── references/ # Optional - API docs, mappings
└── api_mapping.md
Phase 3: PROVIDER.md Template
---
# === Required Fields ===
provider_type: {provider-name} # Must match directory name
display_name: {Display Name}
version: "1.0.0"
# === LLM Context Fields (for Skill Discovery) ===
keywords:
- keyword1 # Domain-specific terms users might say
- keyword2
- keyword3
capabilities:
- Capability description 1
- Capability description 2
use_when:
- User intent scenario 1
- User intent scenario 2
avoid_when:
- Scenario when other provider is better (suggest alternative)
---
# {Display Name} Provider
Brief description of what this provider integrates with.
## Connection Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `base_url` | string | Yes | API base URL |
| `username` | string | Conditional | Username for auth |
| `password` | string | Conditional | Password or token |
| `api_key` | string | Conditional | API key if applicable |
## Authentication Modes
| Mode | Parameters | Notes |
|------|------------|-------|
| Basic Auth | `username` + `password` | Standard HTTP Basic |
| API Token | `api_key` | Bearer token auth |
## Configuration Example
```json
{
"service_providers": {
"{provider-name}": {
"default": {
"base_url": "${PROVIDER_URL}",
"api_key": "${PROVIDER_API_KEY}"
}
}
}
}
Environment Variables
PROVIDER_URL=https://api.example.com
PROVIDER_API_KEY=your-api-key
Provided Skills
| Skill |
Description |
{provider}-{action} |
Brief description |
## Phase 4: SKILL.md Template
```yaml
---
name: "{provider}-{action}"
description: "Brief description. Trigger when user wants to {action}."
category: "provider:{provider-name}"
provider_type: "{provider-name}"
instance_required: "true"
# === LLM Context Fields ===
triggers:
- action phrase 1
- action phrase 2
use_when:
- User intent scenario 1
- User intent scenario 2
avoid_when:
- Scenario when other skill is better
examples:
- "Example user input 1"
- "Example user input 2"
related:
- related-skill-1
- related-skill-2
# === Tool Registration ===
tool_name: "{provider}_{action}"
tool_entrypoint: "scripts/handler.py:handler"
---
# {provider}-{action}
## Purpose
What this skill does and when to use it.
## Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| param1 | string | Yes | Description |
| param2 | integer | No | Description (default: 10) |
## Usage Examples
**Example 1**: Basic usage
```bash
python scripts/handler.py --param1 "value"
Error Handling
| Error |
Cause |
Resolution |
| AUTH_FAILED |
Invalid credentials |
Check API key |
## Phase 5: Handler Template
Create `scripts/handler.py`:
```python
# -*- coding: utf-8 -*-
"""
{Skill Name} Handler
Implements the {action} functionality for {Provider} provider.
"""
from __future__ import annotations
import argparse
import json
import os
import sys
from typing import Any, Optional
import requests
def get_provider_config() -> dict[str, Any]:
"""Load provider configuration from atlasclaw.json."""
config_path = os.environ.get("ATLASCLAW_CONFIG", "atlasclaw.json")
with open(config_path, "r", encoding="utf-8") as f:
config = json.load(f)
provider_config = config.get("service_providers", {}).get("{provider-name}", {})
instance = os.environ.get("PROVIDER_INSTANCE", "default")
return provider_config.get(instance, {})
def handler(params: dict[str, Any]) -> dict[str, Any]:
"""
Main handler function.
Args:
params: Input parameters
Returns:
Result dictionary with success, message, and data
"""
config = get_provider_config()
base_url = config.get("base_url", "").rstrip("/")
api_key = config.get("api_key", "")
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
try:
# Implement API call here
response = requests.get(
f"{base_url}/api/endpoint",
headers=headers,
timeout=30
)
response.raise_for_status()
return {
"success": True,
"message": "Operation completed successfully",
"data": response.json()
}
except requests.RequestException as e:
return {
"success": False,
"message": f"API request failed: {str(e)}",
"error": {"code": "API_ERROR", "details": str(e)}
}
def main():
"""CLI entry point."""
parser = argparse.ArgumentParser(description="{Skill description}")
parser.add_argument("--param1", required=True, help="Parameter 1")
parser.add_argument("--param2", type=int, default=10, help="Parameter 2")
args = parser.parse_args()
result = handler({
"param1": args.param1,
"param2": args.param2
})
print(json.dumps(result, indent=2))
sys.exit(0 if result["success"] else 1)
if __name__ == "__main__":
main()
Phase 6: Configuration
Add to atlasclaw.json:
{
"service_providers": {
"{provider-name}": {
"default": {
"base_url": "${PROVIDER_URL}",
"api_key": "${PROVIDER_API_KEY}"
},
"production": {
"base_url": "${PROVIDER_PROD_URL}",
"api_key": "${PROVIDER_PROD_API_KEY}"
}
}
}
}
Add to .env:
PROVIDER_URL=https://api.example.com
PROVIDER_API_KEY=your-api-key
Phase 7: Verification
- Restart service (or wait for hot reload)
- Check logs for provider loading:
[AtlasClaw] Provider loaded: {provider-name}
[AtlasClaw] Skills loaded: X from {provider-name}
- Test via API:
curl http://localhost:8000/api/skills | grep {provider-name}
LLM Context Best Practices
Keywords
- Use domain-specific terms users naturally say
- Avoid generic terms like "create", "update", "manage"
- Include abbreviations and synonyms
use_when
- Describe user intent, not technical actions
- Focus on business scenarios
- Include common phrasings
avoid_when
- Critical for disambiguation between similar providers
- Always suggest the correct alternative
- Include commonly confused scenarios
Common Provider Types
| Type |
Examples |
Typical Keywords |
| ITSM |
ServiceNow, Jira |
incident, ticket, issue, sprint |
| Monitoring |
Datadog, Prometheus |
alert, metric, dashboard |
| Communication |
Slack, Teams |
message, channel, notification |
| Version Control |
GitHub, GitLab |
repository, PR, merge, commit |
| CRM |
Salesforce |
lead, opportunity, account |
| Cloud |
AWS, Azure |
instance, resource, deployment |
Additional Resources
- PROVIDER_GUIDE.md - Full documentation
- SKILL_GUIDE.md - Skill development guide
- Jira Provider - Reference implementation
1---2name: create-provider3description: Create new AtlasClaw providers with proper structure, documentation, and skills. Use when building integrations with external systems like APIs, ITSM, CRM, or custom services.4---56# Create AtlasClaw Provider78Guide for creating new providers that integrate external systems with the AtlasClaw AI Agent.910## Quick Start Checklist1112```13Provider Creation Progress:14- [ ] 1. Gather requirements (system type, auth method, capabilities)15- [ ] 2. Create provider directory structure16- [ ] 3. Write PROVIDER.md with LLM context fields17- [ ] 4. Create skills for each capability18- [ ] 5. Add configuration to atlasclaw.json19- [ ] 6. Test provider loading and skill execution20```2122## Phase 1: Gather Requirements2324Before creating a provider, determine:2526| Question | Example Answer |27|----------|----------------|28| **Provider type** | `servicenow`, `github`, `datadog` |29| **Display name** | ServiceNow, GitHub, Datadog |30| **Authentication method** | Basic Auth, API Token, OAuth 2.0, Cookie |31| **Base URL pattern** | `https://instance.service-now.com` |32| **Key capabilities** | CRUD incidents, manage users, query metrics |33| **Target keywords** | incident, ticket, alert, deployment |3435## Phase 2: Directory Structure3637Create provider at: `{workspace}/providers/{provider-name}/`3839```40providers/{provider-name}/41├── PROVIDER.md # Required - provider metadata and documentation42├── README.md # Optional - human documentation43├── skills/ # Required - at least one skill44│ └── {skill-name}/45│ ├── SKILL.md # Required - skill metadata46│ └── scripts/ # Required for executable skills47│ └── handler.py48└── references/ # Optional - API docs, mappings49 └── api_mapping.md50```5152## Phase 3: PROVIDER.md Template5354```yaml55---56# === Required Fields ===57provider_type: {provider-name} # Must match directory name58display_name: {Display Name}59version: "1.0.0"6061# === LLM Context Fields (for Skill Discovery) ===62keywords:63 - keyword1 # Domain-specific terms users might say64 - keyword265 - keyword36667capabilities:68 - Capability description 169 - Capability description 27071use_when:72 - User intent scenario 173 - User intent scenario 27475avoid_when:76 - Scenario when other provider is better (suggest alternative)77---7879# {Display Name} Provider8081Brief description of what this provider integrates with.8283## Connection Parameters8485| Parameter | Type | Required | Description |86|-----------|------|----------|-------------|87| `base_url` | string | Yes | API base URL |88| `username` | string | Conditional | Username for auth |89| `password` | string | Conditional | Password or token |90| `api_key` | string | Conditional | API key if applicable |9192## Authentication Modes9394| Mode | Parameters | Notes |95|------|------------|-------|96| Basic Auth | `username` + `password` | Standard HTTP Basic |97| API Token | `api_key` | Bearer token auth |9899## Configuration Example100101```json102{103 "service_providers": {104 "{provider-name}": {105 "default": {106 "base_url": "${PROVIDER_URL}",107 "api_key": "${PROVIDER_API_KEY}"108 }109 }110 }111}112```113114## Environment Variables115116```bash117PROVIDER_URL=https://api.example.com118PROVIDER_API_KEY=your-api-key119```120121## Provided Skills122123| Skill | Description |124|-------|-------------|125| `{provider}-{action}` | Brief description |126```127128## Phase 4: SKILL.md Template129130```yaml131---132name: "{provider}-{action}"133description: "Brief description. Trigger when user wants to {action}."134category: "provider:{provider-name}"135provider_type: "{provider-name}"136instance_required: "true"137138# === LLM Context Fields ===139triggers:140 - action phrase 1141 - action phrase 2142143use_when:144 - User intent scenario 1145 - User intent scenario 2146147avoid_when:148 - Scenario when other skill is better149150examples:151 - "Example user input 1"152 - "Example user input 2"153154related:155 - related-skill-1156 - related-skill-2157158# === Tool Registration ===159tool_name: "{provider}_{action}"160tool_entrypoint: "scripts/handler.py:handler"161---162163# {provider}-{action}164165## Purpose166167What this skill does and when to use it.168169## Parameters170171| Name | Type | Required | Description |172|------|------|----------|-------------|173| param1 | string | Yes | Description |174| param2 | integer | No | Description (default: 10) |175176## Usage Examples177178**Example 1**: Basic usage179```bash180python scripts/handler.py --param1 "value"181```182183## Error Handling184185| Error | Cause | Resolution |186|-------|-------|------------|187| AUTH_FAILED | Invalid credentials | Check API key |188```189190## Phase 5: Handler Template191192Create `scripts/handler.py`:193194```python195# -*- coding: utf-8 -*-196"""197{Skill Name} Handler198199Implements the {action} functionality for {Provider} provider.200"""201from __future__ import annotations202203import argparse204import json205import os206import sys207from typing import Any, Optional208209import requests210211212def get_provider_config() -> dict[str, Any]:213 """Load provider configuration from atlasclaw.json."""214 config_path = os.environ.get("ATLASCLAW_CONFIG", "atlasclaw.json")215 with open(config_path, "r", encoding="utf-8") as f:216 config = json.load(f)217 218 provider_config = config.get("service_providers", {}).get("{provider-name}", {})219 instance = os.environ.get("PROVIDER_INSTANCE", "default")220 return provider_config.get(instance, {})221222223def handler(params: dict[str, Any]) -> dict[str, Any]:224 """225 Main handler function.226 227 Args:228 params: Input parameters229 230 Returns:231 Result dictionary with success, message, and data232 """233 config = get_provider_config()234 base_url = config.get("base_url", "").rstrip("/")235 api_key = config.get("api_key", "")236 237 headers = {238 "Authorization": f"Bearer {api_key}",239 "Content-Type": "application/json"240 }241 242 try:243 # Implement API call here244 response = requests.get(245 f"{base_url}/api/endpoint",246 headers=headers,247 timeout=30248 )249 response.raise_for_status()250 251 return {252 "success": True,253 "message": "Operation completed successfully",254 "data": response.json()255 }256 except requests.RequestException as e:257 return {258 "success": False,259 "message": f"API request failed: {str(e)}",260 "error": {"code": "API_ERROR", "details": str(e)}261 }262263264def main():265 """CLI entry point."""266 parser = argparse.ArgumentParser(description="{Skill description}")267 parser.add_argument("--param1", required=True, help="Parameter 1")268 parser.add_argument("--param2", type=int, default=10, help="Parameter 2")269 270 args = parser.parse_args()271 272 result = handler({273 "param1": args.param1,274 "param2": args.param2275 })276 277 print(json.dumps(result, indent=2))278 sys.exit(0 if result["success"] else 1)279280281if __name__ == "__main__":282 main()283```284285## Phase 6: Configuration286287Add to `atlasclaw.json`:288289```json290{291 "service_providers": {292 "{provider-name}": {293 "default": {294 "base_url": "${PROVIDER_URL}",295 "api_key": "${PROVIDER_API_KEY}"296 },297 "production": {298 "base_url": "${PROVIDER_PROD_URL}",299 "api_key": "${PROVIDER_PROD_API_KEY}"300 }301 }302 }303}304```305306Add to `.env`:307308```bash309PROVIDER_URL=https://api.example.com310PROVIDER_API_KEY=your-api-key311```312313## Phase 7: Verification3143151. **Restart service** (or wait for hot reload)3162. **Check logs** for provider loading:317 ```318 [AtlasClaw] Provider loaded: {provider-name}319 [AtlasClaw] Skills loaded: X from {provider-name}320 ```3213. **Test via API**:322 ```bash323 curl http://localhost:8000/api/skills | grep {provider-name}324 ```325326## LLM Context Best Practices327328### Keywords329- Use domain-specific terms users naturally say330- Avoid generic terms like "create", "update", "manage"331- Include abbreviations and synonyms332333### use_when334- Describe user intent, not technical actions335- Focus on business scenarios336- Include common phrasings337338### avoid_when339- Critical for disambiguation between similar providers340- Always suggest the correct alternative341- Include commonly confused scenarios342343## Common Provider Types344345| Type | Examples | Typical Keywords |346|------|----------|------------------|347| ITSM | ServiceNow, Jira | incident, ticket, issue, sprint |348| Monitoring | Datadog, Prometheus | alert, metric, dashboard |349| Communication | Slack, Teams | message, channel, notification |350| Version Control | GitHub, GitLab | repository, PR, merge, commit |351| CRM | Salesforce | lead, opportunity, account |352| Cloud | AWS, Azure | instance, resource, deployment |353354## Additional Resources355356- [PROVIDER_GUIDE.md](file:///c:/Projects/cmps/atlasclaw/docs/PROVIDER_GUIDE.md) - Full documentation357- [SKILL_GUIDE.md](file:///c:/Projects/cmps/atlasclaw/docs/SKILL_GUIDE.md) - Skill development guide358- [Jira Provider](file:///c:/Projects/cmps/atlasclaw/.atlasclaw/providers/jira) - Reference implementation