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
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ ARTEX_LLM_BASE_URL=
ARTEX_LLM_PROXY=
# Allow the UI model list to reach a local Ollama, e.g. host.docker.internal:11434
ARTEX_LLM_PRIVATE_ENDPOINTS=
# Claude Code CLI as the LLM (ARTEX_LLM_PROVIDER=claude-code, or a "Claude Code CLI"
# profile in the UI). Uses a Claude subscription: paste the output of `claude setup-token`
# here, or in the profile's token field. Concurrent CLI processes default to 4.
CLAUDE_CODE_OAUTH_TOKEN=
# ARTEX_CLAUDE_CODE_MAX_PROCS=4

# Untrusted-output boundary. Frames every tool output between nonce-tagged markers so
# the model treats it as data, not instructions. On by default (unset or empty = on);
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ RUN npm install -g "@playwright/mcp@${PLAYWRIGHT_MCP_VERSION}" "@playwright/cli@
&& playwright install --with-deps chromium \
&& "$(npm root -g)/@playwright/mcp/node_modules/.bin/playwright-core" install chromium \
&& rm -rf /var/lib/apt/lists/*
# Claude Code CLI for "claude-code" LLM profiles (agent/claude_code.go): the
# server runs it as the model, with every built-in tool disabled.
ARG CLAUDE_CODE_VERSION=2.1.332
RUN npm install -g "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" && claude --version
# Agent processes run as the executor with HOME and XDG_CACHE_HOME in the data
# directory (server/execpriv_unix.go); the browsers installed above stay in root's
# cache, which /root's 0711 lets the executor reach.
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ runtime supports it.
**LLM**: `export ANTHROPIC_API_KEY=sk-...` (or `OPENAI_API_KEY`), or configure it in the UI's
"LLM Configuration" page, which can also add a local Ollama server as a keyless provider (format
"Ollama", default base URL `http://127.0.0.1:11434/v1`). Optional:
`ARTEX_LLM_PROVIDER` (`anthropic | openai | openai-responses | ollama | bedrock-gateway`), `ARTEX_LLM_MODEL`,
`ARTEX_LLM_PROVIDER` (`anthropic | openai | openai-responses | ollama | bedrock-gateway | claude-code`), `ARTEX_LLM_MODEL`,
`ARTEX_LLM_BASE_URL`, `ARTEX_LLM_PROXY`.

**Base URL gotcha**: for the Anthropic format, enter the host **without** `/v1` (for example
Expand Down Expand Up @@ -536,6 +536,32 @@ For environment-based setup, set `ARTEX_LLM_PROVIDER=bedrock-gateway`,
`ARTEX_LLM_BASE_URL`, `ARTEX_LLM_MODEL`, and `ARTEX_LLM_API_KEY`. Optional
`ARTEX_LLM_CUSTOM_HEADERS` uses the same newline-separated `Name: Value` format.

**Claude Code CLI**: select **Claude Code CLI** in System → LLM to drive the agents with
the `claude` binary instead of an HTTP endpoint, using a Claude subscription. ARTEX keeps its
own agent loop: each model turn runs one `claude -p` process with every built-in Claude Code
tool, MCP server, settings file and slash command disabled, so the CLI only generates text.
ARTEX's tool definitions go into the system prompt with a JSON reply protocol, and the reply's
tool calls come back to ARTEX as ordinary `tool_use` blocks, so tools still run under ARTEX's
executor, permissions and transcripts. The process gets a minimal environment, never the
server's secrets.

- **Model**: an alias (`opus`, `sonnet`, `haiku`; the ↻ button lists them) or a full model ID.
The default is `sonnet`. Base URL does not apply.
- **Login**: run `claude setup-token` on any machine and paste the token into the profile's
**Token** field (stored encrypted), or set `CLAUDE_CODE_OAUTH_TOKEN` in `.env`. Without a token,
the CLI uses its own login: in Docker, `docker compose exec artex sh -c
'CLAUDE_CONFIG_DIR=/app/keys/claude-code claude'` and `/login` once; the config dir lives in
the root-only keys volume. An `sk-ant-api…` key is passed as `ANTHROPIC_API_KEY` instead.
- **Limits**: `ARTEX_CLAUDE_CODE_MAX_PROCS` (default 4) caps concurrent CLI processes,
`ARTEX_CLAUDE_CODE_TIMEOUT` (default `10m`) caps one turn, and `ARTEX_CLAUDE_CODE_BIN` points at
a binary that is not `claude` on `PATH`. Each turn resends the whole conversation, there is no
token-by-token streaming, and images in tool results are replaced by a placeholder. Usage
counts against the subscription's limits; a usage-limit reply is reported as HTTP 429, and a
missing login as 401.

For environment-based setup, set `ARTEX_LLM_PROVIDER=claude-code`, optionally
`ARTEX_LLM_MODEL` and `CLAUDE_CODE_OAUTH_TOKEN`.

**Task archive storage**: local disk by default. Set `ARTEX_ARCHIVE_STORAGE=s3` to
store cold task packages in an S3-compatible bucket and release their local
package space after verification. Existing local archives remain usable. See
Expand Down
Loading
Loading