BoteX
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BOTEX_LANG | No | CLI language: en, pl, or auto. Overrides ui.language. Example: BOTEX_LANG=pl. | |
| BOTEX_REFERER | No | Attribution URL sent to OpenRouter in the HTTP-Referer header. | |
| BOTEX_ENV_FILE | No | Path to a custom .env file that contains OPENROUTER_API_KEY. An alternative to setting OPENROUTER_API_KEY directly. | |
| NVIDIA_API_KEY | No | Optional API key if using the NVIDIA provider. Resolved from this env var, .env, or botex.config.local.json (secrets.nvidia_api_key). | |
| BOTEX_MAX_TURNS | No | Maximum number of tool-loop steps per task. Example: BOTEX_MAX_TURNS=20. | |
| BOTEX_BUDGET_USD | No | Daily spend cap in USD. Example: BOTEX_BUDGET_USD=1.0. | |
| BOTEX_MAX_TOKENS | No | Per-turn completion token limit. Example: BOTEX_MAX_TOKENS=8000. | |
| BOTEX_TEMPERATURE | No | Sampling temperature. Example: BOTEX_TEMPERATURE=0.2. | |
| BOTEX_CODING_MODEL | No | Model slug for the coding profile. | |
| BOTEX_DEFAULT_MODE | No | Default capability mode: readonly, edit, destructive, full. Example: BOTEX_DEFAULT_MODE=edit. | |
| BOTEX_EXEC_ENABLED | No | Set to '1' to enable the run_command tool (requires exec.enabled and per-request authorization). Defaults to 'false'. | |
| BOTEX_SNAPSHOT_DIR | No | Directory where snapshots are stored. Defaults to .snapshots. | |
| OPENROUTER_API_KEY | No | Your OpenRouter API key. Required for provider calls. It can be supplied directly via this environment variable, via a .env file, BOTEX_ENV_FILE, or botex.config.local.json (secrets.openrouter_api_key). | |
| BOTEX_DEFAULT_MODEL | No | Explicit default model slug for the default provider profile. | |
| BOTEX_ANALYTICS_FILE | No | Path to the analytics ledger file. Defaults to .agent_analytics.json. | |
| BOTEX_AUTO_BETA_MODEL | No | Model slug for the auto-beta profile. | |
| BOTEX_DEFAULT_PROFILE | No | Default model profile: default, coding, fast, auto-beta. Example: BOTEX_DEFAULT_PROFILE=coding. | |
| BOTEX_PRICE_MAX_INPUT | No | Maximum input price per million tokens. 0 disables the cap. | |
| BOTEX_PRICE_MAX_OUTPUT | No | Maximum output price per million tokens. 0 disables the cap. | |
| BOTEX_ALLOW_DESTRUCTIVE | No | Set to '1' to globally enable destructive operations (delete_file/move_file). Defaults to 'false'. | |
| BOTEX_ANALYTICS_FULL_TEXT | No | Set to '1' to store full text in analytics. Defaults to 'false'. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_taskA | Start a detached BoteX task and return its task_id immediately. Runs the same engine as The capability/limits arguments are identical to
Returns:
{"task_id": str, "status": "QUEUED"} — poll with get_task_status.
The finished task's |
| get_task_statusA | Return status and result for a task started with start_task.
|
| fetch_urlA | Fetch one public http(s) text document for caller-side research. This tool is intentionally separate from BoteX's internal read_url: the orchestrating agent chooses the URL, so arbitrary public hosts do not have to be configured in net.allowed_hosts. SSRF protections, redirect revalidation, content-type checks, byte limits, and secret masking still apply. In net.policy='allowlist', only configured hosts may be fetched. |
| recommend_modelsB | [EN] Fetches the most cost-effective and capable models from OpenRouter based on live benchmarks.
USE THIS TOOL BEFORE calling [PL] Pobiera rekomendacje modeli z OpenRouter na podstawie benchmarków.
Użyj tego narzędzia ZANIM wywołasz |
| run_subagentA | Runs BoteX — an autonomous code execution engine (agent-agnostic harness). BoteX performs multi-step tasks on local files inside workspace_dir. TIP: If the user didn't specify a model, DO NOT guess. Use the Key engine features:
Args: task: Precise description of the coding or refactoring task. files: Optional list of primary files affected by the task. workspace_dir: Project directory path. Empty = engine.default_workspace from the config, else the server's current directory. model: Any model from the provider's catalog. Empty = model from config (see 'profile' and botex.config.json). profile: Model profile from botex.config.json (e.g. 'default', 'coding', 'auto-beta', 'fast'). When both 'model' and 'profile' are empty, the capability mode picks the tier via engine.mode_profiles (readonly -> 'fast', destructive/full -> 'coding'). Ignored when 'model' is given explicitly. provider: API provider from the 'providers' section of botex.config.json ('openrouter', 'nvidia', 'google', 'openrouter-free', 'ollama'). Empty = provider marked 'default: true' in the configuration. mode: Capability preset: 'readonly' (read only — the contract is an analysis report, DONE requires non-empty findings), 'edit' (read + edit — default), 'destructive' (+delete/move), 'full' (+run_command). Empty = engine.default_mode from config. Explicit allow_* flags may widen ordinary presets, but 'readonly' and 'chat' are hard read-only modes and cannot gain local writes, destructive operations, or command execution. In headless mode this is pre-authorization — grant it consciously. max_turns: Maximum tool-loop steps (0 = config value). max_tokens: Per-turn completion cap (0 = config value; reasoning models need ~8000+ since thinking shares this budget). max_duration_s: Total wall-clock limit in seconds (0 = config value, 0 disables only when config is also 0). Checked between turns. budget_limit_usd: Daily spend limit in USD (negative = config value, 0 = no limit). allow_destructive: Authorize destructive operations (delete_file/ move_file) for this task. Headless mode cannot confirm mid-run — grant ONLY with the user's consent. allow_exec: Authorize run_command for this task (also requires exec.enabled=true in config). WARNING: this is NOT a sandbox — commands run with operator privileges. Grant only for trusted workspaces with the user's consent. api_key: Optional provider API key passed per-request (highest priority — overrides env/.env/config). Empty = resolved internally by the harness. output_path: Optional required output file (workspace-relative). Sets the file_output contract: DONE is accepted only when the file exists on disk, is non-empty, and passes the syntax gate; a DONE response carrying the payload as text is salvaged to disk. Requires a mutating mode. allow_net: Explicitly authorizes the read-only public web tool for this run. It is never enabled by a capability mode. net_allowed_hosts: Optional per-run host authorization. In net.policy='caller' these replace config defaults; in 'public' they narrow public access; in 'allowlist' they must stay inside net.allowed_hosts. net_allowed_urls: Optional per-run URL authorization rules. A URL ending in '/' authorizes that subtree; otherwise it authorizes the exact URL including its query string. verify_command: Optional allowlisted command that must pass before DONE is accepted — it runs against the workspace as it stands, including when the task made no writes (a passing verifier validates a legitimate no-change result). Requires exec.enabled=true in config and exec authorization. recipe: Optional operational persona / workflow prompt (e.g. 'planner', 'code-explorer', 'reviewer', 'security-reviewer', 'build-resolver', 'tdd'). allow_non_zdr: Per-run consent to relax the Zero Data Retention gate. Required for free (:free) models whose endpoints may log or train on prompts — it also switches the wire provider.data_collection flag to 'allow'. Grant only with the operator's consent; the result carries zdr_enforced=false. The openrouter-free provider preset is the persistent config-level alternative. approval_policy: Operator approval policy for risky operations: 'none', 'high_risk' (default), 'mutations', 'all_risky'. Returns:
A pretty-text report in the text content (unchanged format for legacy
clients) plus the full engine result as structuredContent (status,
failure_kind, ok, files_touched, exec_ran, rollback_verified,
attempts[], cost_usd, ...). |
| get_outlineB | Returns a lightweight file skeleton (classes, methods, functions, headers, line numbers) without reading the whole file. Saves ~90% of tokens. |
| save_memoryA | Saves a persistent context note, architectural decision, task handoff, lesson, belief, or heuristic into the workspace or global shared Memory Vault. Masks secrets and provides directory isolation. Args: title: Short descriptive title of the memory entry. content: Detailed markdown notes, architectural rationale, or handoff context. workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. kind: Entry category ('context' | 'decision' | 'handoff' | 'lesson' | 'belief' | 'heuristic'). tags: Optional list of keyword tags for filtering and discovery. memory_id: Optional custom identifier (alphanumeric/hyphen/underscore). Auto-generated if omitted. scope: Storage scope ('local' for workspace, 'global' for cross-workspace). Default is 'local'. confidence: Certainty score in [0.0, 1.0] for belief/heuristic-style entries. Default 1.0. project: Optional project slug (e.g. 'botex', 'tw3se', 'swarm') for logical partitioning. origin: Optional provenance identifier '@'. Falls back to X-Agent-Id@X-Host session header or 'botex'. Reserved identity claims ('human', 'human-curated', 'operator', 'curator') are rejected. |
| search_memoryA | Searches the Memory Vault by keyword query, tag, or entry kind (context, decision, handoff, lesson, belief, heuristic) across local, global, or all scopes. Directly linked notes surface via spreading activation over the wikilink graph. Args: workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. query: Free-text search string matched against title, content, and tags. tag: Filter by specific tag. kind: Filter by entry kind ('context', 'decision', 'handoff', 'lesson', 'belief', 'heuristic'). scope: Search scope ('local', 'global', or 'all'). Default is 'local'. since: Optional ISO-8601 date/datetime lower bound on entry timestamps. until: Optional ISO-8601 date/datetime upper bound on entry timestamps. min_confidence: Optional minimum certainty threshold in [0.0, 1.0]. project: Optional project slug filter (or '_unassigned' for entries without a project). |
| reflect_memoryA | Synthesizes gathered facts, decisions, beliefs, and heuristics from the Memory Vault into an ordered reasoning digest (Hindsight-style reflection). Entries are grouped by kind (decisions, beliefs, heuristics, lessons, handoffs, context) and ranked by confidence and recency — fully deterministic and local, with no LLM calls. Args: query: Free-text query steering which memories to reflect on. workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. topic: Optional tag restricting the reflection to a thematic bucket. min_confidence: Minimum certainty threshold in [0.0, 1.0]. Default 0.5. scope: Reflection scope ('local', 'global', or 'all'). Default is 'all'. project: Optional project slug filter. |
| recall_memoryA | One-shot recall: ask the Memory Vault a natural-language question and get a synthesized answer with sources in a single call. BoteX gathers the top search hits plus their 1-hop graph neighbourhood (wikilinks + backlinks), then a server-side curator model (Ollama -> NVIDIA -> Gemini -> OpenRouter free) answers strictly from those notes. Falls back to a deterministic digest when no model is available. Use read_memory on a returned source only when you need the full raw note. Args: query: Natural-language question or topic. workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. topic: Optional tag restricting the search to a thematic bucket. scope: 'local', 'global', or 'all'. Default is 'all'. project: Optional project slug filter restricting initial search hits. Returns: {ok, answer, sources, confidence (HIGH|MEDIUM|LOW|NOT_FOUND), tier_used, context_nodes, truncated} |
| read_memoryA | Reads the full content and metadata of a specific memory entry by ID from the Memory Vault. Args: memory_id: The ID of the memory entry to retrieve (e.g. 'mem_a1b2c3d4'). workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. scope: Lookup scope ('local', 'global', or 'all'). Default is 'local'. |
| delete_memoryA | Deletes a specific memory entry by ID from the workspace or global Memory Vault and removes its index/graph links. Args: memory_id: The ID of the memory entry to delete (e.g. 'mem_a1b2c3d4'). workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. scope: Lookup scope ('local', 'global', or 'all'). Default is 'local'. |
| read_scratchpadB | Reads the full execution or terminal log offloaded to the scratchpad (.botex/scratchpad/<memory_id>.log). Args: memory_id: The ID of the scratchpad entry (e.g. 'mem_exec_a1b2c3d4'). workspace_dir: Workspace root directory. Empty = engine.default_workspace from the config, else the server's current directory. |
| get_backlinksC | Finds all memories that link TO the given memory_id via [[wikilinks]]. Args: memory_id: Target memory ID (e.g. 'mem_a1b2c3d4'). workspace_dir: Workspace root directory. scope: Lookup scope ('local', 'global', or 'all'). |
| patch_memory_sectionA | Surgically updates a Markdown section (e.g. '## Compiled Truth') in a memory note without modifying frontmatter, other sections, or the Timeline audit trail. Args: memory_id: Target memory ID to patch. section: Section heading to replace or create (default 'Compiled Truth'). new_content: New Markdown text for the section. workspace_dir: Workspace root directory. scope: Lookup scope ('local' or 'global'). append: Whether to append to existing section content instead of replacing. origin: Optional provenance identifier '@'. Falls back to X-Agent-Id@X-Host session header or 'botex'. |
| find_graph_healthB | Audits Memory Vault knowledge graph integrity: reports broken links, orphan notes, and cycles. Args: workspace_dir: Workspace root directory. scope: Lookup scope ('local', 'global', or 'all'). |
| init_obsidian_vaultA | Initializes or syncs Obsidian PKM vault configuration (.obsidian/graph.json, app.json) with preset color profiles for #decision, #lesson, #handoff, #context. Args: workspace_dir: Workspace root directory. scope: Target scope ('local' or 'global'). override_existing: Whether to overwrite existing .obsidian config files. export_index: Also generate dynamic _GRAPH_INDEX.md note. |
| swarm_list_botsA | Lists registered Tethered Bots with their active host leases and brief
metadata. Cloud Soul store is authoritative; entries that exist only in
the local edge fast-cache are merged in and marked Args: namespace: Optional exact namespace filter (empty = all namespaces). |
| bot_consultB | Single-hop (ttl_hops=1) consult of a registered Tethered Bot: returns its identity, bounded instructions excerpt, active brief, and a recall over the shared Memory Vault restricted to ACTIVE notes only. Bots unknown to both the Cloud Soul store and the local fast-cache get BOT_NOT_FOUND. Args: bot_id: Registered bot slug (alphanumeric/-/_ only). query: Natural-language question for the vault recall. |
| bot_report_activityA | Reports a bot's lease/heartbeat on a scope path into the Cloud Soul
Args: bot_id: Registered bot slug. scope_path: Lease scope (workspace path or identifier). summary: Short activity note (secret-masked before storage). fencing_token: Monotonic fencing token; higher wins on a live lease. |
| get_statsA | Returns an analytics summary of executed BoteX tasks (USD costs, token usage, code-line balance). Args: period: 'week' (last 7 days) or 'month' (last 30 days). |
| check_healthA | Checks BoteX environment readiness (provider keys, snapshot dir, disk). |
| clean_snapshotsC | Purges old or excess backup snapshots from disk. |
| botex_report_violationA | Records a swarm agent/model rule violation into the isolated BlackBox penal ledger (.botex/penal_vault.db), completely separated from the Memory Vault. When to call: during cross-review or handoff verification when you observe a verified contract breach (SEC_01 secrets/workspace breach, SKILL_01 skipped tests or test theater, SCOPE_01 diff explosion, HAL_01 hallucinated tools/paths, LOOP_01 3+ identical failures). Never log violations or penalties into save_memory. Args: offender: Target agent or model identifier (e.g. 'zcode-headless', 'botex:glm-5.3-flash'). violation_code: Canonical code ('SEC_01', 'SKILL_01', 'SCOPE_01', 'HAL_01', 'LOOP_01'). severity: Incident severity ('WARN', 'REJECT', 'CRITICAL'). Default 'REJECT'. skill_recipe: Optional skill/recipe active during the infraction. evidence_snippet: Concise log/diff excerpt (automatically secret-masked). workspace_dir: Target workspace path or 'edge://<device_id>/<workspace_id>' URI. enforcement_action: Action label ('PENALTY_LOGGED', 'HANDOFF_REJECTED', 'ESCALATED'). origin: Optional provenance identifier '@' of the reporting agent. |
| botex_get_rap_sheetA | Queries the isolated BlackBox penal ledger for an agent/model or workspace rap sheet. Returned evidence snippets are wrapped as untrusted data to block prompt injection. When to call: at cross-review start or when taking over a local or Edge workspace ('edge://<device_id>/<workspace_id>') from another agent to check recurring mistakes. Args: actor_agent: Optional offender filter (empty = all actors in workspace). workspace_dir: Target workspace path or 'edge://<device_id>/<workspace_id>' URI. limit: Max incidents to return (clamped to 1..200). window_days: Trailing lookback window in days (clamped to 1..365). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| resource_botex_caller_skill | Return the canonical caller-facing BoteX SKILL.md instructions. |
TDQS
Scored across 25 tools
Most tools have distinct targets, but the memory-retrieval cluster (search_memory vs recall_memory vs reflect_memory) overlaps conceptually, and run_subagent vs start_task are the same engine exposed two ways — differentiated only by long prose rather than by name. The violation/penalty tools are explicitly fenced off from save_memory, which helps, but an agent must read carefully to pick the right retrieval verb.
Nearly all names are snake_case verb_noun (save_memory, read_memory, patch_memory_section, get_task_status). Minor deviations exist: a botex_ prefix on the penal-ledger tools and swarm_list_bots (noun_verb_noun) break the verb-first pattern, and find_graph_health is really an audit/check rather than a 'find'.
25 tools is at the heavy end of the range even for a server spanning memory vault, task engine, swarm coordination, and a penal ledger. Each of the four sub-surfaces is reasonably sized on its own, but the combined surface is broad enough that discoverability and correct selection suffer.
Memory CRUD is mostly covered (save/read/delete/patch/search/graph), but there is no list/enumerate-memories tool and no metadata update (tags, confidence, title) apart from section patching. The task lifecycle is notably incomplete: get_task_status reports CANCELLED but there is no cancel_task or list-tasks operation, forcing agents to poll and wait out runs.