Skip to content

v0.7.0

Latest

Choose a tag to compare

@dimamik dimamik released this 17 Nov 14:20
Immutable release. Only release title and notes can be modified.
0cfd638

v0.7.0

Highlights

  • Built-in observability - Legion.OpenTelemetry.attach/1 traces agent turns, LLM requests, code evaluations and MCP calls with OpenTelemetry; see the Observability guide
    • One trace per turn, following the work into sub-agents and tool code
    • Adapters for Datadog and Braintrust
    • Records message content from every ReqLLM call in the app, not just Legion's, and hands raw prompts to your other ReqLLM telemetry handlers, unless attached with content: :none
    • Needs {:opentelemetry, "~> 1.5"} and {:opentelemetry_exporter, "~> 1.8"}

Breaking

  • Legion.call/3, Legion.cast/2 and Legion.eval/3 send the caller's OpenTelemetry context - whenever there is one, even without attach/1, and an agent on a node running an earlier Legion crashes on such a call; drain agents or restart the whole cluster when upgrading
  • Agents and Legion.EvalGuard.LLM call ReqLLM.generate_object/4 - test stubs of generate_object/3 no longer apply and the real request runs; stub the 4-arity function instead

Other changes

  • Telemetry - [:legion, :sandbox, :eval] stop metadata gains error_kind, and [:legion, :mcp, :call] gains mcp_tool and result
  • Testing - agents inherit $callers from the process that starts them, so an async test's Ecto sandbox and Mimic stubs reach agents, their tools and Postgres stores
  • Requires req_llm ~> 1.29, which verifies TLS certificates on wss:// connections (GHSA-6vww-5m28-f26v)