@fortressllm/sybil 0.0.3

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.
Files changed (288) hide show
  1. package/.env copy +91 -0
  2. package/.env.example +139 -0
  3. package/BROWSER_CONTROL.md +354 -0
  4. package/CLI_CHAT_FEATURE.md +224 -0
  5. package/CLI_GUIDE.md +359 -0
  6. package/DYNAMIC_SKILLS.md +345 -0
  7. package/DockerFile.sandbox +14 -0
  8. package/PROGRESS.md +249 -0
  9. package/README.md +281 -0
  10. package/RENAME_LOG.md +62 -0
  11. package/SIMPLIFIED_TELEGRAM_UX.md +273 -0
  12. package/SYBIL_SUMMARY.md +360 -0
  13. package/TASK11_NETWORK.md +202 -0
  14. package/TASK14_CLI.md +432 -0
  15. package/TASK8_SAFETY.md +317 -0
  16. package/TASK9_COMPLETION.md +186 -0
  17. package/TASK9_SUMMARY.md +201 -0
  18. package/TELEGRAM_OTP_AUTH.md +359 -0
  19. package/VECTOR_MEMORY.md +163 -0
  20. package/assets/logo.png +0 -0
  21. package/cypfq_code_search.md +287 -0
  22. package/cypfq_driver_search.md +297 -0
  23. package/cypfq_github_search.md +297 -0
  24. package/cypfq_repo_search.md +370 -0
  25. package/dist/agents/autonomous-agent.d.ts +61 -0
  26. package/dist/agents/autonomous-agent.d.ts.map +1 -0
  27. package/dist/agents/autonomous-agent.js +536 -0
  28. package/dist/agents/autonomous-agent.js.map +1 -0
  29. package/dist/agents/network.d.ts +1006 -0
  30. package/dist/agents/network.d.ts.map +1 -0
  31. package/dist/agents/network.js +1266 -0
  32. package/dist/agents/network.js.map +1 -0
  33. package/dist/cli/commands/backup.d.ts +3 -0
  34. package/dist/cli/commands/backup.d.ts.map +1 -0
  35. package/dist/cli/commands/backup.js +63 -0
  36. package/dist/cli/commands/backup.js.map +1 -0
  37. package/dist/cli/commands/config.d.ts +3 -0
  38. package/dist/cli/commands/config.d.ts.map +1 -0
  39. package/dist/cli/commands/config.js +163 -0
  40. package/dist/cli/commands/config.js.map +1 -0
  41. package/dist/cli/commands/doctor.d.ts +3 -0
  42. package/dist/cli/commands/doctor.d.ts.map +1 -0
  43. package/dist/cli/commands/doctor.js +107 -0
  44. package/dist/cli/commands/doctor.js.map +1 -0
  45. package/dist/cli/commands/init.d.ts +3 -0
  46. package/dist/cli/commands/init.d.ts.map +1 -0
  47. package/dist/cli/commands/init.js +138 -0
  48. package/dist/cli/commands/init.js.map +1 -0
  49. package/dist/cli/commands/logs.d.ts +3 -0
  50. package/dist/cli/commands/logs.d.ts.map +1 -0
  51. package/dist/cli/commands/logs.js +81 -0
  52. package/dist/cli/commands/logs.js.map +1 -0
  53. package/dist/cli/commands/otp.d.ts +3 -0
  54. package/dist/cli/commands/otp.d.ts.map +1 -0
  55. package/dist/cli/commands/otp.js +142 -0
  56. package/dist/cli/commands/otp.js.map +1 -0
  57. package/dist/cli/commands/restore.d.ts +3 -0
  58. package/dist/cli/commands/restore.d.ts.map +1 -0
  59. package/dist/cli/commands/restore.js +99 -0
  60. package/dist/cli/commands/restore.js.map +1 -0
  61. package/dist/cli/commands/start.d.ts +3 -0
  62. package/dist/cli/commands/start.d.ts.map +1 -0
  63. package/dist/cli/commands/start.js +65 -0
  64. package/dist/cli/commands/start.js.map +1 -0
  65. package/dist/cli/commands/status.d.ts +3 -0
  66. package/dist/cli/commands/status.d.ts.map +1 -0
  67. package/dist/cli/commands/status.js +68 -0
  68. package/dist/cli/commands/status.js.map +1 -0
  69. package/dist/cli/commands/stop.d.ts +3 -0
  70. package/dist/cli/commands/stop.d.ts.map +1 -0
  71. package/dist/cli/commands/stop.js +62 -0
  72. package/dist/cli/commands/stop.js.map +1 -0
  73. package/dist/cli/commands/update.d.ts +3 -0
  74. package/dist/cli/commands/update.d.ts.map +1 -0
  75. package/dist/cli/commands/update.js +49 -0
  76. package/dist/cli/commands/update.js.map +1 -0
  77. package/dist/cli/commands/whatsapp.d.ts +3 -0
  78. package/dist/cli/commands/whatsapp.d.ts.map +1 -0
  79. package/dist/cli/commands/whatsapp.js +281 -0
  80. package/dist/cli/commands/whatsapp.js.map +1 -0
  81. package/dist/cli/index.d.ts +7 -0
  82. package/dist/cli/index.d.ts.map +1 -0
  83. package/dist/cli/index.js +58 -0
  84. package/dist/cli/index.js.map +1 -0
  85. package/dist/cli.d.ts +9 -0
  86. package/dist/cli.d.ts.map +1 -0
  87. package/dist/cli.js +750 -0
  88. package/dist/cli.js.map +1 -0
  89. package/dist/index.d.ts +2 -0
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.js +109 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/mastra/index.d.ts +4 -0
  94. package/dist/mastra/index.d.ts.map +1 -0
  95. package/dist/mastra/index.js +37 -0
  96. package/dist/mastra/index.js.map +1 -0
  97. package/dist/mastra/memory.d.ts +9 -0
  98. package/dist/mastra/memory.d.ts.map +1 -0
  99. package/dist/mastra/memory.js +92 -0
  100. package/dist/mastra/memory.js.map +1 -0
  101. package/dist/processors/index.d.ts +74 -0
  102. package/dist/processors/index.d.ts.map +1 -0
  103. package/dist/processors/index.js +153 -0
  104. package/dist/processors/index.js.map +1 -0
  105. package/dist/processors/semantic-recall.d.ts +63 -0
  106. package/dist/processors/semantic-recall.d.ts.map +1 -0
  107. package/dist/processors/semantic-recall.js +216 -0
  108. package/dist/processors/semantic-recall.js.map +1 -0
  109. package/dist/processors/tool-search.d.ts +26 -0
  110. package/dist/processors/tool-search.d.ts.map +1 -0
  111. package/dist/processors/tool-search.js +41 -0
  112. package/dist/processors/tool-search.js.map +1 -0
  113. package/dist/skills/dynamic/skill-generator.d.ts +169 -0
  114. package/dist/skills/dynamic/skill-generator.d.ts.map +1 -0
  115. package/dist/skills/dynamic/skill-generator.js +488 -0
  116. package/dist/skills/dynamic/skill-generator.js.map +1 -0
  117. package/dist/tools/agent-delegation-tools.d.ts +142 -0
  118. package/dist/tools/agent-delegation-tools.d.ts.map +1 -0
  119. package/dist/tools/agent-delegation-tools.js +263 -0
  120. package/dist/tools/agent-delegation-tools.js.map +1 -0
  121. package/dist/tools/browser-tools.d.ts +374 -0
  122. package/dist/tools/browser-tools.d.ts.map +1 -0
  123. package/dist/tools/browser-tools.js +752 -0
  124. package/dist/tools/browser-tools.js.map +1 -0
  125. package/dist/tools/dynamic/registry.d.ts +61 -0
  126. package/dist/tools/dynamic/registry.d.ts.map +1 -0
  127. package/dist/tools/dynamic/registry.js +121 -0
  128. package/dist/tools/dynamic/registry.js.map +1 -0
  129. package/dist/tools/dynamic/tool-generator.d.ts +99 -0
  130. package/dist/tools/dynamic/tool-generator.d.ts.map +1 -0
  131. package/dist/tools/dynamic/tool-generator.js +367 -0
  132. package/dist/tools/dynamic/tool-generator.js.map +1 -0
  133. package/dist/tools/extended-tools.d.ts +176 -0
  134. package/dist/tools/extended-tools.d.ts.map +1 -0
  135. package/dist/tools/extended-tools.js +464 -0
  136. package/dist/tools/extended-tools.js.map +1 -0
  137. package/dist/tools/library/calendar/index.d.ts +134 -0
  138. package/dist/tools/library/calendar/index.d.ts.map +1 -0
  139. package/dist/tools/library/calendar/index.js +160 -0
  140. package/dist/tools/library/calendar/index.js.map +1 -0
  141. package/dist/tools/podman-workspace-mcp-cli.d.ts +3 -0
  142. package/dist/tools/podman-workspace-mcp-cli.d.ts.map +1 -0
  143. package/dist/tools/podman-workspace-mcp-cli.js +12 -0
  144. package/dist/tools/podman-workspace-mcp-cli.js.map +1 -0
  145. package/dist/tools/podman-workspace-mcp.d.ts +247 -0
  146. package/dist/tools/podman-workspace-mcp.d.ts.map +1 -0
  147. package/dist/tools/podman-workspace-mcp.js +1093 -0
  148. package/dist/tools/podman-workspace-mcp.js.map +1 -0
  149. package/dist/tools/podman-workspace.d.ts +148 -0
  150. package/dist/tools/podman-workspace.d.ts.map +1 -0
  151. package/dist/tools/podman-workspace.js +682 -0
  152. package/dist/tools/podman-workspace.js.map +1 -0
  153. package/dist/tools/telegram-file-tools.d.ts +78 -0
  154. package/dist/tools/telegram-file-tools.d.ts.map +1 -0
  155. package/dist/tools/telegram-file-tools.js +294 -0
  156. package/dist/tools/telegram-file-tools.js.map +1 -0
  157. package/dist/tools/tool-registry.d.ts +467 -0
  158. package/dist/tools/tool-registry.d.ts.map +1 -0
  159. package/dist/tools/tool-registry.js +156 -0
  160. package/dist/tools/tool-registry.js.map +1 -0
  161. package/dist/tools/web-tools.d.ts +77 -0
  162. package/dist/tools/web-tools.d.ts.map +1 -0
  163. package/dist/tools/web-tools.js +416 -0
  164. package/dist/tools/web-tools.js.map +1 -0
  165. package/dist/tools/whatsapp-autoreply-tools.d.ts +118 -0
  166. package/dist/tools/whatsapp-autoreply-tools.d.ts.map +1 -0
  167. package/dist/tools/whatsapp-autoreply-tools.js +503 -0
  168. package/dist/tools/whatsapp-autoreply-tools.js.map +1 -0
  169. package/dist/tools/whatsapp-tools.d.ts +175 -0
  170. package/dist/tools/whatsapp-tools.d.ts.map +1 -0
  171. package/dist/tools/whatsapp-tools.js +566 -0
  172. package/dist/tools/whatsapp-tools.js.map +1 -0
  173. package/dist/utils/logger.d.ts +65 -0
  174. package/dist/utils/logger.d.ts.map +1 -0
  175. package/dist/utils/logger.js +307 -0
  176. package/dist/utils/logger.js.map +1 -0
  177. package/dist/utils/model-config.d.ts +73 -0
  178. package/dist/utils/model-config.d.ts.map +1 -0
  179. package/dist/utils/model-config.js +366 -0
  180. package/dist/utils/model-config.js.map +1 -0
  181. package/dist/utils/semantic-memory.d.ts +82 -0
  182. package/dist/utils/semantic-memory.d.ts.map +1 -0
  183. package/dist/utils/semantic-memory.js +189 -0
  184. package/dist/utils/semantic-memory.js.map +1 -0
  185. package/dist/utils/system.d.ts +2 -0
  186. package/dist/utils/system.d.ts.map +1 -0
  187. package/dist/utils/system.js +24 -0
  188. package/dist/utils/system.js.map +1 -0
  189. package/dist/utils/telegram-auth.d.ts +54 -0
  190. package/dist/utils/telegram-auth.d.ts.map +1 -0
  191. package/dist/utils/telegram-auth.js +146 -0
  192. package/dist/utils/telegram-auth.js.map +1 -0
  193. package/dist/utils/telegram.d.ts +7 -0
  194. package/dist/utils/telegram.d.ts.map +1 -0
  195. package/dist/utils/telegram.js +1494 -0
  196. package/dist/utils/telegram.js.map +1 -0
  197. package/dist/utils/whatsapp-client.d.ts +166 -0
  198. package/dist/utils/whatsapp-client.d.ts.map +1 -0
  199. package/dist/utils/whatsapp-client.js +722 -0
  200. package/dist/utils/whatsapp-client.js.map +1 -0
  201. package/dist/workflows/planner-workflow.d.ts +39 -0
  202. package/dist/workflows/planner-workflow.d.ts.map +1 -0
  203. package/dist/workflows/planner-workflow.js +165 -0
  204. package/dist/workflows/planner-workflow.js.map +1 -0
  205. package/dist/workflows/skill-builder-workflow.d.ts +16 -0
  206. package/dist/workflows/skill-builder-workflow.d.ts.map +1 -0
  207. package/dist/workflows/skill-builder-workflow.js +157 -0
  208. package/dist/workflows/skill-builder-workflow.js.map +1 -0
  209. package/dist/workspace/index.d.ts +23 -0
  210. package/dist/workspace/index.d.ts.map +1 -0
  211. package/dist/workspace/index.js +64 -0
  212. package/dist/workspace/index.js.map +1 -0
  213. package/docs/README.md +140 -0
  214. package/docs/api/agents.md +481 -0
  215. package/docs/api/browser-tools.md +469 -0
  216. package/docs/api/memory.md +629 -0
  217. package/docs/architecture/agent-networks.md +586 -0
  218. package/docs/architecture/memory.md +579 -0
  219. package/docs/architecture/overview.md +436 -0
  220. package/docs/architecture/tools.md +637 -0
  221. package/docs/cli-tui.md +367 -0
  222. package/docs/guides/environment-variables.md +502 -0
  223. package/docs/guides/troubleshooting.md +882 -0
  224. package/docs/tutorials/agent-networks.md +432 -0
  225. package/docs/tutorials/dynamic-tools.md +469 -0
  226. package/docs/tutorials/getting-started.md +263 -0
  227. package/docs/tutorials/skills.md +561 -0
  228. package/docs/tutorials/web-browsing.md +329 -0
  229. package/mastra.db-shm +0 -0
  230. package/mastra.db-wal +0 -0
  231. package/package.json +71 -0
  232. package/plan.md +601 -0
  233. package/skills/code-review/SKILL.md +48 -0
  234. package/skills/task-planning/SKILL.md +55 -0
  235. package/skills/web-research/SKILL.md +79 -0
  236. package/skills/whatsapp-management/SKILL.md +78 -0
  237. package/src/agents/autonomous-agent.ts +626 -0
  238. package/src/agents/network.ts +1307 -0
  239. package/src/cli/commands/backup.ts +78 -0
  240. package/src/cli/commands/config.ts +176 -0
  241. package/src/cli/commands/doctor.ts +111 -0
  242. package/src/cli/commands/init.ts +150 -0
  243. package/src/cli/commands/logs.ts +94 -0
  244. package/src/cli/commands/otp.ts +162 -0
  245. package/src/cli/commands/restore.ts +118 -0
  246. package/src/cli/commands/start.ts +76 -0
  247. package/src/cli/commands/status.ts +81 -0
  248. package/src/cli/commands/stop.ts +68 -0
  249. package/src/cli/commands/update.ts +61 -0
  250. package/src/cli/commands/whatsapp.ts +322 -0
  251. package/src/cli/index.ts +69 -0
  252. package/src/cli.ts +830 -0
  253. package/src/index.ts +124 -0
  254. package/src/mastra/index.ts +49 -0
  255. package/src/mastra/memory.ts +99 -0
  256. package/src/mastra/public/workspace/plan.md +115 -0
  257. package/src/mastra/public/workspace/research/react-tailwind/skill.md +47 -0
  258. package/src/processors/index.ts +170 -0
  259. package/src/processors/semantic-recall.ts +277 -0
  260. package/src/processors/tool-search.ts +46 -0
  261. package/src/skills/dynamic/skill-generator.ts +568 -0
  262. package/src/tools/agent-delegation-tools.ts +301 -0
  263. package/src/tools/browser-tools.ts +792 -0
  264. package/src/tools/dynamic/registry.ts +144 -0
  265. package/src/tools/dynamic/tool-generator.ts +406 -0
  266. package/src/tools/extended-tools.ts +498 -0
  267. package/src/tools/library/calendar/index.ts +172 -0
  268. package/src/tools/podman-workspace-mcp-cli.ts +14 -0
  269. package/src/tools/podman-workspace-mcp.ts +1290 -0
  270. package/src/tools/podman-workspace.ts +858 -0
  271. package/src/tools/telegram-file-tools.ts +320 -0
  272. package/src/tools/tool-registry.ts +233 -0
  273. package/src/tools/web-tools.ts +461 -0
  274. package/src/tools/whatsapp-autoreply-tools.ts +616 -0
  275. package/src/tools/whatsapp-tools.ts +602 -0
  276. package/src/utils/logger.ts +368 -0
  277. package/src/utils/model-config.ts +437 -0
  278. package/src/utils/semantic-memory.ts +230 -0
  279. package/src/utils/system.ts +25 -0
  280. package/src/utils/telegram-auth.ts +201 -0
  281. package/src/utils/telegram.ts +1847 -0
  282. package/src/utils/whatsapp-client.ts +808 -0
  283. package/src/workflows/planner-workflow.ts +178 -0
  284. package/src/workflows/skill-builder-workflow.ts +175 -0
  285. package/src/workspace/index.ts +69 -0
  286. package/tsconfig.json +22 -0
  287. package/view-logs.sh +116 -0
  288. package/whatsapp-session.sh +197 -0
@@ -0,0 +1,502 @@
1
+ # Environment Variables Configuration
2
+
3
+ Complete guide to configuring Sybil through environment variables.
4
+
5
+ ---
6
+
7
+ ## Quick Start
8
+
9
+ 1. Copy the example file:
10
+ ```bash
11
+ cp .env.example .env
12
+ ```
13
+
14
+ 2. Edit `.env` with your settings
15
+
16
+ 3. Restart Sybil for changes to take effect
17
+
18
+ ---
19
+
20
+ ## Required Variables
21
+
22
+ ### TELEGRAM_BOT_TOKEN
23
+
24
+ **Required** - Your Telegram bot token from [@BotFather](https://t.me/BotFather)
25
+
26
+ ```bash
27
+ TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrSTUvwxyz
28
+ ```
29
+
30
+ **How to get:**
31
+ 1. Message [@BotFather](https://t.me/BotFather) on Telegram
32
+ 2. Send `/newbot`
33
+ 3. Follow prompts to create bot
34
+ 4. Copy the token (starts with numbers followed by colon)
35
+
36
+ ---
37
+
38
+ ## AI Provider Configuration
39
+
40
+ Choose one provider by setting `AI_PROVIDER`:
41
+
42
+ ### Ollama (Recommended - Free & Private)
43
+
44
+ ```bash
45
+ AI_PROVIDER=ollama
46
+ OLLAMA_MODEL=llama3.2
47
+ OLLAMA_BASE_URL=http://localhost:11434
48
+ ```
49
+
50
+ **Setup:**
51
+ 1. Install [Ollama](https://ollama.ai)
52
+ 2. Pull a model: `ollama pull llama3.2`
53
+ 3. Start Ollama: `ollama serve`
54
+
55
+ **Available Models:**
56
+ - `llama3.2` (Recommended - fast, capable)
57
+ - `llama3.1` (Larger, more capable)
58
+ - `mistral` (Good balance)
59
+ - `codellama` (Code-focused)
60
+ - `mixtral` (Powerful)
61
+
62
+ ---
63
+
64
+ ### OpenAI
65
+
66
+ ```bash
67
+ AI_PROVIDER=openai
68
+ OPENAI_API_KEY=sk-...
69
+ OPENAI_MODEL=gpt-4o
70
+ ```
71
+
72
+ **Models:**
73
+ - `gpt-4o` (Recommended - fast, capable)
74
+ - `gpt-4o-mini` (Cheaper, faster)
75
+ - `gpt-4-turbo` (Most capable)
76
+ - `gpt-3.5-turbo` (Budget option)
77
+
78
+ ---
79
+
80
+ ### Anthropic (Claude)
81
+
82
+ ```bash
83
+ AI_PROVIDER=anthropic
84
+ ANTHROPIC_API_KEY=sk-ant-...
85
+ ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
86
+ ```
87
+
88
+ **Models:**
89
+ - `claude-3-5-sonnet-20241022` (Recommended)
90
+ - `claude-3-opus-20240229` (Most capable)
91
+ - `claude-3-haiku-20240307` (Fastest)
92
+
93
+ ---
94
+
95
+ ### Google (Gemini)
96
+
97
+ ```bash
98
+ AI_PROVIDER=google
99
+ GOOGLE_GENERATIVE_AI_API_KEY=...
100
+ GOOGLE_MODEL=gemini-1.5-flash
101
+ ```
102
+
103
+ **Models:**
104
+ - `gemini-1.5-flash` (Recommended)
105
+ - `gemini-1.5-pro` (Most capable)
106
+ - `gemini-1.0-pro` (Stable)
107
+
108
+ ---
109
+
110
+ ### NVIDIA
111
+
112
+ ```bash
113
+ AI_PROVIDER=nvidia
114
+ NVIDIA_API_KEY=nvapi-...
115
+ NVIDIA_MODEL=nvidia/llama-3.1-nemotron-70b-instruct
116
+ ```
117
+
118
+ ---
119
+
120
+ ### Groq (Fastest)
121
+
122
+ ```bash
123
+ AI_PROVIDER=groq
124
+ GROQ_API_KEY=gsk_...
125
+ GROQ_MODEL=llama-3.3-70b-versatile
126
+ ```
127
+
128
+ **Models:**
129
+ - `llama-3.3-70b-versatile` (Recommended)
130
+ - `mixtral-8x7b-32768`
131
+ - `gemma-7b-it`
132
+
133
+ ---
134
+
135
+ ### Mistral
136
+
137
+ ```bash
138
+ AI_PROVIDER=mistral
139
+ MISTRAL_API_KEY=...
140
+ MISTRAL_MODEL=mistral-large-latest
141
+ ```
142
+
143
+ ---
144
+
145
+ ### DeepSeek
146
+
147
+ ```bash
148
+ AI_PROVIDER=deepseek
149
+ DEEPSEEK_API_KEY=...
150
+ DEEPSEEK_MODEL=deepseek-chat
151
+ ```
152
+
153
+ ---
154
+
155
+ ### xAI (Grok)
156
+
157
+ ```bash
158
+ AI_PROVIDER=xai
159
+ XAI_API_KEY=...
160
+ XAI_MODEL=grok-2-1212
161
+ ```
162
+
163
+ ---
164
+
165
+ ### Perplexity
166
+
167
+ ```bash
168
+ AI_PROVIDER=perplexity
169
+ PERPLEXITY_API_KEY=pplx-...
170
+ PERPLEXITY_MODEL=llama-3.1-sonar-small-128k-online
171
+ ```
172
+
173
+ ---
174
+
175
+ ### Cohere
176
+
177
+ ```bash
178
+ AI_PROVIDER=cohere
179
+ COHERE_API_KEY=...
180
+ COHERE_MODEL=command-r-plus
181
+ ```
182
+
183
+ ---
184
+
185
+ ### Hugging Face
186
+
187
+ ```bash
188
+ AI_PROVIDER=huggingface
189
+ HUGGINGFACE_API_KEY=hf_...
190
+ HUGGINGFACE_MODEL=meta-llama/Llama-3.2-90B-Vision-Instruct
191
+ ```
192
+
193
+ ---
194
+
195
+ ### Together AI
196
+
197
+ ```bash
198
+ AI_PROVIDER=togetherai
199
+ TOGETHER_API_KEY=...
200
+ TOGETHERAI_MODEL=meta-llama/Llama-3.3-70B-Instruct-Turbo
201
+ ```
202
+
203
+ ---
204
+
205
+ ### Fireworks AI
206
+
207
+ ```bash
208
+ AI_PROVIDER=fireworks-ai
209
+ FIREWORKS_API_KEY=...
210
+ FIREWORKS_MODEL=accounts/fireworks/models/llama-3.3-70b-instruct
211
+ ```
212
+
213
+ ---
214
+
215
+ ### Cerebras
216
+
217
+ ```bash
218
+ AI_PROVIDER=cerebras
219
+ CEREBRAS_API_KEY=...
220
+ CEREBRAS_MODEL=cerebras/llama-3.3-70b
221
+ ```
222
+
223
+ ---
224
+
225
+ ### OpenRouter
226
+
227
+ ```bash
228
+ AI_PROVIDER=openrouter
229
+ OPENROUTER_API_KEY=...
230
+ OPENROUTER_MODEL=anthropic/claude-3.5-sonnet
231
+ ```
232
+
233
+ ---
234
+
235
+ ### Custom OpenAI-Compatible
236
+
237
+ For any OpenAI-compatible API:
238
+
239
+ ```bash
240
+ AI_PROVIDER=custom
241
+ CUSTOM_BASE_URL=https://api.your-provider.com/v1
242
+ CUSTOM_MODEL=your-model-name
243
+ CUSTOM_API_KEY=your-api-key
244
+ ```
245
+
246
+ ---
247
+
248
+ ## Memory Configuration
249
+
250
+ ### Vector Database
251
+
252
+ ```bash
253
+ # Database location (default: ./mastra.db)
254
+ DATABASE_URL=file:./mastra.db
255
+ ```
256
+
257
+ ### Embedding Model
258
+
259
+ ```bash
260
+ # Embedding model for semantic search
261
+ EMBEDDING_MODEL=openai/text-embedding-3-small
262
+ ```
263
+
264
+ **Options:**
265
+ - `openai/text-embedding-3-small` (Default, recommended)
266
+ - `openai/text-embedding-3-large` (Higher quality)
267
+ - `openai/text-embedding-ada-002` (Legacy)
268
+ - `google/gemini-embedding-001` (Google)
269
+
270
+ ### Semantic Recall
271
+
272
+ ```bash
273
+ # Number of similar messages to retrieve
274
+ SEMANTIC_RECALL_TOPK=5
275
+
276
+ # Messages before/after each match for context
277
+ SEMANTIC_RECALL_RANGE=2
278
+ ```
279
+
280
+ ---
281
+
282
+ ## Workspace Configuration
283
+
284
+ ### Podman Workspace (Optional)
285
+
286
+ For sandboxed code execution:
287
+
288
+ ```bash
289
+ # Agent identifier
290
+ PODMAN_AGENT_ID=sybil-agent
291
+
292
+ # Workspace directory on host
293
+ PODMAN_WORKSPACE_DIR=/path/to/workspace
294
+ ```
295
+
296
+ **Note:** Code execution runs in `/workspace` inside the container.
297
+
298
+ ---
299
+
300
+ ## WhatsApp Configuration
301
+
302
+ ### Puppeteer (Optional)
303
+
304
+ ```bash
305
+ # Custom Chromium executable path (if needed)
306
+ PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
307
+ ```
308
+
309
+ **Auto-detected on:**
310
+ - macOS: `/Applications/Google Chrome.app`
311
+ - Linux: `/usr/bin/chromium-browser` or `/usr/bin/google-chrome`
312
+ - Windows: Registry lookup
313
+
314
+ ### Session Persistence
315
+
316
+ WhatsApp sessions are automatically saved to:
317
+ - **Session:** `~/.sybil/whatsapp-session/`
318
+ - **Settings:** `~/.sybil/settings.json`
319
+
320
+ ---
321
+
322
+ ## Environment Variable Reference
323
+
324
+ | Variable | Required | Default | Description |
325
+ |----------|----------|---------|-------------|
326
+ | `TELEGRAM_BOT_TOKEN` | ✅ | - | Telegram bot token |
327
+ | `AI_PROVIDER` | ✅ | `ollama` | AI provider name |
328
+ | `OLLAMA_MODEL` | If Ollama | `llama3.2` | Ollama model name |
329
+ | `OLLAMA_BASE_URL` | If Ollama | `http://localhost:11434` | Ollama server URL |
330
+ | `OPENAI_API_KEY` | If OpenAI | - | OpenAI API key |
331
+ | `OPENAI_MODEL` | If OpenAI | `gpt-4o` | OpenAI model |
332
+ | `ANTHROPIC_API_KEY` | If Anthropic | - | Anthropic API key |
333
+ | `ANTHROPIC_MODEL` | If Anthropic | - | Anthropic model |
334
+ | `GOOGLE_GENERATIVE_AI_API_KEY` | If Google | - | Google API key |
335
+ | `GOOGLE_MODEL` | If Google | - | Google model |
336
+ | `GROQ_API_KEY` | If Groq | - | Groq API key |
337
+ | `GROQ_MODEL` | If Groq | - | Groq model |
338
+ | `MISTRAL_API_KEY` | If Mistral | - | Mistral API key |
339
+ | `MISTRAL_MODEL` | If Mistral | - | Mistral model |
340
+ | `DATABASE_URL` | ❌ | `file:./mastra.db` | Database location |
341
+ | `EMBEDDING_MODEL` | ❌ | `openai/text-embedding-3-small` | Embedding model |
342
+ | `PODMAN_AGENT_ID` | ❌ | - | Podman agent ID |
343
+ | `PODMAN_WORKSPACE_DIR` | ❌ | - | Workspace directory |
344
+ | `PUPPETEER_EXECUTABLE_PATH` | ❌ | Auto | Chromium path |
345
+
346
+ ---
347
+
348
+ ## Provider Selection Guide
349
+
350
+ ### For Beginners
351
+
352
+ **Recommended:** Ollama with `llama3.2`
353
+ - Free
354
+ - Private (runs locally)
355
+ - No API keys needed
356
+ - Works offline
357
+
358
+ ### For Production
359
+
360
+ **Recommended:** OpenAI with `gpt-4o` or Anthropic with `claude-3-5-sonnet`
361
+ - Most reliable
362
+ - Best performance
363
+ - Good balance of speed/quality
364
+
365
+ ### For Speed
366
+
367
+ **Recommended:** Groq with `llama-3.3-70b-versatile`
368
+ - Extremely fast responses
369
+ - Good quality
370
+ - Competitive pricing
371
+
372
+ ### For Budget
373
+
374
+ **Options:**
375
+ - Ollama (Free, local)
376
+ - OpenAI `gpt-4o-mini` (Cheapest)
377
+ - Groq (Fast, low cost)
378
+
379
+ ### For Privacy
380
+
381
+ **Recommended:** Ollama
382
+ - All data stays on your machine
383
+ - No API calls to external services
384
+ - Complete control
385
+
386
+ ---
387
+
388
+ ## Troubleshooting
389
+
390
+ ### "AI Provider not configured"
391
+
392
+ **Problem:** Missing or invalid AI provider configuration
393
+
394
+ **Solution:**
395
+ 1. Check `AI_PROVIDER` is set
396
+ 2. Verify provider-specific API keys
397
+ 3. Restart Sybil
398
+
399
+ ### "Telegram bot token invalid"
400
+
401
+ **Problem:** Invalid or expired Telegram token
402
+
403
+ **Solution:**
404
+ 1. Message [@BotFather](https://t.me/BotFather)
405
+ 2. Send `/token` to get new token
406
+ 3. Update `TELEGRAM_BOT_TOKEN`
407
+
408
+ ### "Cannot connect to Ollama"
409
+
410
+ **Problem:** Ollama not running or wrong URL
411
+
412
+ **Solution:**
413
+ ```bash
414
+ # Check if Ollama is running
415
+ curl http://localhost:11434/api/tags
416
+
417
+ # Start Ollama
418
+ ollama serve
419
+
420
+ # Verify model is downloaded
421
+ ollama pull llama3.2
422
+ ```
423
+
424
+ ### "Embedding model not available"
425
+
426
+ **Problem:** Embedding model requires different provider
427
+
428
+ **Solution:**
429
+ - OpenAI embeddings: Set `OPENAI_API_KEY`
430
+ - Or use Ollama for both LLM and embeddings
431
+
432
+ ---
433
+
434
+ ## Security Best Practices
435
+
436
+ 1. **Never commit `.env` file**
437
+ ```bash
438
+ # Ensure .env is in .gitignore
439
+ echo ".env" >> .gitignore
440
+ ```
441
+
442
+ 2. **Use environment-specific files**
443
+ ```bash
444
+ .env.development
445
+ .env.production
446
+ ```
447
+
448
+ 3. **Rotate API keys regularly**
449
+
450
+ 4. **Use least-privilege tokens**
451
+ - Telegram bot: Only bot token needed
452
+ - API keys: Use restricted keys when possible
453
+
454
+ 5. **Secure file permissions**
455
+ ```bash
456
+ chmod 600 .env
457
+ ```
458
+
459
+ ---
460
+
461
+ ## Advanced Configuration
462
+
463
+ ### Multiple Providers
464
+
465
+ You can configure multiple providers but only one is active:
466
+
467
+ ```bash
468
+ # Set the active provider
469
+ AI_PROVIDER=openai
470
+
471
+ # But configure others for easy switching
472
+ OPENAI_API_KEY=...
473
+ ANTHROPIC_API_KEY=...
474
+ GROQ_API_KEY=...
475
+
476
+ # Switch via CLI or Telegram
477
+ sybil config --set AI_PROVIDER=anthropic
478
+ ```
479
+
480
+ ### Custom Model Parameters
481
+
482
+ Add to agent configuration in code:
483
+
484
+ ```typescript
485
+ // src/agents/autonomous-agent.ts
486
+ export const autonomousAgent = new Agent({
487
+ model: openai("gpt-4o", {
488
+ temperature: 0.7,
489
+ maxTokens: 4096,
490
+ topP: 0.9,
491
+ }),
492
+ // ...
493
+ });
494
+ ```
495
+
496
+ ---
497
+
498
+ ## References
499
+
500
+ - [Getting Started](../tutorials/getting-started.md) - Setup guide
501
+ - [CLI Guide](../cli-tui.md) - Configuration commands
502
+ - [.env.example](../../../.env.example) - Complete example file