API Reference nous v#0.16.3

View Source

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 for starting and managing AgentServer processes.

Registry for looking up agent processes by session ID.

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.

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.

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).

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.

DuckDB-backed memory store (stub).

ETS-backed memory store implementation.

Hybrid memory store combining Muninn (full-text) and Zvec (vector) search.

Muninn-backed memory store with Tantivy full-text search (BM25).

SQLite-backed memory store (stub).

Zvec-backed memory store with HNSW/IVF vector similarity search.

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 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 conversation 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.

Configuration for managed agent sessions.

Session limit checking and guardrail functions.

Reusable instruction/capability packages for agents.

Loads skills from markdown files with YAML frontmatter.

Discovery, management, and activation of skills.

Built-in skill for system architecture design.

Built-in skill for code review.

Built-in skill for commit message generation.

Built-in skill for systematic debugging.

Built-in skill for documentation generation.

Built-in skill for Ecto query composition, changesets, and data patterns.

Built-in skill for idiomatic Elixir patterns and anti-patterns.

Built-in skill for Elixir testing with ExUnit, Mox, and property-based testing.

Built-in skill for code explanation.

Built-in skill for OTP supervision, GenServer, and concurrency patterns.

Built-in skill for Phoenix LiveView development.

Built-in skill for Python data science with pandas, NumPy, and scikit-learn.

Built-in skill for FastAPI and async Python web development.

Built-in skill for Python security best practices.

Built-in skill for Python testing with pytest.

Built-in skill for modern Python type hints, Pydantic, and dataclasses.

Built-in skill for Python's uv package manager and project tooling.

Built-in skill for safe code refactoring.

Built-in skill for security scanning.

Built-in skill for task decomposition.

Built-in skill for test generation.

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.

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.

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.

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.

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.

Per-node execution dispatch.

Parallel fan-out/fan-in execution for workflow nodes.

Merge strategies for combining parallel branch results back into workflow state.

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.