# Mojentic v1.5.0 - Table of Contents

> An LLM integration framework for Elixir

## Pages

- Use Cases
  - [Structured Output](structured_output.md)
  - [Chat Sessions](chat_sessions.md)

- Examples
  - [Example: File Tools](file_tools.md)
  - [Example: Task Management](task_management.md)
  - [Example: Web Search](web_search.md)

- Guides
  - [Introduction](introduction.md)
  - [Getting Started](getting_started.md)
  - [Broker Guide](broker.md)
  - [Tool Usage](tool_usage.md)
  - [Parallel Tools](parallel_tools.md)
  - [Realtime Voice](realtime.md)
  - [Streaming](streaming.md)
  - [Embeddings](embeddings.md)
  - [OpenAI Model Registry](openai_model_registry.md)

- Project Info
  - [Overview](readme.md)
  - [AI Assistant Guidelines](agents.md)

## Modules

- [Mojentic.Agents.AsyncAggregatorAgent](Mojentic.Agents.AsyncAggregatorAgent.md): GenServer-based agent that aggregates events by correlation ID.
- [Mojentic.Agents.AsyncLLMAgent](Mojentic.Agents.AsyncLLMAgent.md): Asynchronous agent that uses an LLM to generate responses.
- [Mojentic.Agents.BaseAgent](Mojentic.Agents.BaseAgent.md): Behaviour for synchronous agents that process events.
- [Mojentic.Agents.BaseAsyncAgent](Mojentic.Agents.BaseAsyncAgent.md): Behaviour for asynchronous agents that process events.
- [Mojentic.Agents.BaseLLMAgent](Mojentic.Agents.BaseLLMAgent.md): A basic LLM agent with behaviour, tools, and broker.
- [Mojentic.Agents.BaseLLMAgentWithMemory](Mojentic.Agents.BaseLLMAgentWithMemory.md): An LLM agent that uses SharedWorkingMemory to remember information.
- [Mojentic.Agents.IterativeProblemSolver](Mojentic.Agents.IterativeProblemSolver.md): An agent that iteratively attempts to solve a problem using available tools.
- [Mojentic.Agents.SimpleRecursiveAgent](Mojentic.Agents.SimpleRecursiveAgent.md): A simple recursive agent that uses events and async to solve problems.
- [Mojentic.Agents.SimpleRecursiveAgent.EventEmitter](Mojentic.Agents.SimpleRecursiveAgent.EventEmitter.md): A GenServer-based event emitter that allows subscribing to and emitting events.
- [Mojentic.Agents.SimpleRecursiveAgent.GoalAchievedEvent](Mojentic.Agents.SimpleRecursiveAgent.GoalAchievedEvent.md): Event triggered when a problem is solved.

- [Mojentic.Agents.SimpleRecursiveAgent.GoalFailedEvent](Mojentic.Agents.SimpleRecursiveAgent.GoalFailedEvent.md): Event triggered when a problem cannot be solved.

- [Mojentic.Agents.SimpleRecursiveAgent.GoalState](Mojentic.Agents.SimpleRecursiveAgent.GoalState.md): Represents the state of a problem-solving process.

- [Mojentic.Agents.SimpleRecursiveAgent.GoalSubmittedEvent](Mojentic.Agents.SimpleRecursiveAgent.GoalSubmittedEvent.md): Event triggered when a problem is submitted for solving.

- [Mojentic.Agents.SimpleRecursiveAgent.HandlerErrorEvent](Mojentic.Agents.SimpleRecursiveAgent.HandlerErrorEvent.md): Event triggered when an event handler raises an exception.

- [Mojentic.Agents.SimpleRecursiveAgent.IterationCompletedEvent](Mojentic.Agents.SimpleRecursiveAgent.IterationCompletedEvent.md): Event triggered when an iteration of the problem-solving process is completed.

- [Mojentic.Agents.SimpleRecursiveAgent.TimeoutEvent](Mojentic.Agents.SimpleRecursiveAgent.TimeoutEvent.md): Event triggered when the problem-solving process times out.

- [Mojentic.AsyncDispatcher](Mojentic.AsyncDispatcher.md): GenServer-based async event dispatcher for the agent system.
- [Mojentic.Context.SharedWorkingMemory](Mojentic.Context.SharedWorkingMemory.md): A shared working memory context for agents.
- [Mojentic.Event](Mojentic.Event.md): Base event structure for agent communication.
- [Mojentic.Events.TerminateEvent](Mojentic.Events.TerminateEvent.md): Special event that signals the dispatcher to stop processing.
- [Mojentic.Examples.React.DecisioningAgent](Mojentic.Examples.React.DecisioningAgent.md): Decision-making agent for the ReAct pattern.
- [Mojentic.Examples.React.Events](Mojentic.Examples.React.Events.md): Event definitions for the ReAct pattern.
- [Mojentic.Examples.React.Events.FailureOccurred](Mojentic.Examples.React.Events.FailureOccurred.md): Event to signal a failure in the ReAct loop.
- [Mojentic.Examples.React.Events.FinishAndSummarize](Mojentic.Examples.React.Events.FinishAndSummarize.md): Event to trigger the completion and summarization phase.
- [Mojentic.Examples.React.Events.InvokeDecisioning](Mojentic.Examples.React.Events.InvokeDecisioning.md): Event to trigger the decision-making phase.
- [Mojentic.Examples.React.Events.InvokeThinking](Mojentic.Examples.React.Events.InvokeThinking.md): Event to trigger the thinking/planning phase.
- [Mojentic.Examples.React.Events.InvokeToolCall](Mojentic.Examples.React.Events.InvokeToolCall.md): Event to trigger a tool invocation.
- [Mojentic.Examples.React.Formatters](Mojentic.Examples.React.Formatters.md): Formatting utilities for the ReAct pattern implementation.
- [Mojentic.Examples.React.Models](Mojentic.Examples.React.Models.md): Data models for the ReAct pattern.
- [Mojentic.Examples.React.Models.CurrentContext](Mojentic.Examples.React.Models.CurrentContext.md): The complete context for a ReAct session.
- [Mojentic.Examples.React.Models.NextAction](Mojentic.Examples.React.Models.NextAction.md): Enumeration of possible next actions in the ReAct loop.

- [Mojentic.Examples.React.Models.Plan](Mojentic.Examples.React.Models.Plan.md): A structured plan for solving a user query.
- [Mojentic.Examples.React.Models.ThoughtActionObservation](Mojentic.Examples.React.Models.ThoughtActionObservation.md): A single step in the ReAct loop capturing thought, action, and observation.
- [Mojentic.Examples.React.OutputAgent](Mojentic.Examples.React.OutputAgent.md): Output agent for the ReAct pattern.
- [Mojentic.Examples.React.SummarizationAgent](Mojentic.Examples.React.SummarizationAgent.md): Summarization agent for the ReAct pattern.
- [Mojentic.Examples.React.ThinkingAgent](Mojentic.Examples.React.ThinkingAgent.md): Planning agent for the ReAct pattern.
- [Mojentic.Examples.React.ToolCallAgent](Mojentic.Examples.React.ToolCallAgent.md): Tool execution agent for the ReAct pattern.
- [Mojentic.HTTP](Mojentic.HTTP.md): Behaviour for HTTP clients used by Mojentic gateways.
- [Mojentic.HTTP.ReqClient](Mojentic.HTTP.ReqClient.md): Req-backed implementation of the `Mojentic.HTTP` behaviour.

- [Mojentic.LLM.ChatSession](Mojentic.LLM.ChatSession.md): Manages stateful conversation sessions with an LLM.
- [Mojentic.LLM.Gateways.OpenAI](Mojentic.LLM.Gateways.OpenAI.md): Gateway for OpenAI LLM service.
- [Mojentic.LLM.Gateways.OpenAIMessagesAdapter](Mojentic.LLM.Gateways.OpenAIMessagesAdapter.md): Adapter for converting LLM messages to OpenAI format.
- [Mojentic.LLM.Gateways.OpenAIModelRegistry](Mojentic.LLM.Gateways.OpenAIModelRegistry.md): OpenAI Model Registry for managing model-specific configurations and capabilities.
- [Mojentic.LLM.Tools.AskUser](Mojentic.LLM.Tools.AskUser.md): Tool for asking the user a question and receiving their input.
- [Mojentic.LLM.Tools.CreateDirectoryTool](Mojentic.LLM.Tools.CreateDirectoryTool.md): Tool for creating a new directory.

- [Mojentic.LLM.Tools.CurrentDatetime](Mojentic.LLM.Tools.CurrentDatetime.md): Tool for getting the current date and time.
- [Mojentic.LLM.Tools.EphemeralTaskManager](Mojentic.LLM.Tools.EphemeralTaskManager.md): Ephemeral Task Manager tools for managing a list of tasks.
- [Mojentic.LLM.Tools.EphemeralTaskManager.AppendTask](Mojentic.LLM.Tools.EphemeralTaskManager.AppendTask.md): Tool for appending a new task to the end of the ephemeral task manager list.
- [Mojentic.LLM.Tools.EphemeralTaskManager.ClearTasks](Mojentic.LLM.Tools.EphemeralTaskManager.ClearTasks.md): Tool for clearing all tasks from the ephemeral task manager.

- [Mojentic.LLM.Tools.EphemeralTaskManager.CompleteTask](Mojentic.LLM.Tools.EphemeralTaskManager.CompleteTask.md): Tool for completing a task in the ephemeral task manager.
- [Mojentic.LLM.Tools.EphemeralTaskManager.InsertTaskAfter](Mojentic.LLM.Tools.EphemeralTaskManager.InsertTaskAfter.md): Tool for inserting a new task after an existing task in the ephemeral task manager list.
- [Mojentic.LLM.Tools.EphemeralTaskManager.ListTasks](Mojentic.LLM.Tools.EphemeralTaskManager.ListTasks.md): Tool for listing all tasks in the ephemeral task manager.

- [Mojentic.LLM.Tools.EphemeralTaskManager.PrependTask](Mojentic.LLM.Tools.EphemeralTaskManager.PrependTask.md): Tool for prepending a new task to the beginning of the ephemeral task manager list.
- [Mojentic.LLM.Tools.EphemeralTaskManager.StartTask](Mojentic.LLM.Tools.EphemeralTaskManager.StartTask.md): Tool for starting a task in the ephemeral task manager.
- [Mojentic.LLM.Tools.EphemeralTaskManager.Task](Mojentic.LLM.Tools.EphemeralTaskManager.Task.md): Represents a task with an identifier, description, and status.
- [Mojentic.LLM.Tools.EphemeralTaskManager.TaskList](Mojentic.LLM.Tools.EphemeralTaskManager.TaskList.md): Manages a list of tasks for the ephemeral task manager.
- [Mojentic.LLM.Tools.FilesystemGateway](Mojentic.LLM.Tools.FilesystemGateway.md): A gateway for interacting with the filesystem within a sandboxed base path.
- [Mojentic.LLM.Tools.FindFilesByGlobTool](Mojentic.LLM.Tools.FindFilesByGlobTool.md): Tool for finding files matching a glob pattern.

- [Mojentic.LLM.Tools.FindFilesContainingTool](Mojentic.LLM.Tools.FindFilesContainingTool.md): Tool for finding files containing text matching a regex pattern.

- [Mojentic.LLM.Tools.FindLinesMatchingTool](Mojentic.LLM.Tools.FindLinesMatchingTool.md): Tool for finding all lines in a file matching a regex pattern.

- [Mojentic.LLM.Tools.ListAllFilesTool](Mojentic.LLM.Tools.ListAllFilesTool.md): Tool for listing all files recursively in a directory.

- [Mojentic.LLM.Tools.ListFilesTool](Mojentic.LLM.Tools.ListFilesTool.md): Tool for listing files in a directory (non-recursive).

- [Mojentic.LLM.Tools.ReadFileTool](Mojentic.LLM.Tools.ReadFileTool.md): Tool for reading the entire content of a file.

- [Mojentic.LLM.Tools.TellUser](Mojentic.LLM.Tools.TellUser.md): Tool for displaying messages to the user without expecting a response.
- [Mojentic.LLM.Tools.ToolCallExecution](Mojentic.LLM.Tools.ToolCallExecution.md): A single tool call to execute, identified by an opaque id.
- [Mojentic.LLM.Tools.ToolCallOutcome](Mojentic.LLM.Tools.ToolCallOutcome.md): Outcome of executing a single tool call.
- [Mojentic.LLM.Tools.ToolInvocation](Mojentic.LLM.Tools.ToolInvocation.md): Internal helper that invokes a single tool call against a resolved
tool, honouring the optional run-context contract, and packages the
result into a `Mojentic.LLM.Tools.ToolCallOutcome`.
- [Mojentic.LLM.Tools.ToolWrapper](Mojentic.LLM.Tools.ToolWrapper.md): Wraps a BaseLLMAgent as a Tool for delegation patterns.
- [Mojentic.LLM.Tools.WriteFileTool](Mojentic.LLM.Tools.WriteFileTool.md): Tool for writing content to a file, completely overwriting any existing content.

- [Mojentic.Router](Mojentic.Router.md): Routes events to agents based on event type.
- [Mojentic.Tracer](Mojentic.Tracer.md): Public API for the Mojentic Tracer System.
- [Mojentic.Tracer.EventStore](Mojentic.Tracer.EventStore.md): GenServer for storing and querying tracer events.
- [Mojentic.Tracer.NullTracer](Mojentic.Tracer.NullTracer.md): A no-op implementation of TracerSystem following the Null Object Pattern.
- [Mojentic.Tracer.TracerEvents](Mojentic.Tracer.TracerEvents.md): Defines tracer event types for tracking system interactions.
- [Mojentic.Tracer.TracerEvents.AgentInteractionTracerEvent](Mojentic.Tracer.TracerEvents.AgentInteractionTracerEvent.md): Records interactions between agents.

- [Mojentic.Tracer.TracerEvents.LLMCallTracerEvent](Mojentic.Tracer.TracerEvents.LLMCallTracerEvent.md): Records when an LLM is called with specific messages.

- [Mojentic.Tracer.TracerEvents.LLMResponseTracerEvent](Mojentic.Tracer.TracerEvents.LLMResponseTracerEvent.md): Records when an LLM responds to a call.

- [Mojentic.Tracer.TracerEvents.ToolBatchTracerEvent](Mojentic.Tracer.TracerEvents.ToolBatchTracerEvent.md): Records the end-to-end execution of a parallel tool batch.
- [Mojentic.Tracer.TracerEvents.ToolCallTracerEvent](Mojentic.Tracer.TracerEvents.ToolCallTracerEvent.md): Records when a tool is called during agent execution.

- [Mojentic.Tracer.TracerEvents.TracerEvent](Mojentic.Tracer.TracerEvents.TracerEvent.md): Base structure for all tracer events.

- [Mojentic.Tracer.TracerSystem](Mojentic.Tracer.TracerSystem.md): Central system for capturing and querying tracer events.

- Core
  - [Mojentic](Mojentic.md): Mojentic is an LLM integration framework for Elixir.
  - [Mojentic.Error](Mojentic.Error.md): Standardized error types and helpers for the Mojentic framework.

- LLM Integration
  - [Mojentic.LLM.Broker](Mojentic.LLM.Broker.md): Main interface for LLM interactions.
  - [Mojentic.LLM.CompletionConfig](Mojentic.LLM.CompletionConfig.md): Configuration for LLM completion requests.
  - [Mojentic.LLM.Gateway](Mojentic.LLM.Gateway.md): Behaviour for LLM gateway implementations.
  - [Mojentic.LLM.GatewayResponse](Mojentic.LLM.GatewayResponse.md): Represents a response from an LLM gateway.
  - [Mojentic.LLM.Message](Mojentic.LLM.Message.md): Represents a message in an LLM conversation.
  - [Mojentic.LLM.ToolCall](Mojentic.LLM.ToolCall.md): Represents a tool call from an LLM.

- Gateways
  - [Mojentic.LLM.Gateways.Ollama](Mojentic.LLM.Gateways.Ollama.md): Gateway for Ollama local LLM service.
  - [Mojentic.LLM.Gateways.TokenizerGateway](Mojentic.LLM.Gateways.TokenizerGateway.md): Gateway for tokenizing and detokenizing text using Hugging Face tokenizers.

- Tools
  - [Mojentic.LLM.Tools.DateResolver](Mojentic.LLM.Tools.DateResolver.md): Tool for resolving relative dates to absolute dates.
  - [Mojentic.LLM.Tools.Tool](Mojentic.LLM.Tools.Tool.md): Behaviour for LLM tool implementations.
  - [Mojentic.LLM.Tools.WebSearchTool](Mojentic.LLM.Tools.WebSearchTool.md): Tool for searching the web using DuckDuckGo.

- Tool Runners
  - [Mojentic.LLM.Tools.ParallelToolRunner](Mojentic.LLM.Tools.ParallelToolRunner.md): Execute tool calls concurrently using `Task.async_stream/3`.
  - [Mojentic.LLM.Tools.RunContext](Mojentic.LLM.Tools.RunContext.md): Context handed to a tool runner (and, optionally, to tools that opt in)
for a single batch.
  - [Mojentic.LLM.Tools.Runner](Mojentic.LLM.Tools.Runner.md): Behaviour for executing batches of tool calls.
  - [Mojentic.LLM.Tools.SerialToolRunner](Mojentic.LLM.Tools.SerialToolRunner.md): Execute tool calls one at a time in input order.

- Realtime Voice
  - [Mojentic.Realtime.Broker](Mojentic.Realtime.Broker.md): Realtime voice broker — sibling to `Mojentic.LLM.Broker`.
  - [Mojentic.Realtime.Codec](Mojentic.Realtime.Codec.md): Audio codec helpers for the realtime subsystem.
  - [Mojentic.Realtime.Config](Mojentic.Realtime.Config.md): Vendor-neutral configuration for a realtime voice session.
  - [Mojentic.Realtime.Event](Mojentic.Realtime.Event.md): Vendor-neutral event union for the realtime subsystem.
  - [Mojentic.Realtime.Gateway](Mojentic.Realtime.Gateway.md): Behaviour for realtime voice gateways.
  - [Mojentic.Realtime.MintTransport](Mojentic.Realtime.MintTransport.md): WebSocket transport backed by Mint.WebSocket.
  - [Mojentic.Realtime.OpenAIGateway](Mojentic.Realtime.OpenAIGateway.md): Gateway against OpenAI's Realtime API over WebSocket.
  - [Mojentic.Realtime.Schemas](Mojentic.Realtime.Schemas.md): Schema catalogue for OpenAI Realtime API server events.
  - [Mojentic.Realtime.SemanticVadConfig](Mojentic.Realtime.SemanticVadConfig.md): LLM-classifier-driven VAD.
  - [Mojentic.Realtime.ServerVadConfig](Mojentic.Realtime.ServerVadConfig.md): Tunable parameters for server-side voice-activity detection.

  - [Mojentic.Realtime.Session](Mojentic.Realtime.Session.md): Stateful realtime session handle, owning a transport process.
  - [Mojentic.Realtime.Transport](Mojentic.Realtime.Transport.md): Transport behaviour for the realtime subsystem.

