cycls.LLM holds everything about how an agent runs. It is immutable, so each
method returns a new builder and one base config can be branched safely.
Choosing a model
Model strings are alwaysvendor/model. Anything that is not anthropic/ goes
through the Chat Completions adapter, so base_url points it at the endpoint and
api_key supplies the key.
The prefix selects the reasoning dialect, so use the vendor prefix that matches
the API you are calling, even when you self-host that model. See
Self-hosted and open models for serving your own.
Model identifiers change as vendors ship new versions. Check the vendor’s
documentation for the current name before pinning one in production.
ANTHROPIC_API_KEY, OPENAI_API_KEY) or from
.api_key(). Use .headers() for endpoints that authenticate outside the bearer
token, such as a Modal proxy or Cloudflare Access.
Reasoning
.thinking() is one unified control, translated into each vendor’s dialect.
How each vendor receives it
How each vendor receives it
A vendor with no mapping, such as a host prefix like
modal or vllm, gets no
reasoning parameter and prints one warning. Use .extra_body() for those..extra_body() merges after the built-in mapping, so your keys win. It is the
escape hatch for any parameter Cycls does not model.
Budgets and cost
.context() is what decides when compaction starts, so set it to match the model
you actually run. .price() takes USD per million tokens. With prices set, every
turn logs its cost and cycls cost and cycls sql can slice spend by user, chat
or model. Without it, costs report as zero.
Vision and text-only models
Attachments are sent as base64 media by default. Text-only models reject that, so turn vision off and the file stays in the workspace with a note naming it, which the model can then open with a tool.Web search
brave is the portable search and fetch pair. It works on any model and needs
BRAVE_API_KEY. Without that key it falls back to the provider’s native search
where one exists. native forces the provider’s server-side search, which today
means Anthropic only.
Full builder reference
Next steps
Tools
Built-in tools, custom handlers and approvals.
Self-hosted models
Point an agent at vLLM, SGLang or a private endpoint.