API Reference Mojentic v#1.2.0

Copy Markdown View Source

Modules

Mojentic is an LLM integration framework for Elixir.

GenServer-based agent that aggregates events by correlation ID.

Asynchronous agent that uses an LLM to generate responses.

Behaviour for synchronous agents that process events.

Behaviour for asynchronous agents that process events.

A basic LLM agent with behaviour, tools, and broker.

An LLM agent that uses SharedWorkingMemory to remember information.

An agent that iteratively attempts to solve a problem using available tools.

A simple recursive agent that uses events and async to solve problems.

A GenServer-based event emitter that allows subscribing to and emitting events.

Event triggered when a problem is solved.

Event triggered when a problem cannot be solved.

Represents the state of a problem-solving process.

Event triggered when a problem is submitted for solving.

Event triggered when an iteration of the problem-solving process is completed.

Event triggered when the problem-solving process times out.

GenServer-based async event dispatcher for the agent system.

A shared working memory context for agents.

Standardized error types and helpers for the Mojentic framework.

Base event structure for agent communication.

Special event that signals the dispatcher to stop processing.

Decision-making agent for the ReAct pattern.

Event definitions for the ReAct pattern.

Event to signal a failure in the ReAct loop.

Event to trigger the completion and summarization phase.

Event to trigger the decision-making phase.

Event to trigger the thinking/planning phase.

Event to trigger a tool invocation.

Formatting utilities for the ReAct pattern implementation.

Data models for the ReAct pattern.

The complete context for a ReAct session.

Enumeration of possible next actions in the ReAct loop.

A structured plan for solving a user query.

A single step in the ReAct loop capturing thought, action, and observation.

Output agent for the ReAct pattern.

Summarization agent for the ReAct pattern.

Planning agent for the ReAct pattern.

Tool execution agent for the ReAct pattern.

Main interface for LLM interactions.

Manages stateful conversation sessions with an LLM.

Configuration for LLM completion requests.

Behaviour for LLM gateway implementations.

Represents a response from an LLM gateway.

Gateway for Ollama local LLM service.

Gateway for OpenAI LLM service.

Adapter for converting LLM messages to OpenAI format.

OpenAI Model Registry for managing model-specific configurations and capabilities.

Gateway for tokenizing and detokenizing text using Hugging Face tokenizers.

Represents a message in an LLM conversation.

Represents a tool call from an LLM.

Tool for asking the user a question and receiving their input.

Tool for creating a new directory.

Tool for getting the current date and time.

Tool for resolving relative dates to absolute dates.

Ephemeral Task Manager tools for managing a list of tasks.

Tool for appending a new task to the end of the ephemeral task manager list.

Tool for clearing all tasks from the ephemeral task manager.

Tool for completing a task in the ephemeral task manager.

Tool for inserting a new task after an existing task in the ephemeral task manager list.

Tool for listing all tasks in the ephemeral task manager.

Tool for prepending a new task to the beginning of the ephemeral task manager list.

Tool for starting a task in the ephemeral task manager.

Represents a task with an identifier, description, and status.

Manages a list of tasks for the ephemeral task manager.

A gateway for interacting with the filesystem within a sandboxed base path.

Tool for finding files matching a glob pattern.

Tool for finding files containing text matching a regex pattern.

Tool for finding all lines in a file matching a regex pattern.

Tool for listing all files recursively in a directory.

Tool for listing files in a directory (non-recursive).

Tool for reading the entire content of a file.

Tool for displaying messages to the user without expecting a response.

Behaviour for LLM tool implementations.

Wraps a BaseLLMAgent as a Tool for delegation patterns.

Tool for searching the web using DuckDuckGo.

Tool for writing content to a file, completely overwriting any existing content.

Routes events to agents based on event type.

Public API for the Mojentic Tracer System.

GenServer for storing and querying tracer events.

A no-op implementation of TracerSystem following the Null Object Pattern.

Defines tracer event types for tracking system interactions.

Records interactions between agents.

Records when an LLM is called with specific messages.

Records when an LLM responds to a call.

Records when a tool is called during agent execution.

Base structure for all tracer events.

Central system for capturing and querying tracer events.