Modules
AI agent framework for Elixir with multi-provider LLM support.
Primary interface for AI agents.
Behaviour for agent implementations.
Callback execution for agent events.
Unified context for agent execution.
DynamicSupervisor that owns the lifecycle of every Nous.AgentServer.
Unique-key Registry mapping session IDs to running Nous.AgentServer processes.
Executes agent runs with tool calling loop.
GenServer wrapper for Nous agents with PubSub integration.
Default agent implementation with standard tool-calling behavior.
Knowledge Base Agent behaviour implementation.
ReAct (Reasoning and Acting) Agent behaviour implementation.
Mode resolution and the visible tool set for Code Mode.
Orders the tool sub-calls a Code Mode program makes.
Renders the typed SDK a Code Mode program is written against.
Runs a model-authored program that calls tools, instead of a chain of individual tool calls.
One global the program can call, and the functions hanging off it.
Why a program did not produce a value.
Code Mode's JavaScript runtime: an embedded Deno isolate, one per run.
What to run, what it may call, and who gets the answer.
What a program produced.
Top-level module for the Nous Decision Graph system.
Builds a text summary of the decision graph for system prompt injection.
A directed edge connecting two nodes in the decision graph.
A node in the decision graph.
Storage behaviour for decision graph backends.
DuckDB-backed decision graph store (stub).
ETS-backed decision graph store.
Custom error types for Nous AI.
Shared construction for Nous exception modules.
Error in configuration or missing dependencies.
Error when agent execution is cancelled.
Error when agent loop exceeds maximum iterations.
Error from the model provider API.
Error from an LLM provider.
Parse server-suggested retry delays from provider error responses.
Error during tool execution.
Error when a tool execution times out.
Error when usage limits are exceeded.
Error during output validation.
Evaluation framework for Nous AI agents.
Configuration for the evaluation framework.
Behaviour for evaluating agent outputs against expected results.
Evaluator that checks if output contains expected substrings or patterns.
Evaluator that requires exact string match.
Evaluator that uses string similarity for matching.
Evaluator that uses an LLM to judge output quality.
Evaluator that validates structured output against an Ecto schema.
Evaluator that verifies correct tool usage by the agent.
Metrics collected during evaluation runs.
Aggregated metrics summary across multiple evaluation runs.
Optimization engine for finding optimal agent configurations.
Defines optimizable parameters for agent configuration.
Defines and manages the search space for optimization.
Bayesian optimization strategy inspired by TPE (Tree-structured Parzen Estimator).
Exhaustive grid search optimization strategy.
Random search optimization strategy.
Behaviour for optimization strategies.
Report generation for evaluation results.
Console output for evaluation reports.
JSON output for evaluation reports.
Result of a single test case evaluation.
Executes evaluation suites against agents.
A collection of test cases with shared configuration.
Result of running an entire test suite.
Defines a single test case for agent evaluation.
Loads evaluation suites and test cases from YAML files.
Fallback model chain support.
Behaviour for non-streaming HTTP backends.
Nous.HTTP.Backend implementation backed by :hackney.
Nous.HTTP.Backend implementation backed by Req (which uses Finch
under the hood).
Transport-level stream buffer primitives shared by the
Nous.HTTP.StreamBackend implementations.
Behaviour for SSE / chunked streaming HTTP backends.
Nous.HTTP.StreamBackend implementation backed by :hackney in
[{:async, :once}] mode for strict pull-based backpressure.
Nous.HTTP.StreamBackend implementation backed by Req (Finch
underneath).
Lifecycle interceptors for agent tool execution and request/response flow.
Storage and lookup for hooks, indexed by event type.
Executes hooks for lifecycle events with support for blocking, modification, and external command execution.
LLM-compiled personal knowledge base system.
A raw ingested document before compilation into wiki entries.
A compiled wiki entry — the core unit of the knowledge base.
Result of a health check audit on the knowledge base.
A directed edge in the wiki graph between two entries.
LLM prompt templates for knowledge base compilation, linking, auditing, and output generation.
Storage behaviour for knowledge base backends.
ETS-backed knowledge base store implementation.
Agent tools for knowledge base operations.
Pre-built workflow DAG pipelines for knowledge base operations.
Simple LLM API for direct model calls without agents.
Top-level module for the Nous Memory System.
Behaviour for embedding providers.
Local on-device embedding provider via Bumblebee + EXLA.
Generic local embedding provider for OpenAI-compatible endpoints.
OpenAI embedding provider.
Memory entry struct with scoping fields for flexible isolation.
Shared scope-building logic for memory operations.
Pure scoring functions for memory retrieval ranking.
Hybrid search orchestrator for the memory system.
Storage behaviour for memory backends — including ones that live outside Nous.
Contract-conformance tests for a Nous.Memory.Store implementation.
DuckDB-backed memory store (stub).
ETS-backed memory store implementation.
Result post-processing shared by index-plus-entry-table memory stores.
SQLite-backed memory store (stub).
Agent tools for memory operations: remember, recall, forget.
Represents a message in a conversation with an AI model.
Represents a part of message content supporting multi-modal inputs.
Utilities for working with conversations and message lists.
Anthropic format message conversion.
Gemini format message conversion.
OpenAI format message conversion.
Model configuration for LLM providers.
Dispatches model requests to the appropriate provider implementation.
Structured output support for Nous agents.
Behaviour for structured output validation.
Tool-level permission policy engine.
Permission policy controlling tool access.
Behaviour for pluggable persistence backends.
ETS-based persistence backend.
Behaviour for composable agent extensions.
Plugin for agent decision tracking with a directed graph.
Plugin for human-in-the-loop approval of tool calls.
Modular malicious input classifier plugin.
Maps severity levels to policy actions for the InputGuard plugin.
Result of an input guard strategy check.
LLM-based input classification strategy.
Regex-based pattern matching strategy for detecting prompt injection and jailbreak attempts.
Embedding-based semantic similarity strategy for detecting malicious input.
Behaviour for input guard detection strategies.
Plugin for LLM-compiled knowledge base with wiki-style entries.
Plugin that notices an agent repeating the same tool call and injects escalating guidance.
Plugin for persistent agent memory with hybrid search.
Plugin that integrates the Skills system into the agent lifecycle.
Plugin that enables agents to delegate tasks to specialized sub-agents.
Plugin for managing context window size via pruning and summarization.
Plugin that provides team communication and coordination tools for agents.
PromEx plugin for Nous AI agent metrics.
Safe prompt templates for building messages.
Behaviour for LLM provider implementations.
Anthropic Claude provider implementation.
Custom provider for any OpenAI-compatible endpoint.
Google Gemini provider implementation.
Shared HTTP utilities for all LLM providers.
Stream parser for JSON array responses.
LM Studio local provider implementation.
LlamaCpp NIF-based provider for local LLM inference.
Mistral AI provider implementation.
OpenAI-specific provider implementation.
Generic OpenAI-compatible provider implementation.
SGLang provider implementation.
vLLM provider implementation.
Google Vertex AI provider implementation.
Thin PubSub abstraction for Nous.
Async HITL approval via PubSub.
ReAct (Reasoning and Acting) Agent wrapper with built-in planning and todo management.
Deep Research Agent for nous.
The main research loop coordinator.
Represents a research finding from a search/analysis step.
Decomposes a complex research query into a structured plan with sub-questions.
Represents a completed research report with citations.
Generates structured research reports with citations.
Executes a single research sub-question using search tools.
Consolidates findings from multiple searchers.
Context passed to tools and dynamic prompts during agent execution.
OS-level confinement for subprocesses spawned by tools.
Linux confinement via bwrap (bubblewrap).
The result of Nous.Sandbox.confine/2: an argv to spawn plus the data needed
to interpret what comes back.
What a confined subprocess is allowed to do.
How to recognise "the sandbox runner itself failed" in a child's output.
macOS confinement via sandbox-exec and an inline SBPL profile.
The fail-closed default provider: it confines nothing and admits it.
A session: an id, its event log, and — if it was forked — where it came from.
Configuration for managed agent sessions.
One durable fact about a session.
Session limit checking and guardrail functions.
Two ordered queues of messages waiting to enter a run: next_turn and
next_step.
Every model-visible request must be reconstructable from the session log.
Raised by Nous.Session.Invariant.verify/2 in :strict mode.
An append-only event log with a model-visible surface derived by folding.
Close what a crash left open in a session log — by appending, never by truncating.
Reusable instruction/capability packages for agents.
Loads skills from markdown files with YAML frontmatter.
Discovery, management, and activation of skills.
Built-in skill — system architecture design.
Built-in skill — code review.
Built-in skill — conventional commit messages from diffs.
Built-in skill — systematic debugging.
Built-in skill — documentation generation.
Built-in skill — Ecto query composition, changesets and data patterns.
Built-in skill — idiomatic Elixir patterns and anti-patterns.
Built-in skill — ExUnit, Mox and property-based testing.
Built-in skill — code explanation.
Built-in skill — OTP supervision, GenServer and concurrency design.
Built-in skill — Phoenix LiveView lifecycle, components and anti-patterns.
Built-in skill — pandas, NumPy and scikit-learn data pipelines.
Built-in skill — FastAPI and async Python web services.
Built-in skill — Python security review.
Built-in skill — pytest patterns.
Built-in skill — modern Python typing and data containers (3.10+).
Built-in skill — the uv Python package and project manager.
Built-in skill — behaviour-preserving refactoring.
Built-in skill — OWASP-oriented security scanning.
Built-in skill — task decomposition.
Built-in skill — test generation from implementation code.
Content-addressed overflow for oversized tool results.
Filesystem backend for Nous.Spill.
An opaque handle to spilled content.
Behaviour for stream chunk normalization.
Stream normalizer for Anthropic API.
Stream normalizer for Google Gemini API.
Stream normalizer for LlamaCppEx %ChatCompletionChunk{} structs.
Default stream normalizer for OpenAI-compatible providers.
Reassembles partial tool-call fragments emitted by Nous.StreamNormalizer
into the final list shape that Nous.Messages.from_provider_response/2
produces for the non-streaming path.
Top-level API for multi-agent team orchestration.
PubSub topic helpers and communication utilities for multi-agent teams.
Team lifecycle GenServer that manages agent processes within a team.
Token-bucket rate limiter for per-team and per-agent usage control.
Role definitions for team agents.
ETS-based shared state for per-team discoveries and file region claims.
Per-team Supervisor that manages team infrastructure processes.
Telemetry integration for Nous AI.
Tool definition for agent function calling.
Behaviour for tool implementations.
Structured context updates from tools.
Stateless helpers for building and querying tool collections.
Declarative DSL for defining tool schemas.
Test helpers for tools.
Validates tool arguments against JSON schema.
Field access for tool-call maps whose keys may be atoms or strings.
Executes tool functions with retry logic, timeout handling, and error handling.
Convert tools to different schema formats for various providers.
Shell command execution tool.
Built-in tool for web search using Brave Search API.
Built-in tools for date and time operations.
Scrubbed environment for tool subprocesses.
String replacement editing tool.
File pattern matching tool.
Content search tool.
File reading tool with line numbers.
File writing tool.
Path-traversal & symlink-escape protection for filesystem tools.
Built-in tools for ReAct (Reasoning and Acting) agents.
Structured note-taking tools for research agents.
Code Mode's transport tool: runs a model-authored program that calls tools.
Shared plumbing for search tools (Brave, Tavily, ...).
Tool that fetches and summarizes content from multiple URLs in parallel.
Built-in tools for string manipulation operations.
Tool for summarizing long text using an LLM call.
Built-in tool for search using Tavily Search API.
Built-in tools for task tracking and progress management.
SSRF protection for outbound HTTP from tools and providers.
Tool for fetching and extracting readable content from web pages.
Lightweight conversation history compaction.
Core type definitions for Nous AI.
Tracks resource usage for agent runs.
Per-model token prices for turning a %Nous.Usage{} into a dollar figure.
DAG/graph-based workflow engine for orchestrating agents, tools, and control flow.
Checkpoint for suspending and resuming workflow execution.
ETS-backed checkpoint store. Suitable for development and testing.
Behaviour for checkpoint storage backends.
Validates and compiles workflow graphs for execution.
A directed edge connecting two nodes in a workflow graph.
Core workflow execution engine.
Directed graph definition for workflow execution.
Generate Mermaid flowchart diagrams from workflow graphs.
A node in a workflow graph.
Optional per-workflow ETS table for large/binary data exchange between steps.
Typed state that flows between workflow nodes.
Telemetry events for workflow execution.
Records execution traces for workflow debugging and observability.
Mix Tasks
Run evaluation suites for Nous agents.
Run parameter optimization for Nous agent configurations.