>>> from atoti_ai import AiConfig>>> from atoti_ai_amazon_bedrock import (... ChatConfig,... ConnectionConfig,... )>>> with tt.experimental({"ai"}):... ai_config = AiConfig(... connection=ConnectionConfig(... aws_access_key="...",... aws_secret_key="...",... ),... chat=ChatConfig(... model="anthropic.claude-3-sonnet-20240229-v1:0",... ),... )
Atoti Intelligence can also be enabled without an LLM provider: install no
provider package (i.e. atoti[ai]) and leave connection and
chat set to None.
AutoExplain then returns a default, non-AI summary and the chat feature is
disabled:
>>> import atoti as tt>>> from atoti_ai import AiConfig
>>> with tt.experimental({"ai"}):... ai_config = AiConfig()
Keeping more Auto-Explain analyses retrievable from the chat, for longer:
>>> import atoti as tt>>> import os>>> from datetime import timedelta>>> from atoti_ai import AiConfig>>> from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
Bounding the retries and the duration of a prompt:
>>> import atoti as tt>>> import os>>> from datetime import timedelta>>> from atoti_ai import AiConfig>>> from atoti_ai_amazon_bedrock import ConnectionConfig, ChatConfig
auto_explain_retained_run_count : int | None= None
How many Auto-Explain analyses the session keeps retrievable from the chat.A user can ask the chat for an analysis that already ran instead of running it
again. This is the total the session keeps, across all its users. Once it is
reached, running another analysis drops the one that ran first.When left unset, the session keeps 100 analyses.
How long an Auto-Explain analysis stays retrievable from the chat.Counted from the moment the analysis ran. Past it, the analysis has to run again.When left unset, an analysis stays retrievable for 100 minutes.
Whether this session serves chat.Set to False to register no chat endpoint: every call to one answers 404, and
atoti.Session.chat reports chat as absent.
atoti.Cube.auto_explain and the MCP server keep working.This differs from leaving connection and chat unset: a session with
no LLM keeps the chat endpoints registered, and starts answering as soon as an LLM
is configured.When left unset, the server serves chat.
Whether the chat sends the LLM only the tools matching each request.The LLM calls a tool search tool that queries a keyword index.
It receives only the matching tools, which reduces prompt token usage and improves tool selection.Set to False to send the whole tool set on every request instead.
A small tool set, where searching brings no benefit, is one reason to do so.
Inspecting which tools the LLM can see is another.Defaults to True when left unset.
How many times a call to the LLM is sent, retries included.A failed request is re-sent by the provider’s own client, backing off between
attempts. This bounds that for whichever provider the session connects to, taking
precedence over the provider’s own property.Set it to 1 to disable retries. Each attempt is bounded by the connection
timeouts, and under Amazon Bedrock the whole call is bounded by
atoti_ai_amazon_bedrock.ConnectionConfig.timeout.
How many rounds in a row one prompt may call a tool with the very same arguments.Past that the call is not run again: the model is told it was just made and returned
the same thing, and does something else instead. Round after round, an identical call
makes no progress, and a prompt telling the model to retry until it works would
otherwise repeat it until prompt_timeout expires.Any round without that call starts a fresh run, so a tool the model comes back to after
doing something else keeps running, however many times. Each call is counted on its
own, so a round asking for several tools at once loses only the one the model is stuck
on and still runs the others. That round is charged one max_tool_errors failure
all the same, so a model pairing the call it is stuck on with a fresh one is stopped
too.
How many rounds in a row may run no tool at all before the run ends.Refusing a call answers the model, which may simply ask for it again, and each of
those rounds is one more call to the LLM. Once that many have run no tool at all, the
run ends and the user is told the question could not be answered. Any round that runs
a tool starts the count over.
How many times the chat sends a prompt to the LLM, retries included.Left at 1, the prompt is sent once and the retrying is left to the LLM
provider: its client backs off between attempts and does not retry a request it
knows is hopeless, neither of which this loop can do. See max_attempts.Raise it only for failures happening outside the provider call, such as a malformed
tool call from the model. Each attempt re-runs the whole prompt, tools included.
How many tool calls one prompt may see fail before it stops calling tools.Once that many have failed, the model is told to stop and answer with what it has,
instead of trying another tool call. This bounds a model working through a broken
request, which repeating-call detection misses when it varies its arguments.The budget covers the whole prompt, the max_retry_attempts retries included.
A round in which a call was refused counts as one failure too, once for the round
however many of its calls were refused. A run in which three rounds in a row ran no
tool at all ends outright.
How long the chat spends on one prompt before giving up.This deadline covers everything a prompt does: every tool call and every retry the
LLM provider makes underneath it. Set it to timedelta() to leave the prompt no
deadline.
Whether the chat sends its answer as the model writes it, instead of in one piece.A streamed answer is delivered as AG-UI TEXT_MESSAGE_CHUNK events.This is the default of each run: an AG-UI request setting the streaming forwarded prop overrides it, either way.
True: a run streams its answer.
False: a run sends its answer once it ends.
The Atoti UI AI extension shipped with this version renders each chunk in place of the previous one instead of appending it.
Keep this off for sessions served to Atoti UI.
Whether a streamed answer also carries the model’s reasoning trace.This only applies to a run that streams its answer, whether through streaming or through the streaming forwarded prop of its AG-UI request.
Whether a trace exists at all depends on the LLM provider: OpenAI-family models stream one, Google models need thoughts to be requested, and Amazon Bedrock Converse reports none.
True: the reasoning trace is streamed ahead of the answer.