Model Constructors

Create agents for different LLM providers

ollama_agent() llama_cpp_agent() openai_agent() azure_openai_agent()

Agent Constructors

llama() llamafile_llama() llama_vision() nomic()

Convenience Functions for Common Models

ollama_server()

Construct an Ollama Server Object

Core Functions

Main functions for working with LLMs

chat predict.Agent predict.Chat chat.Agent chat.Chat

Interact with an Agent

last_output() last_message()

Getting the Last Model Output

LanguageModelParams()

Language Model Parameters

Agent Grammar

Functions to configure and customize agents

instruct()

Instructing Models

prompt_as() system_prompt_as()

Prompt Construction

output_as()

Output Constraints

equip() unequip()

Equipping Tools

demonstrate() demonstrate_all()

Demonstrating with Examples

Tools

Tool calling and external integrations

tool()

Agent Tools

describe_with_Rd()

Describing Tools with Rd

can_accept_as()

Declaring Tool Parameters

Text Processing

Text embedding and RAG functionality

embed_text()

Text Embedding

text_store()

Text Stores

retrieve()

Retrieve Documents

chunk() default_chunking()

Text Chunking

rag_with()

Retrieval Augmented Generation (RAG)

persist() restore()

Object Persistence

Model Context Protocol (MCP) Client

Access tools, resources and prompts from an MCP server

connect_mcp() start_mcp() tools() resources() prompts()

Model Context Protocol (MCP)

Experimental

Features that might change without notice

c(<Agent>) c(<Chat>) c(<ChatPipeline>)

Chat Pipelines