@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.
- package/.env copy +91 -0
- package/.env.example +139 -0
- package/BROWSER_CONTROL.md +354 -0
- package/CLI_CHAT_FEATURE.md +224 -0
- package/CLI_GUIDE.md +359 -0
- package/DYNAMIC_SKILLS.md +345 -0
- package/DockerFile.sandbox +14 -0
- package/PROGRESS.md +249 -0
- package/README.md +281 -0
- package/RENAME_LOG.md +62 -0
- package/SIMPLIFIED_TELEGRAM_UX.md +273 -0
- package/SYBIL_SUMMARY.md +360 -0
- package/TASK11_NETWORK.md +202 -0
- package/TASK14_CLI.md +432 -0
- package/TASK8_SAFETY.md +317 -0
- package/TASK9_COMPLETION.md +186 -0
- package/TASK9_SUMMARY.md +201 -0
- package/TELEGRAM_OTP_AUTH.md +359 -0
- package/VECTOR_MEMORY.md +163 -0
- package/assets/logo.png +0 -0
- package/cypfq_code_search.md +287 -0
- package/cypfq_driver_search.md +297 -0
- package/cypfq_github_search.md +297 -0
- package/cypfq_repo_search.md +370 -0
- package/dist/agents/autonomous-agent.d.ts +61 -0
- package/dist/agents/autonomous-agent.d.ts.map +1 -0
- package/dist/agents/autonomous-agent.js +536 -0
- package/dist/agents/autonomous-agent.js.map +1 -0
- package/dist/agents/network.d.ts +1006 -0
- package/dist/agents/network.d.ts.map +1 -0
- package/dist/agents/network.js +1266 -0
- package/dist/agents/network.js.map +1 -0
- package/dist/cli/commands/backup.d.ts +3 -0
- package/dist/cli/commands/backup.d.ts.map +1 -0
- package/dist/cli/commands/backup.js +63 -0
- package/dist/cli/commands/backup.js.map +1 -0
- package/dist/cli/commands/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +163 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +107 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +138 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/logs.d.ts +3 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/logs.js +81 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/otp.d.ts +3 -0
- package/dist/cli/commands/otp.d.ts.map +1 -0
- package/dist/cli/commands/otp.js +142 -0
- package/dist/cli/commands/otp.js.map +1 -0
- package/dist/cli/commands/restore.d.ts +3 -0
- package/dist/cli/commands/restore.d.ts.map +1 -0
- package/dist/cli/commands/restore.js +99 -0
- package/dist/cli/commands/restore.js.map +1 -0
- package/dist/cli/commands/start.d.ts +3 -0
- package/dist/cli/commands/start.d.ts.map +1 -0
- package/dist/cli/commands/start.js +65 -0
- package/dist/cli/commands/start.js.map +1 -0
- package/dist/cli/commands/status.d.ts +3 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +68 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +3 -0
- package/dist/cli/commands/stop.d.ts.map +1 -0
- package/dist/cli/commands/stop.js +62 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/update.d.ts +3 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +49 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/whatsapp.d.ts +3 -0
- package/dist/cli/commands/whatsapp.d.ts.map +1 -0
- package/dist/cli/commands/whatsapp.js +281 -0
- package/dist/cli/commands/whatsapp.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +58 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +750 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +109 -0
- package/dist/index.js.map +1 -0
- package/dist/mastra/index.d.ts +4 -0
- package/dist/mastra/index.d.ts.map +1 -0
- package/dist/mastra/index.js +37 -0
- package/dist/mastra/index.js.map +1 -0
- package/dist/mastra/memory.d.ts +9 -0
- package/dist/mastra/memory.d.ts.map +1 -0
- package/dist/mastra/memory.js +92 -0
- package/dist/mastra/memory.js.map +1 -0
- package/dist/processors/index.d.ts +74 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +153 -0
- package/dist/processors/index.js.map +1 -0
- package/dist/processors/semantic-recall.d.ts +63 -0
- package/dist/processors/semantic-recall.d.ts.map +1 -0
- package/dist/processors/semantic-recall.js +216 -0
- package/dist/processors/semantic-recall.js.map +1 -0
- package/dist/processors/tool-search.d.ts +26 -0
- package/dist/processors/tool-search.d.ts.map +1 -0
- package/dist/processors/tool-search.js +41 -0
- package/dist/processors/tool-search.js.map +1 -0
- package/dist/skills/dynamic/skill-generator.d.ts +169 -0
- package/dist/skills/dynamic/skill-generator.d.ts.map +1 -0
- package/dist/skills/dynamic/skill-generator.js +488 -0
- package/dist/skills/dynamic/skill-generator.js.map +1 -0
- package/dist/tools/agent-delegation-tools.d.ts +142 -0
- package/dist/tools/agent-delegation-tools.d.ts.map +1 -0
- package/dist/tools/agent-delegation-tools.js +263 -0
- package/dist/tools/agent-delegation-tools.js.map +1 -0
- package/dist/tools/browser-tools.d.ts +374 -0
- package/dist/tools/browser-tools.d.ts.map +1 -0
- package/dist/tools/browser-tools.js +752 -0
- package/dist/tools/browser-tools.js.map +1 -0
- package/dist/tools/dynamic/registry.d.ts +61 -0
- package/dist/tools/dynamic/registry.d.ts.map +1 -0
- package/dist/tools/dynamic/registry.js +121 -0
- package/dist/tools/dynamic/registry.js.map +1 -0
- package/dist/tools/dynamic/tool-generator.d.ts +99 -0
- package/dist/tools/dynamic/tool-generator.d.ts.map +1 -0
- package/dist/tools/dynamic/tool-generator.js +367 -0
- package/dist/tools/dynamic/tool-generator.js.map +1 -0
- package/dist/tools/extended-tools.d.ts +176 -0
- package/dist/tools/extended-tools.d.ts.map +1 -0
- package/dist/tools/extended-tools.js +464 -0
- package/dist/tools/extended-tools.js.map +1 -0
- package/dist/tools/library/calendar/index.d.ts +134 -0
- package/dist/tools/library/calendar/index.d.ts.map +1 -0
- package/dist/tools/library/calendar/index.js +160 -0
- package/dist/tools/library/calendar/index.js.map +1 -0
- package/dist/tools/podman-workspace-mcp-cli.d.ts +3 -0
- package/dist/tools/podman-workspace-mcp-cli.d.ts.map +1 -0
- package/dist/tools/podman-workspace-mcp-cli.js +12 -0
- package/dist/tools/podman-workspace-mcp-cli.js.map +1 -0
- package/dist/tools/podman-workspace-mcp.d.ts +247 -0
- package/dist/tools/podman-workspace-mcp.d.ts.map +1 -0
- package/dist/tools/podman-workspace-mcp.js +1093 -0
- package/dist/tools/podman-workspace-mcp.js.map +1 -0
- package/dist/tools/podman-workspace.d.ts +148 -0
- package/dist/tools/podman-workspace.d.ts.map +1 -0
- package/dist/tools/podman-workspace.js +682 -0
- package/dist/tools/podman-workspace.js.map +1 -0
- package/dist/tools/telegram-file-tools.d.ts +78 -0
- package/dist/tools/telegram-file-tools.d.ts.map +1 -0
- package/dist/tools/telegram-file-tools.js +294 -0
- package/dist/tools/telegram-file-tools.js.map +1 -0
- package/dist/tools/tool-registry.d.ts +467 -0
- package/dist/tools/tool-registry.d.ts.map +1 -0
- package/dist/tools/tool-registry.js +156 -0
- package/dist/tools/tool-registry.js.map +1 -0
- package/dist/tools/web-tools.d.ts +77 -0
- package/dist/tools/web-tools.d.ts.map +1 -0
- package/dist/tools/web-tools.js +416 -0
- package/dist/tools/web-tools.js.map +1 -0
- package/dist/tools/whatsapp-autoreply-tools.d.ts +118 -0
- package/dist/tools/whatsapp-autoreply-tools.d.ts.map +1 -0
- package/dist/tools/whatsapp-autoreply-tools.js +503 -0
- package/dist/tools/whatsapp-autoreply-tools.js.map +1 -0
- package/dist/tools/whatsapp-tools.d.ts +175 -0
- package/dist/tools/whatsapp-tools.d.ts.map +1 -0
- package/dist/tools/whatsapp-tools.js +566 -0
- package/dist/tools/whatsapp-tools.js.map +1 -0
- package/dist/utils/logger.d.ts +65 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +307 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/model-config.d.ts +73 -0
- package/dist/utils/model-config.d.ts.map +1 -0
- package/dist/utils/model-config.js +366 -0
- package/dist/utils/model-config.js.map +1 -0
- package/dist/utils/semantic-memory.d.ts +82 -0
- package/dist/utils/semantic-memory.d.ts.map +1 -0
- package/dist/utils/semantic-memory.js +189 -0
- package/dist/utils/semantic-memory.js.map +1 -0
- package/dist/utils/system.d.ts +2 -0
- package/dist/utils/system.d.ts.map +1 -0
- package/dist/utils/system.js +24 -0
- package/dist/utils/system.js.map +1 -0
- package/dist/utils/telegram-auth.d.ts +54 -0
- package/dist/utils/telegram-auth.d.ts.map +1 -0
- package/dist/utils/telegram-auth.js +146 -0
- package/dist/utils/telegram-auth.js.map +1 -0
- package/dist/utils/telegram.d.ts +7 -0
- package/dist/utils/telegram.d.ts.map +1 -0
- package/dist/utils/telegram.js +1494 -0
- package/dist/utils/telegram.js.map +1 -0
- package/dist/utils/whatsapp-client.d.ts +166 -0
- package/dist/utils/whatsapp-client.d.ts.map +1 -0
- package/dist/utils/whatsapp-client.js +722 -0
- package/dist/utils/whatsapp-client.js.map +1 -0
- package/dist/workflows/planner-workflow.d.ts +39 -0
- package/dist/workflows/planner-workflow.d.ts.map +1 -0
- package/dist/workflows/planner-workflow.js +165 -0
- package/dist/workflows/planner-workflow.js.map +1 -0
- package/dist/workflows/skill-builder-workflow.d.ts +16 -0
- package/dist/workflows/skill-builder-workflow.d.ts.map +1 -0
- package/dist/workflows/skill-builder-workflow.js +157 -0
- package/dist/workflows/skill-builder-workflow.js.map +1 -0
- package/dist/workspace/index.d.ts +23 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +64 -0
- package/dist/workspace/index.js.map +1 -0
- package/docs/README.md +140 -0
- package/docs/api/agents.md +481 -0
- package/docs/api/browser-tools.md +469 -0
- package/docs/api/memory.md +629 -0
- package/docs/architecture/agent-networks.md +586 -0
- package/docs/architecture/memory.md +579 -0
- package/docs/architecture/overview.md +436 -0
- package/docs/architecture/tools.md +637 -0
- package/docs/cli-tui.md +367 -0
- package/docs/guides/environment-variables.md +502 -0
- package/docs/guides/troubleshooting.md +882 -0
- package/docs/tutorials/agent-networks.md +432 -0
- package/docs/tutorials/dynamic-tools.md +469 -0
- package/docs/tutorials/getting-started.md +263 -0
- package/docs/tutorials/skills.md +561 -0
- package/docs/tutorials/web-browsing.md +329 -0
- package/mastra.db-shm +0 -0
- package/mastra.db-wal +0 -0
- package/package.json +71 -0
- package/plan.md +601 -0
- package/skills/code-review/SKILL.md +48 -0
- package/skills/task-planning/SKILL.md +55 -0
- package/skills/web-research/SKILL.md +79 -0
- package/skills/whatsapp-management/SKILL.md +78 -0
- package/src/agents/autonomous-agent.ts +626 -0
- package/src/agents/network.ts +1307 -0
- package/src/cli/commands/backup.ts +78 -0
- package/src/cli/commands/config.ts +176 -0
- package/src/cli/commands/doctor.ts +111 -0
- package/src/cli/commands/init.ts +150 -0
- package/src/cli/commands/logs.ts +94 -0
- package/src/cli/commands/otp.ts +162 -0
- package/src/cli/commands/restore.ts +118 -0
- package/src/cli/commands/start.ts +76 -0
- package/src/cli/commands/status.ts +81 -0
- package/src/cli/commands/stop.ts +68 -0
- package/src/cli/commands/update.ts +61 -0
- package/src/cli/commands/whatsapp.ts +322 -0
- package/src/cli/index.ts +69 -0
- package/src/cli.ts +830 -0
- package/src/index.ts +124 -0
- package/src/mastra/index.ts +49 -0
- package/src/mastra/memory.ts +99 -0
- package/src/mastra/public/workspace/plan.md +115 -0
- package/src/mastra/public/workspace/research/react-tailwind/skill.md +47 -0
- package/src/processors/index.ts +170 -0
- package/src/processors/semantic-recall.ts +277 -0
- package/src/processors/tool-search.ts +46 -0
- package/src/skills/dynamic/skill-generator.ts +568 -0
- package/src/tools/agent-delegation-tools.ts +301 -0
- package/src/tools/browser-tools.ts +792 -0
- package/src/tools/dynamic/registry.ts +144 -0
- package/src/tools/dynamic/tool-generator.ts +406 -0
- package/src/tools/extended-tools.ts +498 -0
- package/src/tools/library/calendar/index.ts +172 -0
- package/src/tools/podman-workspace-mcp-cli.ts +14 -0
- package/src/tools/podman-workspace-mcp.ts +1290 -0
- package/src/tools/podman-workspace.ts +858 -0
- package/src/tools/telegram-file-tools.ts +320 -0
- package/src/tools/tool-registry.ts +233 -0
- package/src/tools/web-tools.ts +461 -0
- package/src/tools/whatsapp-autoreply-tools.ts +616 -0
- package/src/tools/whatsapp-tools.ts +602 -0
- package/src/utils/logger.ts +368 -0
- package/src/utils/model-config.ts +437 -0
- package/src/utils/semantic-memory.ts +230 -0
- package/src/utils/system.ts +25 -0
- package/src/utils/telegram-auth.ts +201 -0
- package/src/utils/telegram.ts +1847 -0
- package/src/utils/whatsapp-client.ts +808 -0
- package/src/workflows/planner-workflow.ts +178 -0
- package/src/workflows/skill-builder-workflow.ts +175 -0
- package/src/workspace/index.ts +69 -0
- package/tsconfig.json +22 -0
- package/view-logs.sh +116 -0
- package/whatsapp-session.sh +197 -0
package/.env copy
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Environment Variables for sybil
|
|
2
|
+
|
|
3
|
+
# Required
|
|
4
|
+
TELEGRAM_BOT_TOKEN=8532380565:AAEDH2NMymW5LmgIPuZWkEC0zHfC-5r5jX4
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# ============================================
|
|
8
|
+
# AI Provider Configuration
|
|
9
|
+
# ============================================
|
|
10
|
+
# Choose your AI provider: openai, ollama, or ollama-cloud
|
|
11
|
+
# AI_PROVIDER=openai
|
|
12
|
+
|
|
13
|
+
# # --- OpenAI Configuration (default) ---
|
|
14
|
+
# OPENAI_API_KEY=your_openai_api_key_here
|
|
15
|
+
# OPENAI_MODEL=gpt-4o
|
|
16
|
+
|
|
17
|
+
# --- Ollama (Local) Configuration ---
|
|
18
|
+
# Uncomment and configure to use local Ollama instead of OpenAI
|
|
19
|
+
# AI_PROVIDER=ollama
|
|
20
|
+
# OLLAMA_MODEL=rnj-1
|
|
21
|
+
# OLLAMA_BASE_URL=http://localhost:11434/api
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# AI_PROVIDER=custom
|
|
26
|
+
# CUSTOM_BASE_URL=http://dhuvis-pc.local:1234/v1
|
|
27
|
+
# CUSTOM_MODEL=openai/gpt-oss-20b
|
|
28
|
+
# CUSTOM_API_KEY=sk-lm-ENRKUndS:GWGo6fh9Wi6sfqjdBqdK
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# CUSTOM_BASE_URL=https://integrate.api.nvidia.com/v1
|
|
32
|
+
# CUSTOM_MODEL=moonshotai/kimi-k2.5
|
|
33
|
+
# CUSTOM_API_KEY=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
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# curl http://localhost:1234/api/v1/chat \
|
|
39
|
+
# -H "Content-Type: application/json" \
|
|
40
|
+
# -d '{
|
|
41
|
+
# "model": "zai-org/glm-4.6v-flash:2",
|
|
42
|
+
# "system_prompt": "You answer only in rhymes.",
|
|
43
|
+
# "input": "What is your favorite color?"
|
|
44
|
+
# }'
|
|
45
|
+
|
|
46
|
+
# --- NVIDIA AI Configuration ---
|
|
47
|
+
AI_PROVIDER=nvidia
|
|
48
|
+
NVIDIA_API_KEY=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
|
|
49
|
+
NVIDIA_MODEL=openai/gpt-oss-120b
|
|
50
|
+
|
|
51
|
+
# --- Ollama Cloud Configuration ---
|
|
52
|
+
# Uncomment and configure to use Ollama Cloud
|
|
53
|
+
# AI_PROVIDER=ollama-cloud
|
|
54
|
+
# OLLAMA_API_KEY=your_ollama_cloud_api_key_here
|
|
55
|
+
# OLLAMA_CLOUD_MODEL=ollama-cloud/cogito-2.1:671b
|
|
56
|
+
|
|
57
|
+
# ============================================
|
|
58
|
+
# Optional Settings
|
|
59
|
+
# ============================================
|
|
60
|
+
DATABASE_URL=file:./mastra.db
|
|
61
|
+
|
|
62
|
+
# ============================================
|
|
63
|
+
# Vector & Semantic Search Configuration
|
|
64
|
+
# ============================================
|
|
65
|
+
# Embedding model for semantic memory search
|
|
66
|
+
# Options: openai/text-embedding-3-small, openai/text-embedding-3-large,
|
|
67
|
+
# openai/text-embedding-ada-002, google/gemini-embedding-001
|
|
68
|
+
EMBEDDING_MODEL=nvidia/nvidia/nv-embed-v1
|
|
69
|
+
# Semantic Recall Configuration (optional)
|
|
70
|
+
SEMANTIC_RECALL_TOPK=5 # Number of similar messages to retrieve
|
|
71
|
+
SEMANTIC_RECALL_RANGE=2 # Messages before/after each match
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
PODMAN_WORKSPACE_DIR=/Users/davindersingh/projects/dokkubot/workspace
|
|
75
|
+
PODMAN_AGENT_ID=sybil-agent-007
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# Enable/disable
|
|
79
|
+
WHATSAPP_AUTOREPLY_ENABLED=true
|
|
80
|
+
# Mode: manual (pending approval), auto (always send), smart (confidence-based)
|
|
81
|
+
WHATSAPP_AUTOREPLY_MODE=smart
|
|
82
|
+
# Debounce time in minutes (1-30)
|
|
83
|
+
WHATSAPP_AUTOREPLY_DEBOUNCE_MINUTES=1
|
|
84
|
+
# Max replies per hour per contact
|
|
85
|
+
WHATSAPP_AUTOREPLY_MAX_REPLIES_PER_HOUR=10
|
|
86
|
+
# Comma-separated phone numbers
|
|
87
|
+
# WHATSAPP_AUTOREPLY_WHITELIST=1234567890,9876543210
|
|
88
|
+
WHATSAPP_AUTOREPLY_BLACKLIST=1111111111,2222222222
|
|
89
|
+
# Custom context and instructions
|
|
90
|
+
WHATSAPP_AUTOREPLY_USER_CONTEXT="I'm a busy professional"
|
|
91
|
+
WHATSAPP_AUTOREPLY_CUSTOM_INSTRUCTIONS="Reply concisely and professionally"
|
package/.env.example
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Environment Variables for sybil
|
|
2
|
+
|
|
3
|
+
# Required
|
|
4
|
+
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
|
|
5
|
+
|
|
6
|
+
# ============================================
|
|
7
|
+
# AI Provider Configuration
|
|
8
|
+
# ============================================
|
|
9
|
+
# Choose your AI provider: openai, ollama, or ollama-cloud
|
|
10
|
+
AI_PROVIDER=ollama
|
|
11
|
+
|
|
12
|
+
# --- Ollama (Local) Configuration (RECOMMENDED - Free & Private! 🏠) ---
|
|
13
|
+
AI_PROVIDER=ollama
|
|
14
|
+
OLLAMA_MODEL=llama3.2
|
|
15
|
+
OLLAMA_BASE_URL=http://localhost:11434
|
|
16
|
+
|
|
17
|
+
# --- OpenAI Configuration ---
|
|
18
|
+
# AI_PROVIDER=openai
|
|
19
|
+
# OPENAI_API_KEY=your_openai_api_key_here
|
|
20
|
+
# OPENAI_MODEL=gpt-4o
|
|
21
|
+
|
|
22
|
+
# --- Ollama Cloud Configuration ---
|
|
23
|
+
# AI_PROVIDER=ollama-cloud
|
|
24
|
+
# OLLAMA_API_KEY=your_ollama_cloud_api_key_here
|
|
25
|
+
# OLLAMA_CLOUD_MODEL=ollama-cloud/cogito-2.1:671b
|
|
26
|
+
|
|
27
|
+
# --- NVIDIA AI Configuration ---
|
|
28
|
+
# AI_PROVIDER=nvidia
|
|
29
|
+
# NVIDIA_API_KEY=your_nvidia_api_key_here
|
|
30
|
+
# NVIDIA_MODEL=nvidia/llama-3.1-nemotron-70b-instruct
|
|
31
|
+
|
|
32
|
+
# --- Anthropic (Claude) Configuration ---
|
|
33
|
+
# AI_PROVIDER=anthropic
|
|
34
|
+
# ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
|
35
|
+
# ANTHROPIC_MODEL=claude-4-5-sonnet
|
|
36
|
+
|
|
37
|
+
# --- Google Gemini Configuration ---
|
|
38
|
+
# AI_PROVIDER=google
|
|
39
|
+
# GOOGLE_GENERATIVE_AI_API_KEY=your_google_api_key_here
|
|
40
|
+
# GOOGLE_MODEL=gemini-2.5-flash
|
|
41
|
+
|
|
42
|
+
# --- DeepSeek Configuration ---
|
|
43
|
+
# AI_PROVIDER=deepseek
|
|
44
|
+
# DEEPSEEK_API_KEY=your_deepseek_api_key_here
|
|
45
|
+
# DEEPSEEK_MODEL=deepseek-r1
|
|
46
|
+
|
|
47
|
+
# --- Groq (Fast!) Configuration ---
|
|
48
|
+
# AI_PROVIDER=groq
|
|
49
|
+
# GROQ_API_KEY=your_groq_api_key_here
|
|
50
|
+
# GROQ_MODEL=llama-3.3-70b-versatile
|
|
51
|
+
|
|
52
|
+
# --- Mistral AI Configuration ---
|
|
53
|
+
# AI_PROVIDER=mistral
|
|
54
|
+
# MISTRAL_API_KEY=your_mistral_api_key_here
|
|
55
|
+
# MISTRAL_MODEL=mistral-large-latest
|
|
56
|
+
|
|
57
|
+
# --- xAI (Grok) Configuration ---
|
|
58
|
+
# AI_PROVIDER=xai
|
|
59
|
+
# XAI_API_KEY=your_xai_api_key_here
|
|
60
|
+
# XAI_MODEL=grok-4
|
|
61
|
+
|
|
62
|
+
# --- Perplexity Configuration ---
|
|
63
|
+
# AI_PROVIDER=perplexity
|
|
64
|
+
# PERPLEXITY_API_KEY=your_perplexity_api_key_here
|
|
65
|
+
# PERPLEXITY_MODEL=llama-3.1-sonar-small-128k-online
|
|
66
|
+
|
|
67
|
+
# --- Cohere Configuration ---
|
|
68
|
+
# AI_PROVIDER=cohere
|
|
69
|
+
# COHERE_API_KEY=your_cohere_api_key_here
|
|
70
|
+
# COHERE_MODEL=command-r-plus
|
|
71
|
+
|
|
72
|
+
# --- Hugging Face Configuration ---
|
|
73
|
+
# AI_PROVIDER=huggingface
|
|
74
|
+
# HUGGINGFACE_API_KEY=your_huggingface_api_key_here
|
|
75
|
+
# HUGGINGFACE_MODEL=meta-llama/Llama-3.2-90B-Vision-Instruct
|
|
76
|
+
|
|
77
|
+
# --- Together AI Configuration ---
|
|
78
|
+
# AI_PROVIDER=togetherai
|
|
79
|
+
# TOGETHER_API_KEY=your_together_api_key_here
|
|
80
|
+
# TOGETHERAI_MODEL=meta-llama/Llama-3.3-70B-Instruct-Turbo
|
|
81
|
+
|
|
82
|
+
# --- Fireworks AI Configuration ---
|
|
83
|
+
# AI_PROVIDER=fireworks-ai
|
|
84
|
+
# FIREWORKS_API_KEY=your_fireworks_api_key_here
|
|
85
|
+
# FIREWORKS_MODEL=accounts/fireworks/models/llama-3.3-70b-instruct
|
|
86
|
+
|
|
87
|
+
# --- Cerebras Configuration ---
|
|
88
|
+
# AI_PROVIDER=cerebras
|
|
89
|
+
# CEREBRAS_API_KEY=your_cerebras_api_key_here
|
|
90
|
+
# CEREBRAS_MODEL=cerebras/llama-3.3-70b
|
|
91
|
+
|
|
92
|
+
# --- OpenRouter Configuration ---
|
|
93
|
+
# AI_PROVIDER=openrouter
|
|
94
|
+
# OPENROUTER_API_KEY=your_openrouter_api_key_here
|
|
95
|
+
# OPENROUTER_MODEL=anthropic/claude-haiku-4-5
|
|
96
|
+
|
|
97
|
+
# --- Custom OpenAI-Compatible Configuration ---
|
|
98
|
+
# AI_PROVIDER=custom
|
|
99
|
+
# CUSTOM_BASE_URL=http://your-custom-endpoint.com/v1
|
|
100
|
+
# CUSTOM_MODEL=your-model-name
|
|
101
|
+
# CUSTOM_API_KEY=your-api-key
|
|
102
|
+
|
|
103
|
+
# ============================================
|
|
104
|
+
# Vector & Semantic Search Configuration
|
|
105
|
+
# ============================================
|
|
106
|
+
# Embedding model for semantic memory search
|
|
107
|
+
# Options: openai/text-embedding-3-small, openai/text-embedding-3-large,
|
|
108
|
+
# openai/text-embedding-ada-002, google/gemini-embedding-001
|
|
109
|
+
EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
110
|
+
|
|
111
|
+
# Semantic Recall Configuration (optional)
|
|
112
|
+
SEMANTIC_RECALL_TOPK=5 # Number of similar messages to retrieve
|
|
113
|
+
SEMANTIC_RECALL_RANGE=2 # Messages before/after each match
|
|
114
|
+
|
|
115
|
+
# ============================================
|
|
116
|
+
# Optional Settings
|
|
117
|
+
# ============================================
|
|
118
|
+
DATABASE_URL=file:./mastra.db
|
|
119
|
+
|
|
120
|
+
# ============================================
|
|
121
|
+
# Podman Workspace Configuration (Optional)
|
|
122
|
+
# ============================================
|
|
123
|
+
# Configuration for Podman sandbox MCP server
|
|
124
|
+
# PODMAN_AGENT_ID=your-agent-id
|
|
125
|
+
# PODMAN_WORKSPACE_DIR=/path/to/workspace
|
|
126
|
+
|
|
127
|
+
# ============================================
|
|
128
|
+
# WhatsApp Web Configuration
|
|
129
|
+
# ============================================
|
|
130
|
+
# Custom Puppeteer executable path (if needed)
|
|
131
|
+
# PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
132
|
+
|
|
133
|
+
# ============================================
|
|
134
|
+
# Session Persistence
|
|
135
|
+
# ============================================
|
|
136
|
+
# WhatsApp sessions and settings are automatically saved to:
|
|
137
|
+
# - ~/.sybil/whatsapp-session/ (WhatsApp Web session)
|
|
138
|
+
# - ~/.sybil/settings.json (bot settings)
|
|
139
|
+
#
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
# Browser Control & HTML to Markdown Conversion
|
|
2
|
+
|
|
3
|
+
**Status:** ✅ COMPLETED
|
|
4
|
+
**Date:** February 12, 2026
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Successfully added complete browser automation and HTML to Markdown conversion capabilities to all Sybil agents. Agents can now browse the web, interact with websites, and save content as clean Markdown files.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Browser Tools Implemented
|
|
15
|
+
|
|
16
|
+
### Core Browsing Tools (11 tools):
|
|
17
|
+
|
|
18
|
+
1. **`browser-screenshot`**
|
|
19
|
+
- Take screenshots of web pages
|
|
20
|
+
- Save to file or return as base64
|
|
21
|
+
- Full page or viewport capture
|
|
22
|
+
|
|
23
|
+
2. **`browser-navigate`**
|
|
24
|
+
- Navigate to URLs
|
|
25
|
+
- Track page load time
|
|
26
|
+
- Return page title and URL
|
|
27
|
+
|
|
28
|
+
3. **`browser-get-content`** ⭐ **ENHANCED**
|
|
29
|
+
- Extract text content from pages
|
|
30
|
+
- Include HTML output option
|
|
31
|
+
- **NEW: Include Markdown output option** ✨
|
|
32
|
+
- Use CSS selectors for specific elements
|
|
33
|
+
|
|
34
|
+
4. **`browser-execute-script`**
|
|
35
|
+
- Run JavaScript on pages
|
|
36
|
+
- Return execution results
|
|
37
|
+
- For dynamic content and interactions
|
|
38
|
+
|
|
39
|
+
5. **`browser-click`**
|
|
40
|
+
- Click elements by CSS selector
|
|
41
|
+
- Navigate before clicking
|
|
42
|
+
- Handle JavaScript-triggered actions
|
|
43
|
+
|
|
44
|
+
6. **`browser-type`**
|
|
45
|
+
- Type text into input fields
|
|
46
|
+
- Clear field before typing
|
|
47
|
+
- Fill forms automatically
|
|
48
|
+
|
|
49
|
+
7. **`browser-wait-for`**
|
|
50
|
+
- Wait for elements to appear
|
|
51
|
+
- Multiple wait states (visible, attached, hidden, detached)
|
|
52
|
+
- Configurable timeout
|
|
53
|
+
|
|
54
|
+
8. **`browser-get-links`**
|
|
55
|
+
- Extract all links from a page
|
|
56
|
+
- Get href and text for each link
|
|
57
|
+
- Useful for site mapping
|
|
58
|
+
|
|
59
|
+
9. **`browser-google-search`** ⭐ **NEW**
|
|
60
|
+
- Perform Google searches
|
|
61
|
+
- Return top 10 results
|
|
62
|
+
- Get titles, URLs, and snippets
|
|
63
|
+
|
|
64
|
+
10. **`browser-scroll-to`**
|
|
65
|
+
- Scroll to elements
|
|
66
|
+
- Scroll by pixels
|
|
67
|
+
- Scroll to top/center/bottom
|
|
68
|
+
|
|
69
|
+
11. **`browser-close-session`**
|
|
70
|
+
- Close browser sessions
|
|
71
|
+
- Clean up resources
|
|
72
|
+
- Manage multiple concurrent sessions
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Markdown Conversion Tools (2 tools):
|
|
76
|
+
|
|
77
|
+
1. **`html-to-markdown`** ⭐ **NEW**
|
|
78
|
+
- Convert HTML to Markdown format
|
|
79
|
+
- Clean, readable output
|
|
80
|
+
- Word count included
|
|
81
|
+
- ATX headings, fenced code blocks
|
|
82
|
+
|
|
83
|
+
2. **`browser-save-content`** ⭐ **NEW**
|
|
84
|
+
- Extract page content as Markdown
|
|
85
|
+
- Save to workspace `.md` files
|
|
86
|
+
- Auto-generate filename with title
|
|
87
|
+
- Overwrite protection
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Integration
|
|
92
|
+
|
|
93
|
+
### Added to All Agents:
|
|
94
|
+
|
|
95
|
+
✅ **Autonomous Agent** - Full browsing capabilities
|
|
96
|
+
✅ **Researcher Agent** - Web research & fact-checking
|
|
97
|
+
✅ **Executor Agent** - Task execution with automation
|
|
98
|
+
✅ **Planner Agent** - Navigate complex workflows
|
|
99
|
+
✅ **WhatsApp Agent** - Can now browse for contact info
|
|
100
|
+
✅ **Routing Agent** - Coordinates web-based tasks
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Usage Examples
|
|
105
|
+
|
|
106
|
+
### Basic Navigation & Content Extraction
|
|
107
|
+
```typescript
|
|
108
|
+
// Navigate to a page
|
|
109
|
+
await browserNavigate({ url: "https://example.com" });
|
|
110
|
+
|
|
111
|
+
// Extract content with Markdown
|
|
112
|
+
const result = await browserGetContent({
|
|
113
|
+
url: "https://example.com",
|
|
114
|
+
includeMarkdown: true,
|
|
115
|
+
includeHTML: true,
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Returns:**
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"success": true,
|
|
123
|
+
"title": "Example Domain",
|
|
124
|
+
"url": "https://example.com",
|
|
125
|
+
"content": "Example Domain...",,
|
|
126
|
+
"html": "<!DOCTYPE html>...",
|
|
127
|
+
"markdown": "# Example Domain\n\nThis domain..."
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Google Search
|
|
132
|
+
```typescript
|
|
133
|
+
// Search Google
|
|
134
|
+
const results = await browserGoogleSearch({
|
|
135
|
+
query: "AI trends 2026"
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Returns:**
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"success": true,
|
|
143
|
+
"query": "AI trends 2026",
|
|
144
|
+
"results": [
|
|
145
|
+
{ "title": "AI Trends...", "url": "...", "snippet": "..." },
|
|
146
|
+
// ... up to 10 results
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Save Page as Markdown
|
|
152
|
+
```typescript
|
|
153
|
+
// Save entire page
|
|
154
|
+
await browserSaveContent({
|
|
155
|
+
url: "https://example.com/article",
|
|
156
|
+
filename: "my-article", // Saves as workspace/my-article.md
|
|
157
|
+
overwrite: true,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// Save specific section
|
|
161
|
+
await browserSaveContent({
|
|
162
|
+
url: "https://example.com/article",
|
|
163
|
+
selector: "article",
|
|
164
|
+
filename: "article-section",
|
|
165
|
+
});
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Returns:**
|
|
169
|
+
```json
|
|
170
|
+
{
|
|
171
|
+
"success": true,
|
|
172
|
+
"filepath": "/path/to/workspace/my-article.md",
|
|
173
|
+
"wordCount": 1523
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Convert HTML to Markdown
|
|
178
|
+
```typescript
|
|
179
|
+
// Convert HTML string
|
|
180
|
+
const result = await htmlToMarkdown({
|
|
181
|
+
html: "<h1>Title</h1><p>Content</p>"
|
|
182
|
+
});
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Returns:**
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"success": true,
|
|
189
|
+
"markdown": "# Title\n\nContent",
|
|
190
|
+
"wordCount": 2
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Form Automation
|
|
195
|
+
```typescript
|
|
196
|
+
// Navigate and fill form
|
|
197
|
+
await browserNavigate({ url: "https://example.com/form" });
|
|
198
|
+
await browserType({
|
|
199
|
+
selector: "#name",
|
|
200
|
+
text: "John Doe"
|
|
201
|
+
});
|
|
202
|
+
await browserType({
|
|
203
|
+
selector: "#email",
|
|
204
|
+
text: "john@example.com"
|
|
205
|
+
});
|
|
206
|
+
await browserClick({
|
|
207
|
+
selector: "button[type='submit']"
|
|
208
|
+
});
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Features
|
|
214
|
+
|
|
215
|
+
### Browser Session Management:
|
|
216
|
+
- **Multiple Sessions:** Create isolated browser sessions with different session IDs
|
|
217
|
+
- **Concurrent Use:** Multiple pages per session
|
|
218
|
+
- **Auto Cleanup:** Automatically closes browsers on process exit
|
|
219
|
+
- **Resource Management:** Efficient handling of browser instances
|
|
220
|
+
|
|
221
|
+
### Markdown Conversion:
|
|
222
|
+
- **Clean Formatting:** Well-structured Markdown output
|
|
223
|
+
- **Preserves Structure:** Headings, lists, code blocks, links
|
|
224
|
+
- **ATX Headings:** `# H1`, `## H2`, etc.
|
|
225
|
+
- **Fenced Code Blocks:** \`\`\` code blocks
|
|
226
|
+
- **Character Encoding:** UTF-8 support
|
|
227
|
+
|
|
228
|
+
### Configuration:
|
|
229
|
+
```bash
|
|
230
|
+
# Environment Variables
|
|
231
|
+
BROWSER_HEADLESS=false # Show browser (default: true for headless)
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Turndown Options:
|
|
235
|
+
- **headings:** ATX style (`# H1`, `## H2`)
|
|
236
|
+
- **code blocks:** Fenced code blocks (\`\`\`)
|
|
237
|
+
- **horizontal rule:** `---`
|
|
238
|
+
- **strikethrough:** `~~text~~`
|
|
239
|
+
- **emphasis:** bold `**text**`, italic `_text_`
|
|
240
|
+
- **links:** `[text](url)`
|
|
241
|
+
|
|
242
|
+
### Page Content Formats:
|
|
243
|
+
- **Text:** Plain text content
|
|
244
|
+
- **HTML:** Full HTML source
|
|
245
|
+
- **Markdown:** Clean readable format
|
|
246
|
+
- **Screenshots:** Base64 images
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Capabilities for Agents
|
|
251
|
+
|
|
252
|
+
### Research Agent:
|
|
253
|
+
```typescript
|
|
254
|
+
// Agent can research and save articles
|
|
255
|
+
await browserGoogleSearch({ query: "latest AI research papers" });
|
|
256
|
+
await browserNavigate({ url: "https://arxiv.org/..." });
|
|
257
|
+
await browserSaveContent({ filename: "ai-research" });
|
|
258
|
+
await browserCloseSession();
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Executor Agent:
|
|
262
|
+
```typescript
|
|
263
|
+
// Agent can complete web-based tasks
|
|
264
|
+
await browserNavigate({ url: "https://example.com/dashboard" });
|
|
265
|
+
await browserClick({ selector: "#create-button" });
|
|
266
|
+
await browserType({ selector: "#input-name", text: "Task Name" });
|
|
267
|
+
await browserScreenshot({});
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Autonomous Agent:
|
|
271
|
+
```typescript
|
|
272
|
+
// Agent can browse and learn from the web
|
|
273
|
+
await browserNavigate({ url: "https://docs.python.org/3/tutorial" });
|
|
274
|
+
const content = await browserGetContent({
|
|
275
|
+
url: "https://docs.python.org/3/tutorial",
|
|
276
|
+
includeMarkdown: true
|
|
277
|
+
});
|
|
278
|
+
const md = await htmlToMarkdown({ html: content.html });
|
|
279
|
+
// Use markdown in learning process
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## File System Integration
|
|
285
|
+
|
|
286
|
+
### Supported Operations:
|
|
287
|
+
- **Extract to Markdown:** Save web content as `.md` files
|
|
288
|
+
- **Workspace Storage:** Files saved to `./workspace/` directory
|
|
289
|
+
- **Title Extraction:** Auto-generates Markdown title from page title
|
|
290
|
+
- **Selective Saving:** Save specific elements using CSS selectors
|
|
291
|
+
- **Overwrite Protection:** Prevent accidental file overwrites
|
|
292
|
+
|
|
293
|
+
### Example:
|
|
294
|
+
```bash
|
|
295
|
+
./workspace/
|
|
296
|
+
├── my-article.md # Full page saved
|
|
297
|
+
├── article-section.md # Specific section
|
|
298
|
+
└── research-notes.md # Search result saved
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Dependencies Installed
|
|
304
|
+
|
|
305
|
+
- ✅ **playwright** - Browser automation framework
|
|
306
|
+
- ✅ **turndown** - HTML to Markdown converter
|
|
307
|
+
- ✅ **@types/turndown** - TypeScript types
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## Benefits
|
|
312
|
+
|
|
313
|
+
✅ **Web Automation** - Agents can browse and interact with websites
|
|
314
|
+
✅ **Content Conversion** - HTML to clean Markdown
|
|
315
|
+
✅ **Research Capabilities** - Google search and content extraction
|
|
316
|
+
✅ **Task Automation** - Form filling and clicking
|
|
317
|
+
✅ **Screenshot Capture** - Visual state documentation
|
|
318
|
+
✅ **Multi-Session** - Multiple browser instances
|
|
319
|
+
✅ **File Saving** - Archive web content as Markdown
|
|
320
|
+
✅ **Session Management** - Clean resource handling
|
|
321
|
+
✅ **Headless Option** - Run visible or invisible browsers
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Testing
|
|
326
|
+
|
|
327
|
+
Build successful ✅
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
npm run build
|
|
331
|
+
# No compilation errors
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Chromium browser installed ✅
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
npx playwright install chromium
|
|
338
|
+
# Browser binaries downloaded
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Next Steps
|
|
344
|
+
|
|
345
|
+
- Consider adding visual testing capabilities
|
|
346
|
+
- Add retry logic for flaky network operations
|
|
347
|
+
- Implement browser-specific user agents
|
|
348
|
+
- Add cookie/session management for logged-in state
|
|
349
|
+
- Add headless/visible mode toggle
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
**Completed by:** OpenCode Agent
|
|
354
|
+
**Last Updated:** February 12, 2026
|