Download the PHP package manik/neuro without Composer

On this page you can find all versions of the php package manik/neuro. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package neuro

Neuro: Laravel AI Framework

A unified AI interface for Laravel — LLMs, embeddings, vector databases, RAG pipelines, agents, and more.

PHP Laravel Packagist



Installation

Publish the configuration:

Run migrations (for persistent memory and document storage):

Configuration

Add the following to your .env file based on the providers you use:

LLM Providers

Embedding Providers

Vector Databases

All vector database methods accept a collection name as the first argument. If omitted or null, the driver falls back to the per-driver collection config, then to AI_DEFAULT_VECTOR_COLLECTION, then to 'default':

Temperature & Generation Settings

Configure temperature, max tokens, and timeout per provider:

Override temperature at runtime:

System Instructions

Cross-driver support for system prompts. Pass a message with role: 'system':

The driver automatically handles the provider-specific format:

Driver API Field
OpenAI messages[].role = system (native)
Anthropic Top-level system field
Gemini systemInstruction field
Cohere preamble field
Ollama messages[].role = system (native)
Grok messages[].role = system (native)
Mistral messages[].role = system (native)

Embedding Dimensions

Control embedding output dimensions to ensure compatibility with your vector database:

RAG Configuration

Cache & Rate Limiting

Quick Start

Chat Completion

Streaming Chat

Embeddings

Batch embed:

Vector Search

LLM Providers

Use the Neuro::llm() method to access the LLM manager directly:

Supported Providers

Provider Driver Key Chat Stream Tools Config Key
OpenAI openai ✅ ✅ ✅ ai.llm.openai
Anthropic anthropic ✅ ✅ ✅ ai.llm.anthropic
Google Gemini gemini ✅ ✅ ❌ ai.llm.gemini
Ollama ollama ✅ ✅ ✅ ai.llm.ollama
xAI Grok grok ✅ ✅ ✅ ai.llm.grok
Mistral mistral ✅ ✅ ✅ ai.llm.mistral
Cohere cohere ✅ ✅ ✅ ai.llm.cohere

Tool Calling

Custom Ollama Setup

Ollama runs locally with no API key required:

Embedding Providers

Provider Driver Key Default Dimensions Config Key
OpenAI openai 1536 ai.embedding.openai
Ollama ollama 4096 ai.embedding.ollama
Gemini gemini 768 ai.embedding.gemini
Mistral mistral 1024 ai.embedding.mistral
Cohere cohere 1024 ai.embedding.cohere

Override dimensions via .env to match your vector database:

Vector Databases

Supported Databases

Database Driver Key Create Upsert Search Delete Filter Config Key
Qdrant qdrant ✅ ✅ ✅ ✅ ✅ ai.vector.qdrant
Pinecone pinecone ❌ ✅ ✅ ✅ ✅ ai.vector.pinecone
pgvector pgvector ✅ ✅ ✅ ✅ ✅ ai.vector.pgvector
Weaviate weaviate ✅ ✅ ✅ ✅ ✅ ai.vector.weaviate
Milvus milvus ✅ ✅ ✅ ✅ ✅ ai.vector.milvus
Chroma chroma ✅ ✅ ✅ ✅ ✅ ai.vector.chroma

Basic Usage

pgvector Setup

Qdrant Setup

RAG Pipeline

The RAG (Retrieval Augmented Generation) pipeline retrieves relevant context from a vector store and uses it to answer questions.

Basic RAG

Using the Pipeline Directly

The RAG Flow

Agents & Tool Calling

Creating an Agent

Registering Tools via Manager

Memory

Available Drivers

Driver Key Storage Description
Session session Laravel session Per-request/session memory
Conversation conversation In-memory Runtime conversation history
Persistent persistent Database Long-term persistent storage

Usage

Persistent Memory

Image Generation

OpenAI DALL-E

Edit Image

Variations

Speech Processing

Text-to-Speech

Speech-to-Text

Document Ingestion & Chunking

Supported Formats

Format Auto-detected
.txt ✅
.md ✅
.html ✅
.csv ✅
.json ✅

Ingest a Document

Ingest Raw Content

Chunking Strategies

Strategy Class Description
Fixed Size FixedSizeChunking Split by character count with overlap
Recursive RecursiveChunking Split by paragraphs → sentences → chars
Semantic SemanticChunking Split by headings and blank lines
Sliding Window SlidingWindowChunking Overlapping windows with stride

Full Ingestion Pipeline

Testing

Fake Responses

Fake Embeddings

Events & Observability

Events

Event Description Payload
MessageSending Before an LLM call is made provider, model, messages, options
MessageReceived After an LLM response provider, model, response, latency
EmbeddingCreated After embedding is generated provider, model, text, dimensions
VectorStored After vectors are upserted provider, collection, record_count
DocumentIndexed After a document is indexed collection, document, chunk_count

Observability Configuration

Architecture

Extending with Custom Drivers

You can register custom drivers at runtime:

Then add the corresponding config to config/neuro.php and use it:


License

The MIT License (MIT). See LICENSE for more information.


All versions of neuro with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
laravel/framework Version ^11.0|^12.0|^13.0|^14.0
guzzlehttp/guzzle Version ^7.0
ext-json Version *
ext-pdo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package manik/neuro contains the following files

Loading the files please wait ...