Build
The agent
The agent runs a tool loop over the live workspace: list_nodes, read_node,
write_node, delete_node, list_files / read_file / write_file /
delete_file (shared helpers under lib/), list_views / read_view /
write_view / write_view_file / delete_view_file / delete_view (see
"Views"), run_node, define_param, and
query_data (DuckDB over every node's current output). It looks at real column names before writing, runs
what it writes, reads the traceback when something fails, and fixes it. Every
tool call shows up in the chat, and nodes it touches flash on the canvas.
Pick the model with environment variables; the provider is auto-detected from whichever key is set (Claude wins if both are):
| Provider | Key | Default model |
|---|---|---|
anthropic | ANTHROPIC_API_KEY | claude-opus-5-5 (adaptive thinking, server-side fallback) |
openrouter | OPENROUTER_API_KEY (or OPEN_ROUTER_KEY) | deepseek/deepseek-v4-pro |
openai | OPENAI_API_KEY + EXUVIA_BASE_URL + EXUVIA_MODEL | none (must be set) |
# DeepSeek through OpenRouter
OPENROUTER_API_KEY=sk-or-... exuvia serve my-project
# any other OpenRouter model
EXUVIA_PROVIDER=openrouter EXUVIA_MODEL=qwen/qwen3-coder exuvia serve my-project
# a local model
EXUVIA_PROVIDER=openai EXUVIA_BASE_URL=http://localhost:11434/v1 EXUVIA_MODEL=qwen3:32b OPENAI_API_KEY=x exuvia serve .The model has to support function calling. The UI's agent header shows which model is active.
The same model from a node. A Python node can call the configured model
once, for text, with exuvia.llm.complete. It uses the provider the agent
uses and raises LLMError when none is set, or when the reply is empty or
cut off, so a node never stores half an answer.
from exuvia import llm
@exuvia.node
def note(figures):
return {"summary": llm.complete(figures.to_csv(index=False), system="Summarise these figures in two sentences.")}Project notes. Put an AGENTS.md next to exuvia.json (or an instructions
string in it) to tell the agent about this project's data sources, helpers
and conventions. It is appended to the system prompt on every turn, which is
how a host app teaches the agent its own data without changing exuvia.
Sessions. A conversation is stored with the project
(GET /api/agent/{session_id} returns its transcript and whether a turn is
running). A turn keeps running if the client disconnects, and its events are
also published on /api/events, so a UI can reload and re-attach.
Things to ask it:
- "Pull in daily prices and add a 60-day rolling correlation to SPY"
- "Why did
returnsfail?" (with the node selected) - "Schedule
pricesevery 30 minutes during market hours" - "Chart the drawdown for each ticker"