@lobu/cli 3.0.5 → 3.0.6
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.
- package/dist/mcp-servers.json +216 -0
- package/dist/system-skills.json +364 -0
- package/dist/templates/.env.tmpl +18 -0
- package/dist/templates/.gitignore.tmpl +33 -0
- package/dist/templates/AGENTS.md.tmpl +1 -0
- package/dist/templates/Dockerfile.worker.tmpl +29 -0
- package/dist/templates/README.md.tmpl +94 -0
- package/dist/templates/TESTING.md.tmpl +225 -0
- package/package.json +1 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
{
|
|
2
|
+
"servers": [
|
|
3
|
+
{
|
|
4
|
+
"id": "github",
|
|
5
|
+
"name": "GitHub",
|
|
6
|
+
"description": "Access repositories, issues, and code search",
|
|
7
|
+
"type": "oauth",
|
|
8
|
+
"config": {
|
|
9
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
10
|
+
"oauth": {
|
|
11
|
+
"authUrl": "https://github.com/login/oauth/authorize",
|
|
12
|
+
"tokenUrl": "https://github.com/login/oauth/access_token",
|
|
13
|
+
"clientId": "${GITHUB_CLIENT_ID}",
|
|
14
|
+
"clientSecret": "${env:GITHUB_CLIENT_SECRET}",
|
|
15
|
+
"scopes": ["repo", "read:user"],
|
|
16
|
+
"grantType": "authorization_code",
|
|
17
|
+
"responseType": "code"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"setupInstructions": "1. Create a GitHub OAuth App at https://github.com/settings/developers\n2. Set Authorization callback URL to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Client ID and Client Secret\n4. Add GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET to your .env file"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "playwright",
|
|
24
|
+
"name": "Playwright",
|
|
25
|
+
"description": "Browser automation and web testing",
|
|
26
|
+
"type": "command",
|
|
27
|
+
"config": {
|
|
28
|
+
"command": "npx",
|
|
29
|
+
"args": ["-y", "@modelcontextprotocol/server-playwright"]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "figma",
|
|
34
|
+
"name": "Figma",
|
|
35
|
+
"description": "Access design files and components",
|
|
36
|
+
"type": "oauth",
|
|
37
|
+
"config": {
|
|
38
|
+
"url": "https://api.figma.com/v1/",
|
|
39
|
+
"oauth": {
|
|
40
|
+
"authUrl": "https://www.figma.com/oauth",
|
|
41
|
+
"tokenUrl": "https://www.figma.com/api/oauth/token",
|
|
42
|
+
"clientId": "${FIGMA_CLIENT_ID}",
|
|
43
|
+
"clientSecret": "${env:FIGMA_CLIENT_SECRET}",
|
|
44
|
+
"scopes": ["file_read"],
|
|
45
|
+
"grantType": "authorization_code",
|
|
46
|
+
"responseType": "code"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"setupInstructions": "1. Create a Figma App at https://www.figma.com/developers/apps\n2. Set Redirect URI to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Client ID and Client Secret\n4. Add FIGMA_CLIENT_ID and FIGMA_CLIENT_SECRET to your .env file"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "notion",
|
|
53
|
+
"name": "Notion",
|
|
54
|
+
"description": "Access and manage Notion pages and databases",
|
|
55
|
+
"type": "oauth",
|
|
56
|
+
"config": {
|
|
57
|
+
"url": "https://mcp.notion.com/mcp",
|
|
58
|
+
"oauth": {
|
|
59
|
+
"authUrl": "https://api.notion.com/v1/oauth/authorize",
|
|
60
|
+
"tokenUrl": "https://api.notion.com/v1/oauth/token",
|
|
61
|
+
"clientId": "${NOTION_CLIENT_ID}",
|
|
62
|
+
"clientSecret": "${env:NOTION_CLIENT_SECRET}",
|
|
63
|
+
"scopes": [],
|
|
64
|
+
"grantType": "authorization_code",
|
|
65
|
+
"responseType": "code"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"setupInstructions": "1. Create a Notion Integration at https://www.notion.so/my-integrations\n2. Set Redirect URI to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the OAuth Client ID and Secret\n4. Add NOTION_CLIENT_ID and NOTION_CLIENT_SECRET to your .env file"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "firecrawl",
|
|
72
|
+
"name": "Firecrawl",
|
|
73
|
+
"description": "Web scraping and content extraction",
|
|
74
|
+
"type": "api-key",
|
|
75
|
+
"config": {
|
|
76
|
+
"command": "npx",
|
|
77
|
+
"args": ["-y", "@firecrawl/mcp-server"],
|
|
78
|
+
"env": {
|
|
79
|
+
"FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"setupInstructions": "1. Get API key from https://www.firecrawl.dev/dashboard\n2. Add FIRECRAWL_API_KEY to your .env file"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "grafana",
|
|
86
|
+
"name": "Grafana",
|
|
87
|
+
"description": "Access dashboards and metrics",
|
|
88
|
+
"type": "api-key",
|
|
89
|
+
"config": {
|
|
90
|
+
"url": "${GRAFANA_URL}/api",
|
|
91
|
+
"headers": {
|
|
92
|
+
"Authorization": "Bearer ${env:GRAFANA_API_KEY}"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"setupInstructions": "1. Create a Service Account in your Grafana instance\n2. Generate an API token\n3. Add GRAFANA_URL and GRAFANA_API_KEY to your .env file"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "jira",
|
|
99
|
+
"name": "Atlassian Jira",
|
|
100
|
+
"description": "Access and manage Jira issues",
|
|
101
|
+
"type": "oauth",
|
|
102
|
+
"config": {
|
|
103
|
+
"url": "https://api.atlassian.com",
|
|
104
|
+
"oauth": {
|
|
105
|
+
"authUrl": "https://auth.atlassian.com/authorize",
|
|
106
|
+
"tokenUrl": "https://auth.atlassian.com/oauth/token",
|
|
107
|
+
"clientId": "${JIRA_CLIENT_ID}",
|
|
108
|
+
"clientSecret": "${env:JIRA_CLIENT_SECRET}",
|
|
109
|
+
"scopes": ["read:jira-work", "read:jira-user", "write:jira-work"],
|
|
110
|
+
"grantType": "authorization_code",
|
|
111
|
+
"responseType": "code"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"setupInstructions": "1. Create an OAuth 2.0 app at https://developer.atlassian.com/console/myapps/\n2. Set Callback URL to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Client ID and Secret\n4. Add JIRA_CLIENT_ID and JIRA_CLIENT_SECRET to your .env file"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "datadog",
|
|
118
|
+
"name": "Datadog",
|
|
119
|
+
"description": "Monitor logs and metrics",
|
|
120
|
+
"type": "api-key",
|
|
121
|
+
"config": {
|
|
122
|
+
"url": "https://api.datadoghq.com/api/v2",
|
|
123
|
+
"headers": {
|
|
124
|
+
"DD-API-KEY": "${env:DATADOG_API_KEY}",
|
|
125
|
+
"DD-APPLICATION-KEY": "${env:DATADOG_APP_KEY}"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"setupInstructions": "1. Go to https://app.datadoghq.com/organization-settings/api-keys\n2. Create an API Key and Application Key\n3. Add DATADOG_API_KEY and DATADOG_APP_KEY to your .env file"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "google-calendar",
|
|
132
|
+
"name": "Google Calendar",
|
|
133
|
+
"description": "Access and manage calendar events",
|
|
134
|
+
"type": "oauth",
|
|
135
|
+
"config": {
|
|
136
|
+
"url": "https://www.googleapis.com/calendar/v3",
|
|
137
|
+
"oauth": {
|
|
138
|
+
"authUrl": "https://accounts.google.com/o/oauth2/v2/auth",
|
|
139
|
+
"tokenUrl": "https://oauth2.googleapis.com/token",
|
|
140
|
+
"clientId": "${GOOGLE_CLIENT_ID}",
|
|
141
|
+
"clientSecret": "${env:GOOGLE_CLIENT_SECRET}",
|
|
142
|
+
"scopes": ["https://www.googleapis.com/auth/calendar.readonly"],
|
|
143
|
+
"grantType": "authorization_code",
|
|
144
|
+
"responseType": "code"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"setupInstructions": "1. Create OAuth credentials at https://console.cloud.google.com/apis/credentials\n2. Set Authorized redirect URI to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Client ID and Client Secret\n4. Add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET to your .env file"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "sentry",
|
|
151
|
+
"name": "Sentry",
|
|
152
|
+
"description": "Access error tracking and performance monitoring",
|
|
153
|
+
"type": "none",
|
|
154
|
+
"config": {
|
|
155
|
+
"url": "https://mcp.sentry.dev/mcp"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "linear",
|
|
160
|
+
"name": "Linear",
|
|
161
|
+
"description": "Manage issues and projects",
|
|
162
|
+
"type": "oauth",
|
|
163
|
+
"config": {
|
|
164
|
+
"url": "https://api.linear.app/graphql",
|
|
165
|
+
"oauth": {
|
|
166
|
+
"authUrl": "https://linear.app/oauth/authorize",
|
|
167
|
+
"tokenUrl": "https://api.linear.app/oauth/token",
|
|
168
|
+
"clientId": "${LINEAR_CLIENT_ID}",
|
|
169
|
+
"clientSecret": "${env:LINEAR_CLIENT_SECRET}",
|
|
170
|
+
"scopes": ["read", "write"],
|
|
171
|
+
"grantType": "authorization_code",
|
|
172
|
+
"responseType": "code"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"setupInstructions": "1. Create OAuth app at https://linear.app/settings/api\n2. Set Redirect URL to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Client ID and Client Secret\n4. Add LINEAR_CLIENT_ID and LINEAR_CLIENT_SECRET to your .env file"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "discord",
|
|
179
|
+
"name": "Discord",
|
|
180
|
+
"description": "Access Discord servers and channels",
|
|
181
|
+
"type": "oauth",
|
|
182
|
+
"config": {
|
|
183
|
+
"url": "https://discord.com/api/v10",
|
|
184
|
+
"oauth": {
|
|
185
|
+
"authUrl": "https://discord.com/oauth2/authorize",
|
|
186
|
+
"tokenUrl": "https://discord.com/api/oauth2/token",
|
|
187
|
+
"clientId": "${DISCORD_CLIENT_ID}",
|
|
188
|
+
"clientSecret": "${env:DISCORD_CLIENT_SECRET}",
|
|
189
|
+
"scopes": ["identify", "guilds", "messages.read"],
|
|
190
|
+
"grantType": "authorization_code",
|
|
191
|
+
"responseType": "code"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"setupInstructions": "1. Create Discord app at https://discord.com/developers/applications\n2. Set Redirect URL to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Client ID and Client Secret\n4. Add DISCORD_CLIENT_ID and DISCORD_CLIENT_SECRET to your .env file"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"id": "gitlab",
|
|
198
|
+
"name": "GitLab",
|
|
199
|
+
"description": "Access GitLab repositories and issues",
|
|
200
|
+
"type": "oauth",
|
|
201
|
+
"config": {
|
|
202
|
+
"url": "https://gitlab.com/api/v4",
|
|
203
|
+
"oauth": {
|
|
204
|
+
"authUrl": "https://gitlab.com/oauth/authorize",
|
|
205
|
+
"tokenUrl": "https://gitlab.com/oauth/token",
|
|
206
|
+
"clientId": "${GITLAB_CLIENT_ID}",
|
|
207
|
+
"clientSecret": "${env:GITLAB_CLIENT_SECRET}",
|
|
208
|
+
"scopes": ["api", "read_user"],
|
|
209
|
+
"grantType": "authorization_code",
|
|
210
|
+
"responseType": "code"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"setupInstructions": "1. Create GitLab application at https://gitlab.com/-/profile/applications\n2. Set Redirect URI to: {PUBLIC_URL}/mcp/oauth/callback\n3. Copy the Application ID and Secret\n4. Add GITLAB_CLIENT_ID and GITLAB_CLIENT_SECRET to your .env file"
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
}
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skills": [
|
|
3
|
+
{
|
|
4
|
+
"id": "owletto",
|
|
5
|
+
"name": "Owletto Memory",
|
|
6
|
+
"description": "Long-term memory across conversations. Use when you need to remember user preferences, recall past context, or store important facts.",
|
|
7
|
+
"instructions": "Check Owletto memory at the start of each conversation for relevant context. Store important user preferences, facts, and decisions.",
|
|
8
|
+
"hidden": true,
|
|
9
|
+
"mcpServers": [
|
|
10
|
+
{
|
|
11
|
+
"id": "owletto",
|
|
12
|
+
"name": "Owletto",
|
|
13
|
+
"url": "${env:MEMORY_URL}",
|
|
14
|
+
"type": "sse"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "github",
|
|
20
|
+
"name": "GitHub",
|
|
21
|
+
"description": "Repos, issues, pull requests, and code access",
|
|
22
|
+
"instructions": "Use Owletto MCP tools for GitHub API access (issues, PRs, repos). For git operations, use the CLI directly — network permissions are granted for github.com.",
|
|
23
|
+
"permissions": ["github.com", ".github.com", ".githubusercontent.com"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "google-workspace",
|
|
27
|
+
"name": "Google Workspace",
|
|
28
|
+
"description": "Gmail, Calendar, and Drive integration",
|
|
29
|
+
"instructions": "Use Owletto MCP tools for Google Workspace API access (Gmail, Calendar, Drive)."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "linear",
|
|
33
|
+
"name": "Linear",
|
|
34
|
+
"description": "Issue tracking and project management",
|
|
35
|
+
"instructions": "Use Owletto MCP tools for Linear API access (issues, projects, cycles)."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "notion",
|
|
39
|
+
"name": "Notion",
|
|
40
|
+
"description": "Workspace pages, databases, and content",
|
|
41
|
+
"instructions": "Use Owletto MCP tools for Notion API access (pages, databases, blocks)."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "jira",
|
|
45
|
+
"name": "Jira",
|
|
46
|
+
"description": "Atlassian Jira project and issue management",
|
|
47
|
+
"instructions": "Use Owletto MCP tools for Jira API access (issues, projects, boards)."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "sentry",
|
|
51
|
+
"name": "Sentry",
|
|
52
|
+
"description": "Error tracking and performance monitoring",
|
|
53
|
+
"instructions": "Use Owletto MCP tools for Sentry API access (issues, events, releases)."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "microsoft-365",
|
|
57
|
+
"name": "Microsoft 365",
|
|
58
|
+
"description": "Outlook, OneDrive, and Teams integration",
|
|
59
|
+
"instructions": "Use Owletto MCP tools for Microsoft 365 API access (Mail, Calendar, Files, Teams)."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "spotify",
|
|
63
|
+
"name": "Spotify",
|
|
64
|
+
"description": "Music playback, playlists, and library",
|
|
65
|
+
"instructions": "Use Owletto MCP tools for Spotify API access (player, playlists, library, search)."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "groq",
|
|
69
|
+
"name": "Groq",
|
|
70
|
+
"description": "Fast LLM inference via Groq",
|
|
71
|
+
"providers": [
|
|
72
|
+
{
|
|
73
|
+
"displayName": "Groq",
|
|
74
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=groq.com&sz=128",
|
|
75
|
+
"envVarName": "GROQ_API_KEY",
|
|
76
|
+
"upstreamBaseUrl": "https://api.groq.com/openai",
|
|
77
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://console.groq.com/keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Groq Console</a>",
|
|
78
|
+
"apiKeyPlaceholder": "gsk_...",
|
|
79
|
+
"sdkCompat": "openai",
|
|
80
|
+
"defaultModel": "llama-3.3-70b-versatile",
|
|
81
|
+
"modelsEndpoint": "/v1/models",
|
|
82
|
+
"stt": {
|
|
83
|
+
"enabled": true,
|
|
84
|
+
"sdkCompat": "openai",
|
|
85
|
+
"transcriptionPath": "/v1/audio/transcriptions",
|
|
86
|
+
"model": "whisper-large-v3-turbo"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "gemini",
|
|
93
|
+
"name": "Gemini",
|
|
94
|
+
"description": "Google Gemini models",
|
|
95
|
+
"providers": [
|
|
96
|
+
{
|
|
97
|
+
"displayName": "Gemini",
|
|
98
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=gemini.google.com&sz=128",
|
|
99
|
+
"envVarName": "GEMINI_API_KEY",
|
|
100
|
+
"upstreamBaseUrl": "https://generativelanguage.googleapis.com/v1beta/openai",
|
|
101
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://aistudio.google.com/apikey\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Google AI Studio</a>",
|
|
102
|
+
"apiKeyPlaceholder": "AIza...",
|
|
103
|
+
"sdkCompat": "openai",
|
|
104
|
+
"defaultModel": "gemini-2.0-flash",
|
|
105
|
+
"modelsEndpoint": "/v1/models"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "together-ai",
|
|
111
|
+
"name": "Together AI",
|
|
112
|
+
"description": "Open-source models hosted by Together",
|
|
113
|
+
"providers": [
|
|
114
|
+
{
|
|
115
|
+
"displayName": "Together AI",
|
|
116
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=together.ai&sz=128",
|
|
117
|
+
"envVarName": "TOGETHER_API_KEY",
|
|
118
|
+
"upstreamBaseUrl": "https://api.together.xyz/v1",
|
|
119
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://api.together.ai/settings/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Together AI Dashboard</a>",
|
|
120
|
+
"apiKeyPlaceholder": "tok_...",
|
|
121
|
+
"sdkCompat": "openai",
|
|
122
|
+
"defaultModel": "meta-llama/Llama-3.3-70B-Instruct-Turbo",
|
|
123
|
+
"modelsEndpoint": "/v1/models"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "nvidia",
|
|
129
|
+
"name": "NVIDIA NIM",
|
|
130
|
+
"description": "NVIDIA-hosted models and inference APIs",
|
|
131
|
+
"providers": [
|
|
132
|
+
{
|
|
133
|
+
"displayName": "NVIDIA NIM (free)",
|
|
134
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=nvidia.com&sz=128",
|
|
135
|
+
"envVarName": "NVIDIA_API_KEY",
|
|
136
|
+
"upstreamBaseUrl": "https://integrate.api.nvidia.com/v1",
|
|
137
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://build.nvidia.com/settings/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">NVIDIA Build</a>",
|
|
138
|
+
"apiKeyPlaceholder": "nvapi-...",
|
|
139
|
+
"sdkCompat": "openai",
|
|
140
|
+
"modelsEndpoint": "/v1/models",
|
|
141
|
+
"defaultModel": "nvidia/moonshotai/kimi-k2.5"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "z-ai",
|
|
147
|
+
"name": "z.ai",
|
|
148
|
+
"description": "z.ai coding and reasoning models",
|
|
149
|
+
"providers": [
|
|
150
|
+
{
|
|
151
|
+
"displayName": "z.ai",
|
|
152
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=z.ai&sz=128",
|
|
153
|
+
"envVarName": "Z_AI_API_KEY",
|
|
154
|
+
"upstreamBaseUrl": "https://api.z.ai/api/coding/paas/v4",
|
|
155
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://z.ai/manage-apikey/apikey-list\" target=\"_blank\" class=\"text-blue-600 hover:underline\">z.ai</a>",
|
|
156
|
+
"apiKeyPlaceholder": "zai-...",
|
|
157
|
+
"sdkCompat": "openai"
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "elevenlabs",
|
|
163
|
+
"name": "ElevenLabs",
|
|
164
|
+
"description": "Voice and speech models",
|
|
165
|
+
"providers": [
|
|
166
|
+
{
|
|
167
|
+
"displayName": "ElevenLabs",
|
|
168
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=elevenlabs.io&sz=128",
|
|
169
|
+
"envVarName": "ELEVENLABS_API_KEY",
|
|
170
|
+
"upstreamBaseUrl": "https://api.elevenlabs.io",
|
|
171
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://elevenlabs.io/app/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">ElevenLabs</a>",
|
|
172
|
+
"apiKeyPlaceholder": "sk_...",
|
|
173
|
+
"sdkCompat": "openai"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "fireworks",
|
|
179
|
+
"name": "Fireworks AI",
|
|
180
|
+
"description": "Fast inference for open-source models",
|
|
181
|
+
"providers": [
|
|
182
|
+
{
|
|
183
|
+
"displayName": "Fireworks AI",
|
|
184
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=fireworks.ai&sz=128",
|
|
185
|
+
"envVarName": "FIREWORKS_API_KEY",
|
|
186
|
+
"upstreamBaseUrl": "https://api.fireworks.ai/inference/v1",
|
|
187
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://fireworks.ai/account/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Fireworks Dashboard</a>",
|
|
188
|
+
"apiKeyPlaceholder": "fw_...",
|
|
189
|
+
"sdkCompat": "openai",
|
|
190
|
+
"defaultModel": "accounts/fireworks/models/llama-v3p3-70b-instruct",
|
|
191
|
+
"modelsEndpoint": "/v1/models"
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "mistral",
|
|
197
|
+
"name": "Mistral",
|
|
198
|
+
"description": "Mistral AI models",
|
|
199
|
+
"providers": [
|
|
200
|
+
{
|
|
201
|
+
"displayName": "Mistral",
|
|
202
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=mistral.ai&sz=128",
|
|
203
|
+
"envVarName": "MISTRAL_API_KEY",
|
|
204
|
+
"upstreamBaseUrl": "https://api.mistral.ai/v1",
|
|
205
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://console.mistral.ai/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Mistral Console</a>",
|
|
206
|
+
"apiKeyPlaceholder": "sk-...",
|
|
207
|
+
"sdkCompat": "openai",
|
|
208
|
+
"defaultModel": "mistral-large-latest",
|
|
209
|
+
"modelsEndpoint": "/v1/models"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"id": "deepseek",
|
|
215
|
+
"name": "DeepSeek",
|
|
216
|
+
"description": "DeepSeek reasoning and coding models",
|
|
217
|
+
"providers": [
|
|
218
|
+
{
|
|
219
|
+
"displayName": "DeepSeek",
|
|
220
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=deepseek.com&sz=128",
|
|
221
|
+
"envVarName": "DEEPSEEK_API_KEY",
|
|
222
|
+
"upstreamBaseUrl": "https://api.deepseek.com",
|
|
223
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://platform.deepseek.com/api_keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">DeepSeek Platform</a>",
|
|
224
|
+
"apiKeyPlaceholder": "sk-...",
|
|
225
|
+
"sdkCompat": "openai",
|
|
226
|
+
"defaultModel": "deepseek-chat",
|
|
227
|
+
"modelsEndpoint": "/v1/models"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "openrouter",
|
|
233
|
+
"name": "OpenRouter",
|
|
234
|
+
"description": "Multi-provider model router with per-user billing",
|
|
235
|
+
"providers": [
|
|
236
|
+
{
|
|
237
|
+
"displayName": "OpenRouter",
|
|
238
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=openrouter.ai&sz=128",
|
|
239
|
+
"envVarName": "OPENROUTER_API_KEY",
|
|
240
|
+
"upstreamBaseUrl": "https://openrouter.ai/api/v1",
|
|
241
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://openrouter.ai/keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">OpenRouter</a>, or connect via OAuth for per-user billing",
|
|
242
|
+
"apiKeyPlaceholder": "sk-or-...",
|
|
243
|
+
"sdkCompat": "openai",
|
|
244
|
+
"defaultModel": "anthropic/claude-sonnet-4",
|
|
245
|
+
"modelsEndpoint": "/v1/models",
|
|
246
|
+
"stt": {
|
|
247
|
+
"enabled": true,
|
|
248
|
+
"sdkCompat": "openai",
|
|
249
|
+
"transcriptionPath": "/audio/transcriptions",
|
|
250
|
+
"model": "whisper-1"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "cerebras",
|
|
257
|
+
"name": "Cerebras",
|
|
258
|
+
"description": "Ultra-fast inference on Cerebras hardware",
|
|
259
|
+
"providers": [
|
|
260
|
+
{
|
|
261
|
+
"displayName": "Cerebras",
|
|
262
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=cerebras.ai&sz=128",
|
|
263
|
+
"envVarName": "CEREBRAS_API_KEY",
|
|
264
|
+
"upstreamBaseUrl": "https://api.cerebras.ai/v1",
|
|
265
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://cloud.cerebras.ai/\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Cerebras Cloud</a>",
|
|
266
|
+
"apiKeyPlaceholder": "csk-...",
|
|
267
|
+
"sdkCompat": "openai",
|
|
268
|
+
"defaultModel": "llama-3.3-70b",
|
|
269
|
+
"modelsEndpoint": "/v1/models"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "opencode-zen",
|
|
275
|
+
"name": "OpenCode Zen",
|
|
276
|
+
"description": "Curated AI gateway with 40+ coding-optimized models",
|
|
277
|
+
"providers": [
|
|
278
|
+
{
|
|
279
|
+
"displayName": "OpenCode Zen",
|
|
280
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=opencode.ai&sz=128",
|
|
281
|
+
"envVarName": "OPENCODE_ZEN_API_KEY",
|
|
282
|
+
"upstreamBaseUrl": "https://opencode.ai/zen/v1",
|
|
283
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://opencode.ai/auth\" target=\"_blank\" class=\"text-blue-600 hover:underline\">OpenCode Zen</a>",
|
|
284
|
+
"apiKeyPlaceholder": "zen-...",
|
|
285
|
+
"sdkCompat": "openai",
|
|
286
|
+
"defaultModel": "anthropic/claude-sonnet-4",
|
|
287
|
+
"modelsEndpoint": "/v1/models"
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"id": "xai",
|
|
293
|
+
"name": "xAI",
|
|
294
|
+
"description": "Grok models by xAI",
|
|
295
|
+
"providers": [
|
|
296
|
+
{
|
|
297
|
+
"displayName": "xAI",
|
|
298
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=x.ai&sz=128",
|
|
299
|
+
"envVarName": "XAI_API_KEY",
|
|
300
|
+
"upstreamBaseUrl": "https://api.x.ai/v1",
|
|
301
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://console.x.ai/\" target=\"_blank\" class=\"text-blue-600 hover:underline\">xAI Console</a>",
|
|
302
|
+
"apiKeyPlaceholder": "xai-...",
|
|
303
|
+
"sdkCompat": "openai",
|
|
304
|
+
"defaultModel": "grok-3",
|
|
305
|
+
"modelsEndpoint": "/v1/models"
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "perplexity",
|
|
311
|
+
"name": "Perplexity",
|
|
312
|
+
"description": "Search-augmented AI models",
|
|
313
|
+
"providers": [
|
|
314
|
+
{
|
|
315
|
+
"displayName": "Perplexity",
|
|
316
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=perplexity.ai&sz=128",
|
|
317
|
+
"envVarName": "PERPLEXITY_API_KEY",
|
|
318
|
+
"upstreamBaseUrl": "https://api.perplexity.ai",
|
|
319
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://www.perplexity.ai/settings/api\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Perplexity Settings</a>",
|
|
320
|
+
"apiKeyPlaceholder": "pplx-...",
|
|
321
|
+
"sdkCompat": "openai",
|
|
322
|
+
"defaultModel": "sonar-pro",
|
|
323
|
+
"modelsEndpoint": "/v1/models"
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"id": "cohere",
|
|
329
|
+
"name": "Cohere",
|
|
330
|
+
"description": "Enterprise AI with Command and Embed models",
|
|
331
|
+
"providers": [
|
|
332
|
+
{
|
|
333
|
+
"displayName": "Cohere",
|
|
334
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=cohere.com&sz=128",
|
|
335
|
+
"envVarName": "COHERE_API_KEY",
|
|
336
|
+
"upstreamBaseUrl": "https://api.cohere.com/compatibility/v1",
|
|
337
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://dashboard.cohere.com/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">Cohere Dashboard</a>",
|
|
338
|
+
"apiKeyPlaceholder": "co-...",
|
|
339
|
+
"sdkCompat": "openai",
|
|
340
|
+
"defaultModel": "command-r-plus",
|
|
341
|
+
"modelsEndpoint": "/v1/models"
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"id": "openai",
|
|
347
|
+
"name": "OpenAI",
|
|
348
|
+
"description": "OpenAI Models",
|
|
349
|
+
"providers": [
|
|
350
|
+
{
|
|
351
|
+
"displayName": "OpenAI",
|
|
352
|
+
"iconUrl": "https://www.google.com/s2/favicons?domain=openai.com&sz=128",
|
|
353
|
+
"envVarName": "OPENAI_API_KEY",
|
|
354
|
+
"upstreamBaseUrl": "https://api.openai.com",
|
|
355
|
+
"apiKeyInstructions": "Get your API key from <a href=\"https://platform.openai.com/api-keys\" target=\"_blank\" class=\"text-blue-600 hover:underline\">OpenAI Dashboard</a>",
|
|
356
|
+
"apiKeyPlaceholder": "sk-...",
|
|
357
|
+
"sdkCompat": "openai",
|
|
358
|
+
"defaultModel": "gpt-4o",
|
|
359
|
+
"modelsEndpoint": "/v1/models"
|
|
360
|
+
}
|
|
361
|
+
]
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Gateway Configuration
|
|
2
|
+
GATEWAY_PORT={{GATEWAY_PORT}}
|
|
3
|
+
DEPLOYMENT_MODE={{DEPLOYMENT_MODE}}
|
|
4
|
+
|
|
5
|
+
# Security
|
|
6
|
+
ADMIN_PASSWORD={{ADMIN_PASSWORD}}
|
|
7
|
+
ENCRYPTION_KEY={{ENCRYPTION_KEY}}
|
|
8
|
+
|
|
9
|
+
# Worker Network Access Control
|
|
10
|
+
# Empty/unset: Complete isolation (deny all)
|
|
11
|
+
# WORKER_ALLOWED_DOMAINS=*: Unrestricted access
|
|
12
|
+
# WORKER_ALLOWED_DOMAINS=domains: Allowlist mode (deny by default, allow only these)
|
|
13
|
+
# WORKER_DISALLOWED_DOMAINS=domains: Blocklist mode (use with WORKER_ALLOWED_DOMAINS=*)
|
|
14
|
+
WORKER_ALLOWED_DOMAINS={{WORKER_ALLOWED_DOMAINS}}
|
|
15
|
+
WORKER_DISALLOWED_DOMAINS={{WORKER_DISALLOWED_DOMAINS}}
|
|
16
|
+
|
|
17
|
+
# CLI Version (used for image tags)
|
|
18
|
+
CLI_VERSION={{CLI_VERSION}}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Environment variables
|
|
2
|
+
.env
|
|
3
|
+
.env.local
|
|
4
|
+
.env.*.local
|
|
5
|
+
|
|
6
|
+
# Generated files
|
|
7
|
+
.lobu/
|
|
8
|
+
data/
|
|
9
|
+
|
|
10
|
+
# Workspace data
|
|
11
|
+
workspaces/
|
|
12
|
+
|
|
13
|
+
# Logs
|
|
14
|
+
*.log
|
|
15
|
+
npm-debug.log*
|
|
16
|
+
yarn-debug.log*
|
|
17
|
+
yarn-error.log*
|
|
18
|
+
pnpm-debug.log*
|
|
19
|
+
lerna-debug.log*
|
|
20
|
+
|
|
21
|
+
# OS files
|
|
22
|
+
.DS_Store
|
|
23
|
+
Thumbs.db
|
|
24
|
+
|
|
25
|
+
# Editor directories
|
|
26
|
+
.vscode/
|
|
27
|
+
.idea/
|
|
28
|
+
*.swp
|
|
29
|
+
*.swo
|
|
30
|
+
*~
|
|
31
|
+
|
|
32
|
+
# Node modules (if you add custom scripts)
|
|
33
|
+
node_modules/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@TESTING.md
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
FROM ghcr.io/lobu-ai/lobu-worker-base:latest
|
|
2
|
+
|
|
3
|
+
# === CUSTOMIZE BELOW THIS LINE ===
|
|
4
|
+
# This Dockerfile extends the lobu worker base image with your custom tools and dependencies.
|
|
5
|
+
# The same Dockerfile works for local Docker development.
|
|
6
|
+
|
|
7
|
+
# Example: Add system packages
|
|
8
|
+
# RUN apt-get update && apt-get install -y \
|
|
9
|
+
# postgresql-client \
|
|
10
|
+
# && rm -rf /var/lib/apt/lists/*
|
|
11
|
+
|
|
12
|
+
# Example: Add Python packages
|
|
13
|
+
# RUN pip install --no-cache-dir \
|
|
14
|
+
# pandas \
|
|
15
|
+
# matplotlib \
|
|
16
|
+
# requests
|
|
17
|
+
|
|
18
|
+
# Example: Add Node.js packages
|
|
19
|
+
# RUN bun add @octokit/rest lodash
|
|
20
|
+
|
|
21
|
+
# Example: Copy custom scripts
|
|
22
|
+
# COPY ./scripts /workspace/scripts
|
|
23
|
+
# RUN chmod +x /workspace/scripts/*.sh
|
|
24
|
+
|
|
25
|
+
# Example: Set custom environment variables
|
|
26
|
+
# ENV MY_CUSTOM_VAR=value
|
|
27
|
+
|
|
28
|
+
# Example: Install language runtimes
|
|
29
|
+
# RUN curl -fsSL https://deno.land/install.sh | sh
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Lobu instance created with `@lobu/cli` v{{CLI_VERSION}}
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
Make sure you have Docker CLI installed.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Start the services
|
|
11
|
+
lobu run -d
|
|
12
|
+
|
|
13
|
+
# View logs
|
|
14
|
+
docker compose logs -f
|
|
15
|
+
|
|
16
|
+
# Stop the services
|
|
17
|
+
docker compose down
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Upgrading to Latest Version
|
|
21
|
+
|
|
22
|
+
### Update Gateway and Pre-built Images
|
|
23
|
+
Pull the latest images and restart services:
|
|
24
|
+
```bash
|
|
25
|
+
docker compose pull
|
|
26
|
+
docker compose up -d
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Rebuild Worker (when Dockerfile.worker changes)
|
|
30
|
+
If you modified your `Dockerfile.worker` or want to use the latest base image:
|
|
31
|
+
```bash
|
|
32
|
+
docker compose build worker
|
|
33
|
+
docker compose restart gateway
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Update Environment Variables
|
|
37
|
+
Check for new environment variables in release notes or the [Lobu documentation](https://github.com/lobu-ai/lobu):
|
|
38
|
+
1. Compare your `.env` with the latest `.env.example` from the repository
|
|
39
|
+
2. Add any new required variables
|
|
40
|
+
3. Restart services: `docker compose restart`
|
|
41
|
+
|
|
42
|
+
**Tip**: Always use `latest` tags to ensure gateway and worker versions stay in sync.
|
|
43
|
+
|
|
44
|
+
## Configuration
|
|
45
|
+
|
|
46
|
+
### Environment Variables
|
|
47
|
+
|
|
48
|
+
Edit `.env` to configure:
|
|
49
|
+
- `PUBLIC_GATEWAY_URL` - Public URL for OAuth callbacks
|
|
50
|
+
- `WORKER_ALLOWED_DOMAINS` - Allowed domains for worker network access
|
|
51
|
+
|
|
52
|
+
### Platform Connections
|
|
53
|
+
|
|
54
|
+
Platforms (Slack, Telegram, Discord, WhatsApp, Teams) are configured through the gateway APIs. No platform-specific env vars are required in `docker-compose.yml`; manage connections against `{PUBLIC_GATEWAY_URL}/api/v1/connections` and related auth/config endpoints.
|
|
55
|
+
|
|
56
|
+
### Worker Customization
|
|
57
|
+
|
|
58
|
+
Edit `Dockerfile.worker` to add custom tools and dependencies.
|
|
59
|
+
|
|
60
|
+
Example customizations:
|
|
61
|
+
```dockerfile
|
|
62
|
+
# Add system packages
|
|
63
|
+
RUN apt-get update && apt-get install -y postgresql-client
|
|
64
|
+
|
|
65
|
+
# Add Python packages
|
|
66
|
+
RUN pip install pandas matplotlib
|
|
67
|
+
|
|
68
|
+
# Add Node.js packages
|
|
69
|
+
RUN bun add @octokit/rest
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
When you modify `Dockerfile.worker` or context files, rebuild the worker image:
|
|
73
|
+
```bash
|
|
74
|
+
docker compose build worker
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The gateway will automatically pick up the latest worker image.
|
|
78
|
+
|
|
79
|
+
## Services
|
|
80
|
+
|
|
81
|
+
The docker-compose.yml defines these services:
|
|
82
|
+
- **redis** - Redis cache and queue
|
|
83
|
+
- **gateway** - Platform connections and worker orchestration
|
|
84
|
+
- **worker** - Agent worker (build-only, spawned dynamically)
|
|
85
|
+
|
|
86
|
+
## Learn More
|
|
87
|
+
|
|
88
|
+
- [Lobu Documentation](https://github.com/lobu-ai/lobu)
|
|
89
|
+
- [CLI Reference](https://github.com/lobu-ai/lobu/tree/main/packages/cli)
|
|
90
|
+
- [Examples](https://github.com/lobu-ai/lobu/tree/main/examples)
|
|
91
|
+
|
|
92
|
+
## Support
|
|
93
|
+
|
|
94
|
+
- [GitHub Issues](https://github.com/lobu-ai/lobu/issues)
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Testing Your Lobu
|
|
2
|
+
|
|
3
|
+
This bot provides HTTP APIs for testing and automation. These endpoints allow AI agents and developers to interact with your bot programmatically.
|
|
4
|
+
|
|
5
|
+
## 1. Messaging API
|
|
6
|
+
|
|
7
|
+
Send messages to your bot with optional file uploads.
|
|
8
|
+
|
|
9
|
+
### Endpoint
|
|
10
|
+
```
|
|
11
|
+
POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Authentication
|
|
15
|
+
|
|
16
|
+
**Bearer Token in Header:**
|
|
17
|
+
```
|
|
18
|
+
Authorization: Bearer xoxb-your-bot-token
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The bot token must be provided in the `Authorization` header, not in the request body.
|
|
22
|
+
|
|
23
|
+
### Request Format
|
|
24
|
+
|
|
25
|
+
#### JSON Request (Simple Message)
|
|
26
|
+
```bash
|
|
27
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
28
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
29
|
+
-H "Content-Type: application/json" \
|
|
30
|
+
-d '{
|
|
31
|
+
"platform": "slack",
|
|
32
|
+
"channel": "general",
|
|
33
|
+
"content": "what is 2+2?"
|
|
34
|
+
}'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Multipart Request (With File Upload)
|
|
38
|
+
```bash
|
|
39
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
40
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
41
|
+
-F "platform=slack" \
|
|
42
|
+
-F "channel=C12345678" \
|
|
43
|
+
-F "content=please review this file" \
|
|
44
|
+
-F "file=@/path/to/document.pdf"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Parameters
|
|
48
|
+
|
|
49
|
+
| Field | Required | Description |
|
|
50
|
+
|-------|----------|-------------|
|
|
51
|
+
| `platform` | Yes | Platform name (currently: "slack") |
|
|
52
|
+
| `channel` | Yes | Channel ID (e.g., `C12345678`) or name (e.g., `general`, `#general`) |
|
|
53
|
+
| `content` | Yes | Message text to send (use `@me` to mention the bot) |
|
|
54
|
+
| `threadId` | No | Thread ID to reply to (for thread continuity) |
|
|
55
|
+
| `files` | No | File attachments (multipart/form-data, up to 10 files) |
|
|
56
|
+
|
|
57
|
+
### Response Format
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"success": true,
|
|
62
|
+
"channel": "C12345678",
|
|
63
|
+
"messageId": "1234567890.123456",
|
|
64
|
+
"threadId": "1234567890.123456",
|
|
65
|
+
"threadUrl": "https://app.slack.com/client/T12345/C12345678/thread/1234567890.123456"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Note about `threadId`:**
|
|
70
|
+
- When posting a new message (no `threadId` parameter), `threadId` equals `messageId`
|
|
71
|
+
- When replying to a thread (with `threadId` parameter), `threadId` is the original thread's ID
|
|
72
|
+
|
|
73
|
+
### Bot Mentions
|
|
74
|
+
|
|
75
|
+
Use the `@me` placeholder to mention the bot in a platform-agnostic way:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"content": "@me what is 2+2?"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The API automatically replaces `@me` with the correct bot mention for the platform:
|
|
84
|
+
- **Slack**: `<@U12345>`
|
|
85
|
+
- **Discord** (future): `<@123456>`
|
|
86
|
+
- **Telegram** (future): `@botname`
|
|
87
|
+
|
|
88
|
+
If you don't want to mention the bot, simply omit `@me` from your message.
|
|
89
|
+
|
|
90
|
+
### Example: Simple Text Message (with @me)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
94
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
95
|
+
-H "Content-Type: application/json" \
|
|
96
|
+
-d '{
|
|
97
|
+
"platform": "slack",
|
|
98
|
+
"channel": "general",
|
|
99
|
+
"content": "@me what is 2+2?"
|
|
100
|
+
}'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Example: Without Bot Mention
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
107
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
108
|
+
-H "Content-Type: application/json" \
|
|
109
|
+
-d '{
|
|
110
|
+
"platform": "slack",
|
|
111
|
+
"channel": "general",
|
|
112
|
+
"content": "just a regular message"
|
|
113
|
+
}'
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Example: Thread Reply
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
120
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
121
|
+
-H "Content-Type: application/json" \
|
|
122
|
+
-d '{
|
|
123
|
+
"platform": "slack",
|
|
124
|
+
"channel": "C12345678",
|
|
125
|
+
"content": "tell me more about that",
|
|
126
|
+
"threadId": "1234567890.123456"
|
|
127
|
+
}'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Example: Single File Upload
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
134
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
135
|
+
-F "platform=slack" \
|
|
136
|
+
-F "channel=dev-channel" \
|
|
137
|
+
-F "content=@me analyze this CSV" \
|
|
138
|
+
-F "files=@data.csv"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Example: Multiple File Upload
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
curl -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
145
|
+
-H "Authorization: Bearer xoxb-your-bot-token" \
|
|
146
|
+
-F "platform=slack" \
|
|
147
|
+
-F "channel=dev-channel" \
|
|
148
|
+
-F "content=@me review these documents" \
|
|
149
|
+
-F "files=@document1.pdf" \
|
|
150
|
+
-F "files=@document2.pdf" \
|
|
151
|
+
-F "files=@spreadsheet.xlsx"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Channel Name Resolution
|
|
155
|
+
|
|
156
|
+
The API automatically resolves channel names to IDs:
|
|
157
|
+
- `"general"` → `"C12345678"`
|
|
158
|
+
- `"#general"` → `"C12345678"`
|
|
159
|
+
- `"C12345678"` → `"C12345678"` (already an ID)
|
|
160
|
+
|
|
161
|
+
### Error Handling
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"success": false,
|
|
166
|
+
"error": "Failed to send message",
|
|
167
|
+
"details": "Channel \"nonexistent\" not found"
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Common errors:
|
|
172
|
+
- `400`: Missing required fields (`platform`, `channel`, or `message`)
|
|
173
|
+
- `401`: Missing or invalid `Authorization` header
|
|
174
|
+
- `404`: Platform not found
|
|
175
|
+
- `500`: Platform API error (invalid token, channel not found, etc.)
|
|
176
|
+
- `501`: Platform doesn't support `sendMessage`
|
|
177
|
+
|
|
178
|
+
### Platform-Agnostic Design
|
|
179
|
+
|
|
180
|
+
The messaging API is designed to work across multiple chat platforms:
|
|
181
|
+
|
|
182
|
+
**Current Support:**
|
|
183
|
+
- Slack (bot mentions: `<@U12345>`, uses `@me` placeholder)
|
|
184
|
+
|
|
185
|
+
**Future Support:**
|
|
186
|
+
- Discord (bot mentions: `<@123456>`, uses `@me` placeholder)
|
|
187
|
+
- Telegram (bot mentions: `@botname`, uses `@me` placeholder)
|
|
188
|
+
|
|
189
|
+
The `@me` placeholder ensures your code works across all platforms without modification.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 2. Complete E2E Testing Example
|
|
194
|
+
|
|
195
|
+
Testing a full conversation:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Step 1: Send initial message
|
|
199
|
+
RESPONSE=$(curl -s -X POST http://localhost:{{GATEWAY_PORT}}/api/v1/agents/{agentId}/messages \
|
|
200
|
+
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
|
|
201
|
+
-H "Content-Type: application/json" \
|
|
202
|
+
-d '{
|
|
203
|
+
"platform": "slack",
|
|
204
|
+
"channel": "test-channel",
|
|
205
|
+
"content": "@me give me three options"
|
|
206
|
+
}')
|
|
207
|
+
|
|
208
|
+
THREAD_ID=$(echo $RESPONSE | jq -r '.threadId')
|
|
209
|
+
echo "Thread ID: $THREAD_ID"
|
|
210
|
+
|
|
211
|
+
# Step 2: Verify bot response
|
|
212
|
+
# (Check thread for follow-up message)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## 4. Notes for AI Agents
|
|
218
|
+
|
|
219
|
+
These APIs enable your AI agents to:
|
|
220
|
+
- **Test connectivity**: Verify bot deployment is working
|
|
221
|
+
- **E2E testing**: Automate full conversation flows
|
|
222
|
+
- **CI/CD integration**: Run automated tests before deployment
|
|
223
|
+
- **Development**: Quickly test bot behavior without manual Slack interaction
|
|
224
|
+
|
|
225
|
+
The messaging endpoint is **platform-agnostic** by design. While Slack is currently supported, the same API structure will work for Discord, Teams, and other platforms in the future.
|