Skip to content

Polyant v1.3.6

Latest

Choose a tag to compare

@paolovalletta-exelab paolovalletta-exelab released this 11 Nov 13:33
70e5877

Polyant v1.3.6

Polyant v1.3.6 shows the full path of a turn in the message details, lets a
person star agents, and asks for a review before importing an agent file. Most
of the release is about running several engine processes against one database:
migrations apply one at a time with short locks, Room cycles and scheduled tasks
hold leases, and every model call and database statement has a bound. It also
cuts prompt cost on agents that use tools. Its 25 migrations run on their own at
start-up.

Highlights

  • Request path. The message details show every model call, hook run and
    tool run of a turn on the turn's own clock, with duration, tokens, cost and
    outcome, the calls a hook or tool made nested under it, and the moment the
    reply reached the channel. With the agent's debug flag on, each call keeps
    the raw request and answer, per step and per retry.
  • Favorite agents. A starred agent appears in a Favorites group at the foot
    of the sidebar. Stars belong to the person and follow them across devices.
  • Agent import review. Choosing an agent file opens a review of what it
    brings, with the name and slug editable, before anything is created.
  • Several processes, one database. Migrations apply one transaction each and
    give up on a table lock after POSTGRES_MIGRATION_LOCK_TIMEOUT_MS, so
    processes still serving 1.3.5 keep working during the upgrade. Room cycles and
    scheduled-task runs hold leases that another replica takes over when their
    process dies, a channel saved on one replica reaches the others, and the
    daily housekeeping runs once per installation.
  • Delivery. The reply is sent once the turn is saved, without waiting for
    response_sent hooks or attachment uploads, and WhatsApp sends a reply again
    when Twilio failed to take it.
  • Bounded calls. Every model call has a timeout and is retried
    LLM_MAX_RETRIES times; statements on the main pool stop after 60 seconds.
  • Prompt cost. MCP tools reach the model in a stable order, per-conversation
    system text is sent after the cached agent prompt, spawnTask delegations
    share a cached prefix, and two opt-in settings, caching of the user turn and
    exact replay of earlier turns, let agents that call tools read more of each
    request from the cache.
  • Buffered turns stream their tool calls and results as they happen, so
    the playground's activity view follows the agent.

Breaking changes

  • The Anthropic standard tier resolves to claude-sonnet-5 instead of
    claude-sonnet-4-6. Agents with no model of their own, their spawnTask
    sub-agents and standard-tier background calls change model, and
    claude-sonnet-5 takes no custom temperature.
  • Debug payloads are cleared after DEBUG_PAYLOAD_RETENTION_DAYS (default 7).
    1.3.5 kept them forever, so the first daily housekeeping after the upgrade
    clears every payload older than that.
  • Statements on the main database pool stop after
    POSTGRES_STATEMENT_TIMEOUT_MS (default 60000), and an idle transaction is
    ended after POSTGRES_IDLE_IN_TRANSACTION_TIMEOUT_MS (default 60000). Set
    either to 0 to turn it off.
  • Request bodies are validated. The agent PATCH, the tools and skills PATCH
    and the skill env PUT answer 400 for a wrong type, an unknown value or an
    unknown key. The chat stream routes take text content only, at most 100
    messages.
  • An agent import answers 409 when the slug is taken, instead of importing
    under <slug>-imported.
  • A scheduled task's schedule written through the API or the scheduleTask
    tool answers 400 when it does not fit its type (for example an interval under
    60000 ms).
  • An agent API key that matches more than one agent opens none of them.
  • A Room's evalIntervalMinutes is gone from the API, the bundle and the form;
    older bundles that carry it still import.

Security

  • A replaced agent API key no longer opens the agent. A rotation made by a 1.3.5
    replica left the old key working and refused the new one.
  • The agent PATCH read confirmWipe: "false" as a confirmation and deleted
    every memory and knowledge document; a skill env PUT without sensitive
    stored the secret in clear.
  • The engine no longer downloads a URL found in a message part, and the chat
    stream routes no longer accept image or file parts. The AI SDK used to fetch
    such URLs on the engine, with no time limit and up to 2 GiB each.
  • A WhatsApp attachment is abandoned past 20 MB, and the curl and
    httpRequest tools stop with the turn and read a bounded response; either
    could hold any amount of engine memory.

Upgrading

The migrations 0099 to 0123 run at start-up, one transaction each; 0104
is an empty placeholder. Index migrations build and drop indexes concurrently.
If a migration fails, the ones before it stay applied and the next start
continues from the one that failed.

New configuration variables, all optional, with their defaults:
LLM_STREAM_FIRST_CHUNK_TIMEOUT_MS (300000), LLM_STREAM_CHUNK_TIMEOUT_MS
(120000), LLM_SERVICE_CALL_TIMEOUT_MS (300000),
LLM_MODEL_REQUEST_TIMEOUT_MS (300000), LLM_MAX_RETRIES (2),
BACKGROUND_TURN_JOB_CONCURRENCY (4), BACKGROUND_MEMORY_JOB_CONCURRENCY (2),
DEBUG_PAYLOAD_RETENTION_DAYS (7), POSTGRES_STATEMENT_TIMEOUT_MS (60000),
POSTGRES_IDLE_IN_TRANSACTION_TIMEOUT_MS (60000) and
POSTGRES_MIGRATION_LOCK_TIMEOUT_MS (3000).

  1. Run npm ci.
  2. Run npm run build.
  3. Restart the services.