bot/workspace/TOOLS.md
IMPORTANT: Always use OpenViking first for knowledge queries and memory storage
When querying information or files, always use OpenViking tools first before web search or other methods.
openviking_search(query: str, target_uri: str = None) -> str
Search for knowledge, documents, code, and resources in OpenViking. Use this as the first step for any information query.
openviking_read(uri: str, level: str = "abstract") -> str
Read resource content from OpenViking. Levels: abstract (summary), overview, read (full content).
openviking_list(uri: str, recursive: bool = False) -> str
List all resources at a specified path.
openviking_memory_commit(session_id: str, messages: list) -> str
All user's important conversations, information, and memories MUST be committed to OpenViking for future retrieval and context understanding.
Execute a shell command and return output.
exec(command: str, working_dir: str = None) -> str
Safety Notes:
restrictToWorkspace config to limit pathsSearch the web using configurable backend (Brave Search, DuckDuckGo, or Exa).
web_search(query: str, count: int = 5, type: str = None, livecrawl: str = None) -> str
Returns search results with titles, URLs, and snippets. Requires API key configuration.
count: Number of results (1-20, default 5)type (Exa only): Search type - "auto", "fast", or "deep"livecrawl (Exa only): Live crawl mode - "fallback" or "preferred"Fetch and extract main content from a URL.
web_fetch(url: str, extractMode: str = "markdown", maxChars: int = 50000) -> str
Notes:
Generate images from scratch, edit existing images, or create variations.
generate_image(
mode: str = "generate",
prompt: str = None,
base_image: str = None,
mask: str = None,
size: str = "1920x1920",
quality: str = "standard",
style: str = "vivid",
n: int = 1
) -> str
Modes:
generate: Generate from scratch (requires prompt)edit: Edit existing image (requires prompt and base_image)variation: Create variations (requires base_image)Parameters:
base_image: Base image for edit/variation: base64 data URI, URL, or file pathmask: Mask image for edit mode (optional, transparent areas indicate where to editsize: Image size (only "1920x1920" supported)quality: "standard" or "hd"style: "vivid" or "natural" (DALL-E 3 only)n: Number of images (1-4)Send a message to the user (used internally).
message(content: str) -> str
Spawn a subagent to handle a task in the background.
spawn(task: str, label: str = None) -> str
Use for complex or time-consuming tasks that can run independently. The subagent will complete the task and report back when done.
Use the cron tool to create scheduled reminders:
# Every day at 9am
cron(
action="add",
name="morning",
message="Good morning! ☀️",
cron_expr="0 9 * * *"
)
# Every 2 hours
cron(
action="add",
name="water",
message="Drink water! 💧",
every_seconds=7200
)
# At a specific time (ISO format)
cron(
action="add",
name="meeting",
message="Meeting starts now!",
at="2025-01-31T15:00:00"
)
# List all jobs
cron(
action="list"
)
# Remove a job
cron(
action="remove",
job_id="<job_id>"
)
The HEARTBEAT.md file in the workspace is checked at regular intervals.
Use file operations to manage periodic tasks:
# Append a new task
edit_file(
path="HEARTBEAT.md",
old_text="## Example Tasks",
new_text="- [ ] New periodic task here\n\n## Example Tasks"
)
# Remove a specific task
edit_file(
path="HEARTBEAT.md",
old_text="- [ ] Task to remove\n",
new_text=""
)
# Replace the entire file
write_file(
path="HEARTBEAT.md",
content="# Heartbeat Tasks\n\n- [ ] Task 1\n- [ ] Task 2\n"
)