Sagents v0.4.0 is out! Major FileSystem API expansion: directories, file moves, metadata-only persistence, plus tool_context and MessagePreprocessor for richer agent apps.
#ElixirLang #MyElixirStatus github.com/sagents-ai/s...
Here's what's new and why it matters. ๐งต
GitHub - sagents-ai/sagents: B...
GitHub - sagents-ai/sagents: Build interactive AI agents in Elixir with OTP supervision, middleware composition, human-in-the-loop approvals, sub-agent delegation, and real-time Phoenix LiveView integration. Built on LangChain.
Build interactive AI agents in Elixir with OTP supervision, middleware composition, human-in-the-loop approvals, sub-agent delegation, and real-time Phoenix LiveView integration. Built on LangChain...
GitHubDirectories are now first-class FileEntry objects. write_file to a nested path auto-creates ancestors (mkdir -p semantics). list_entries returns the full tree with metadata, everything you need for file browser UIs.
hexdocs.pm/sagents/Sage...Sagents.FileSystem.FileEntry โ...Sagents.FileSystem.FileEntry โ Sagents v0.4.2
move_file/3 atomically renames or moves files and directories. It re-keys all entries, transfers debounce timers, and calls the new move_in_storage/3 persistence callback so backends can handle path changes efficiently.
hexdocs.pm/sagents/Sage...Sagents.FileSystemServer โ Sag...Sagents.FileSystemServer โ Sagents v0.4.2
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.
New tool_context field on Agent. Pass user IDs, tenant info, or Phoenix scopes. It merges into custom_context so tool functions can access caller data cleanly. Making it easy to scope an action to the user's data and permissions.
hexdocs.pm/sagents/Sage...Sagents.Agent โ Sagents v0.4.2Sagents.Agent โ Sagents v0.4.2
MessagePreprocessor behaviour lets you split messages before they hit state. User sends @-mentions. The UI gets a styled chip, the LLM gets the full document context. Zero overhead when not configured.
hexdocs.pm/sagents/Sage...Sagents.MessagePreprocessor โ ...Sagents.MessagePreprocessor โ Sagents v0.4.2
New "default: true" option on FileSystemConfig. A single catch-all config handles all paths, ideal for database backends that don't care about directory structure. Specific configs still take priority.
hexdocs.pm/sagents/Sage...Sagents.FileSystem.FileSystemC...Sagents.FileSystem.FileSystemConfig โ Sagents v0.4.2