API Reference ash_ai v#0.2.12

View Source

Modules

Documentation for AshAi.

Builtin generic action implementations

A generic action impl that returns structured outputs from an LLM matching the action return.

Behavior for prompt-backed-action adapters.

An adapter that provides a "complete_request" tool that the LLM must call within max_runs messages to complete the request.

Data structure containing all the information needed for a prompt request.

Helpers for processing LangChain.PromptTemplates in messages.

An adapter for prompt-backed actions that returns the raw llm response

This adapter is designed for LLMs that don't support native tool calling or structured outputs. It embeds the JSON schema in the system prompt and uses LangChain's JsonProcessor to extract the JSON response from markdown code blocks.

An adapter for prompt-backed actions that leverages structured output from LLMs.

A change that vectorizes the current values of attributes for a given record. Used by the manual vectorization strategy, so you can decide later when to run the vectorization action.

Vectorizes attributes inline immediately after they are changed

Run an ash_oban trigger when embeddings need to be regenerated.

A check that is true when the actor is %AshAi{}

A behaviour that defines the dimensions of the vector, and how to generate the embedding

Introspection functions for the AshAi extension.

Model Context Protocol (MCP) implementation for Ash Framework.

Place in your endpoint's code_reloading section to expose Ash dev MCP"

MCP Router implementing the RPC functionality over HTTP.

Implementation of the Model Context Protocol (MCP) RPC functionality.

An action exposed to LLM agents

Event data passed to the on_tool_end callback passed to AshAi.setup_ash_ai/2.

Event data passed to the on_tool_start callback passed to AshAi.setup_ash_ai/2.

A validation that passes if the actor is %AshAi{}

Mix Tasks

Generates the resources and views for a conversational UI backed by ash_postgres and ash_oban

Sets up an MCP server for your application

Installs AshAi. Call with mix igniter.install ash_ai. Requires igniter to run.