# Sagents v0.8.0-rc.7 - Table of Contents

## Pages

- [Sagents](readme.md)
- [Changelog](changelog.md)
- [LICENSE](license.md)

- Docs
  - [Architecture Overview](architecture.md)
  - [Conversations Architecture](conversations_architecture.md)
  - [Agent Lifecycle Management](lifecycle.md)
  - [Subscriptions &amp; Presence](subscriptions_and_presence.md)
  - [Middleware Development](middleware.md)
  - [Middleware Messaging Guide](middleware_messaging.md)
  - [Observability &amp; Custom Telemetry](observability.md)
  - [State Persistence](persistence.md)
  - [FileSystem Setup Guide](filesystem_setup.md)

## Modules

- [Sagents](Sagents.md): Sagents provides hierarchical agent capabilities with composable middleware.
- [Sagents.AgentPersistence](Sagents.AgentPersistence.md): Behaviour for persisting agent state snapshots.
- [Sagents.AgentResult](Sagents.AgentResult.md): Helpers for reading structured results out of an `Sagents.Agent.execute/3`
return value.
- [Sagents.DisplayMessagePersistence](Sagents.DisplayMessagePersistence.md): Behaviour for persisting display messages (user-facing message representations).
- [Sagents.Extract](Sagents.Extract.md): Structured data extraction through an `Sagents.Agent`.
- [Sagents.Factory](Sagents.Factory.md): Behaviour for modules that build `%Sagents.Agent{}` instances from
validated configuration.
- [Sagents.FactoryRouter](Sagents.FactoryRouter.md): Behaviour for selecting the factory module for a conversation.
- [Sagents.Horde.AgentsSupervisorImpl](Sagents.Horde.AgentsSupervisorImpl.md): Module-based Horde.DynamicSupervisor for agent processes.
- [Sagents.Horde.ClusterConfig](Sagents.Horde.ClusterConfig.md): Configuration helpers for Horde clustering.
- [Sagents.Horde.FileSystemSupervisorImpl](Sagents.Horde.FileSystemSupervisorImpl.md): Module-based Horde.DynamicSupervisor for filesystem processes.
- [Sagents.Horde.RegistryImpl](Sagents.Horde.RegistryImpl.md): Module-based Horde.Registry for dynamic configuration.
- [Sagents.MessagePreprocessor](Sagents.MessagePreprocessor.md): Behaviour for transforming user-submitted messages into separate display and LLM representations.
- [Sagents.Middleware.AskUserQuestion](Sagents.Middleware.AskUserQuestion.md): Middleware that gives agents a structured way to ask the user questions.
- [Sagents.Middleware.DebugLog](Sagents.Middleware.DebugLog.md): Middleware that writes detailed, structured logs to per-conversation log files.
- [Sagents.Mode.Steps](Sagents.Mode.Steps.md): Sagents-specific pipeline steps for custom execution modes.
- [Sagents.Modes.AgentExecution](Sagents.Modes.AgentExecution.md): Standard sagents execution mode.
- [Sagents.ProcessRegistry](Sagents.ProcessRegistry.md): Abstraction over process registry implementations.
- [Sagents.ProcessSupervisor](Sagents.ProcessSupervisor.md): Abstraction over dynamic supervisor implementations.
- [Sagents.Publisher](Sagents.Publisher.md): Direct, monitored process subscriptions for GenServers that publish events.
- [Sagents.Publisher.State](Sagents.Publisher.State.md): Subscriber bookkeeping for a `Sagents.Publisher` producer.
- [Sagents.Routers.Single](Sagents.Routers.Single.md): Trivial single-factory router. Use when your app has one agent type.
- [Sagents.Session](Sagents.Session.md): Session lifecycle for conversation-centric agents. Owns the procedural
work of: router consult, factory invocation, state seeding, supervisor
config, subscriber wiring.
- [Sagents.StreamingSession](Sagents.StreamingSession.md): Host-agnostic helpers for tracking the streaming-tool-call lifecycle on a
caller's session state.
- [Sagents.SubAgent.Compiled](Sagents.SubAgent.Compiled.md): Pre-compiled SubAgent with an existing Agent instance.

- [Sagents.SubAgent.Config](Sagents.SubAgent.Config.md): Configuration for dynamically-created SubAgents.
- [Sagents.Subscriber](Sagents.Subscriber.md): Consumer-side helpers for `Sagents.Publisher` producers.
- [Sagents.Supervisor](Sagents.Supervisor.md): Top-level supervisor for Sagents infrastructure.
- [Sagents.TextLines](Sagents.TextLines.md): Pure helper for line-number math on text content.

- Core Agent
  - [Sagents.Agent](Sagents.Agent.md): Main entry point for creating Agents.
  - [Sagents.AgentServer](Sagents.AgentServer.md): GenServer that wraps a DeepAgent and its State, managing execution lifecycle
and broadcasting events via PubSub.
  - [Sagents.AgentSupervisor](Sagents.AgentSupervisor.md): Custom supervisor for managing an Agent and its supporting infrastructure.
  - [Sagents.AgentUtils](Sagents.AgentUtils.md): Shared utilities for Agent and SubAgent HITL (Human-in-the-Loop) support.
  - [Sagents.State](Sagents.State.md): Agent state structure for managing agent execution context.

- Middleware
  - [Sagents.Middleware](Sagents.Middleware.md): Behavior for DeepAgent middleware components.
  - [Sagents.Middleware.ConversationTitle](Sagents.Middleware.ConversationTitle.md): Middleware that automatically generates conversation titles based on the initial user message.
  - [Sagents.Middleware.FileSystem](Sagents.Middleware.FileSystem.md): Middleware that adds virtual filesystem capabilities to agents.
  - [Sagents.Middleware.HumanInTheLoop](Sagents.Middleware.HumanInTheLoop.md): Middleware that enables human oversight and intervention in agent workflows.
  - [Sagents.Middleware.PatchToolCalls](Sagents.Middleware.PatchToolCalls.md): Middleware that identifies and resolves "dangling tool calls" in the message history.
  - [Sagents.Middleware.ProcessContext](Sagents.Middleware.ProcessContext.md): Propagates caller-process state across the three Sagents process boundaries.
  - [Sagents.Middleware.SubAgent](Sagents.Middleware.SubAgent.md): Middleware for delegating tasks to specialized SubAgents.
  - [Sagents.Middleware.Summarization](Sagents.Middleware.Summarization.md): Middleware that automatically manages conversation length through intelligent summarization.
  - [Sagents.Middleware.TodoList](Sagents.Middleware.TodoList.md): Middleware that adds TODO list management capabilities to agents.
  - [Sagents.MiddlewareEntry](Sagents.MiddlewareEntry.md): Represents a registered middleware instance with its configuration.

- SubAgents
  - [Sagents.SubAgent](Sagents.SubAgent.md): A runnable, pausable, and resumable agent execution context.
  - [Sagents.SubAgent.Task](Sagents.SubAgent.Task.md): Behaviour for task modules that describe a named sub-agent "skill".
  - [Sagents.SubAgentServer](Sagents.SubAgentServer.md): GenServer wrapper for SubAgent providing blocking API.
  - [Sagents.SubAgentsDynamicSupervisor](Sagents.SubAgentsDynamicSupervisor.md): DynamicSupervisor for managing ephemeral sub-agent processes.

- FileSystem
  - [Sagents.FileSystem](Sagents.FileSystem.md): Public API for filesystem lifecycle management.
  - [Sagents.FileSystem.FileEntry](Sagents.FileSystem.FileEntry.md): Represents a file in the virtual filesystem.
  - [Sagents.FileSystem.FileMetadata](Sagents.FileSystem.FileMetadata.md): Metadata for a file entry in the virtual filesystem.
  - [Sagents.FileSystem.FileSystemConfig](Sagents.FileSystem.FileSystemConfig.md): Configuration for a filesystem persistence backend.
  - [Sagents.FileSystem.FileSystemState](Sagents.FileSystem.FileSystemState.md): State management for the FileSystem.
  - [Sagents.FileSystem.FileSystemSupervisor](Sagents.FileSystem.FileSystemSupervisor.md): Dynamic supervisor for managing FileSystemServer instances.
  - [Sagents.FileSystem.Persistence](Sagents.FileSystem.Persistence.md): Behaviour for persisting files to storage.
  - [Sagents.FileSystem.Persistence.Disk](Sagents.FileSystem.Persistence.Disk.md): Default disk-based persistence implementation.
  - [Sagents.FileSystemCallbacks](Sagents.FileSystemCallbacks.md): Behavior for file system persistence callbacks.
  - [Sagents.FileSystemServer](Sagents.FileSystemServer.md): GenServer managing virtual filesystem with debounce-based auto-persistence.

- Persistence
  - [Sagents.Persistence.Hooks](Sagents.Persistence.Hooks.md): Optional behavior for hooking into agent state persistence events.
  - [Sagents.Persistence.StateSerializer](Sagents.Persistence.StateSerializer.md): Handles serialization and deserialization of AgentServer state.

- Process Management
  - [Sagents.AgentsDynamicSupervisor](Sagents.AgentsDynamicSupervisor.md): Dynamic supervisor for managing AgentSupervisor instances.

- Events &amp; Communication
  - [Sagents.Presence](Sagents.Presence.md): Convenience wrappers for Phoenix.Presence operations.

- Message Helpers
  - [Sagents.Message.DisplayHelpers](Sagents.Message.DisplayHelpers.md): Utilities for extracting displayable content from LangChain Messages.

- Support Types
  - [Sagents.Todo](Sagents.Todo.md): TODO item structure for task tracking.

## Mix Tasks

- [mix sagents.gen.live_helpers](Mix.Tasks.Sagents.Gen.LiveHelpers.md): Generates AgentLiveHelpers module for Phoenix LiveView integration with Sagents.
- [mix sagents.setup](Mix.Tasks.Sagents.Setup.md): Generates all infrastructure needed for conversation-centric agents.

