Mark Ericksen

Mark Ericksen

@brainlid.bsky.social

Keeping an open mind, sharing what's on my mind. ThinkingElixir.com, podcast.ThinkingElixir.com, #ElixirLang

1.3K followers129 following124 posts

More polish: - StreamingSession: host-agnostic streaming helpers with multi-tool-safe deltas, so sibling tool calls keep their UI state - Middleware can persist synthetic transcript entries (like multi-step processes) through the same pipeline as LLM messages

The generated Coordinator had grown to ~390 lines of session boilerplate living in YOUR app. v0.8 moves it into the library: Session, Factory, FactoryRouter. Per-request data flows through a typed config. Your Coordinator drops to a thin bridge.

Quality of life: - Pin allow_other / allow_cancel on ask_user instead of trusting the LLM each call - Todo ids are integers now, so "10" stops sorting before "2" - Optional inline todo snapshots rendered right in the chat transcript

An agent crosses 3 process boundaries per run. OpenTelemetry spans, Sentry context, tenant scope, Logger metadata: all lost across them. Detached traces, nil tenant lookups inside tools. New ProcessContext middleware carries it all the way to your tools.

v0.7 sent agent events over Phoenix.PubSub: a cluster broadcast bus for what's usually ONE local subscriber. Streaming deltas scaled as nodes x agents x tokens/sec of cross-node traffic. v0.8 uses direct, monitored delivery. Same API, far less noise.

Structured output used to mean bypassing your agent: losing token tracking, scope, tenancy, fallback models, all your middleware. New Sagents.Extract runs extraction THROUGH the agent. Define a schema, get typed args back. Full context, no AgentServer needed.

Extraction or tool output failing validation? New :until_tool_success keeps the run going on a bad result so the LLM can fix its own arguments, bounded by max_runs. Errors feed back, the model retries, you get a clean result. Validate-and-retry, built in.

Your agent asks the user a question, then the server shuts down: deploy, idle timeout, crash. v0.7: the question was silently lost on reload, conversation came back as if nothing was pending. v0.8: the agent boots back into :interrupted with the question intact.

Need a tool that STOPS a run, not pauses it? A validation gate that says "not ready, stop here"? LLMs ignore polite stop requests and plow ahead trying to help. New :halt interrupt via the Haltable middleware is a hard terminal stop. The model doesn't get to argue.

Mark Ericksen reposted

The agents_demo app has been updated to work with Sagents v0.4.0. Full-featured chat UI with real-time agent execution, file browsing, and conversation persistence -- all running on the latest release. #ElixirLang #MyElixirStatus

Metadata-only changes (tags, title) no longer rewrite the full file to storage. A new dirty_non_content flag routes to update_metadata_in_storage when the backend supports it, falling back to full write transparently.