Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ htmlcov-report
experiment_service_pb2.py
experiment_service_pb2_grpc.py
settings.json
laumch.json
launch.json
pkg_main.py
_version.py
.wl_opencode.json

# Ignore extensions
*.onnx
Expand Down
279 changes: 0 additions & 279 deletions AGENTS.md

This file was deleted.

14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,20 @@ Find our documentation [online](https://grayboxtech.github.io/weightslab/latest/

</details>

<details>
<summary><b>Agent: chat with your training run (OpenCode)</b></summary>

<br>

WeightsLab ships two distinct agent surfaces — the backend SDK agent for data-manipulation
queries, and a local [OpenCode](https://opencode.ai)-backed agent with a full bash/file
toolset that can restart training, edit your code, and run recurring `/loop` monitoring
jobs. See the [Agent docs](https://grayboxtech.github.io/weightslab/latest/agent.html) for
how the two connect, how to point either one at a local model, and the full `/loop`
reference.

</details>

</details>

<details>
Expand Down
35 changes: 15 additions & 20 deletions agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@
# or directly in the config file.
# Config file values will override env. variables if both are set.
# If cloned, env. variables can be defined in a .env file at the root of the repository.
#
# OpenCode (opencode.ai) is the only supported agent backend: a local OpenCode
# server backs every LLM call. There is no API key here -- the credential
# lives in OpenCode's own config, entered once via `opencode auth login` or
# the Weights Studio landing page's login modal.
agent:
# Select the model provider.
# Local: 'ollama'
# Remote: 'openrouter'
# provider: openrouter # Default to OpenRouter if API key is provided, otherwise fallback to local Ollama. This can be overridden by env variable PREFERRED_PROVIDER.
# URL of the local OpenCode server (can also be set as env variable
# OPENCODE_URL). Defaults to http://127.0.0.1:4096. This is the SAME shared
# root env var the frontend reads, so set it once and both sides point at
# one server.
opencode_url: http://127.0.0.1:4096

# Local Settings
fallback_to_local: false
ollama_model: llama3.2:3b

# # Remote Model Selection
# Default is a fast flash-class model. The intent-planning task is simple JSON
# generation, so a small/fast model responds in ~2-4s where a 70B model took
# ~15-30s for no accuracy gain. Switch back to a large model here if you see
# accuracy issues (speed/accuracy tradeoff).
openrouter_model: bytedance-seed/seed-2.0-lite # Open router model name (can also be set as env variable OPENROUTER_MODEL). Fast alternatives: openai/gpt-4o-mini, meta-llama/llama-3.1-8b-instruct. Accurate/slow: ~google/gemini-flash-latest
# openrouter_api_key: <your_openrouter_api_key> # Open router API key (can also be set as env variable OPENROUTER_API_KEY)
openrouter_base_url: https://openrouter.ai/api/v1 # Open router base URL (can also be set as env variable OPENROUTER_BASE_URL)
openrouter_request_timeout: 60.0 # Timeout for OpenRouter API requests in seconds (can also be set as env variable OPENROUTER_REQUEST_TIMEOUT)
openrouter_max_tokens: 2048 # Max completion length. OpenRouter reserves max_tokens*price against the key budget BEFORE generating, so an uncapped value can 402 ("more credits, or fewer max_tokens") on a credit/weekly-limited key. Raise only if responses get truncated (env: OPENROUTER_MAX_TOKENS)
openrouter_provider_sort: throughput # Bias OpenRouter's upstream routing to avoid slow providers: 'throughput' | 'latency' | 'price'. Empty string = let OpenRouter choose (env: OPENROUTER_PROVIDER_SORT)
openrouter_structured_output: false # Ask the model for a schema-validated plan directly (skips free-form JSON + regex repair). More reliable, but only works on models whose OpenRouter route supports structured/JSON-schema output (e.g. Gemini, GPT-4o). env: OPENROUTER_STRUCTURED_OUTPUT=1
# OpenCode model, "providerID/modelID" (can also be set as env variable
# OPENCODE_MODEL). Empty string self-heals to whatever OpenCode's own
# config was last set to, or a configured provider default, falling back
# to the free-tier "opencode/deepseek-v4-flash-free" if neither resolves.
opencode_model: "opencode/deepseek-v4-flash-free"
Loading
Loading