Download the PHP package webbycrown/laraknow-ai without Composer

On this page you can find all versions of the php package webbycrown/laraknow-ai. 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 laraknow-ai

LaraKnow AI

A reusable Laravel AI assistant package with safe read-only database tools, conversation history, and a polished chat UI.

Laravel PHP 8.3+ Read only database tools Reusable package

LaraKnow AI adds a configurable assistant to any Laravel application. It can answer customer-support or staff-support questions, use safe database tools for allowed tables, preserve conversation context, and render a widget or full-page chat UI.

Version: dev-main

The package stays generic. Host applications decide the business meaning, allowed tables, sensitive columns, routes, branding, and AI provider.

See the Changelog section below for release notes and version history.


📺 Demo Video

WebbyCommerce Plugin

▶️ Watch Full Video on YouTube


Highlights


Requirements

Requirement Version / Notes
PHP ^8.3
Laravel ^12.0 or ^13.0
Laravel AI Configured through the host project's config/ai.php and installed as a Composer dependency
Database Required for Laravel AI conversation tables
AI Provider Any provider configured in config/ai.php
Frontend jQuery on the page, or the package fallback CDN loader

Installation

1. Add The Repository

If the package is not registered on Packagist, add it as a VCS repository in the host project's composer.json.

2. Install The Package

Laravel package discovery registers the service provider automatically.

3. Publish Laravel AI Configuration

4. Publish LaraKnow Files

5. Run Migrations

6. Clear Cached Configuration


AI Provider Setup

LaraKnow uses the host application's Laravel AI configuration. Configure your provider in config/ai.php and set the needed keys in .env.

Only set keys for providers you actually use. Provider rate limits are controlled by the provider, not by LaraKnow. If one provider stops after a few messages while another continues, check the provider's quota, model limit, and Laravel logs.


Basic Usage

Widget Mode

Full-Page Mode

Published assets are expected at:

If jQuery is already loaded, LaraKnow reuses it. Otherwise, the component loads the package's default jQuery CDN fallback.


Routes

The default route prefix is:

The default route name prefix is laraknow-ai, so route helpers inside the package use names such as laraknow-ai.chat and laraknow-ai.welcome.

Main routes:

Check routes:

Protect routes in config/laraknow.php when needed:

If you need a different named route prefix, update this value as well:

To disable the built-in rate limiter entirely, set:


Configuration

After publishing, edit:

The config is intentionally small. Most technical defaults live inside the package so host developers do not accidentally break response grounding, query limits, prompt safety, schema cache, or rate limiting.

Recommended Shape

Assistant Instructions

Use business language, not package internals. Good instructions tell the assistant:

Example:

Allowed Tables

Only allowed tables can be inspected or queried.

For production, prefer an explicit list. Leaving it empty allows all non-blocked tables and is best reserved for trusted internal testing.

Blocked Columns

Blocked columns are never selected or shown.

Use table-specific blocking when only one table needs extra privacy:

Advanced Query Behavior

LaraKnow uses internal package defaults for safe query limits, prompt security, response grounding, schema filtering, and audit logging. Host applications do not configure these behaviors directly through config/laraknow.php.

UI Settings

The ui section controls only the chat appearance and labels. It does not change database access or AI safety.

Common edits:


Response Behavior

LaraKnow tries to keep answers grounded and readable:

Example record reply:

Example metric reply:


API Response Format

Successful chat responses use a predictable payload:

Errors include a stable error object and an HTTP status code:


How It Works

  1. The user sends a message from the chat UI.
  2. The frontend posts to the chat route.
  3. The controller validates the request and safety boundaries.
  4. The AI agent combines locked package rules with host config instructions.
  5. Database tools inspect only allowed tables and non-blocked fields.
  6. SQL execution is read-only and validated before returning data.
  7. The reply is grounded, normalized, and returned with data, suggestion, and conversation_id.

Security Model

LaraKnow is built around least privilege.

Protected by default:

Database tools are read-only and validate table names, selected columns, blocked keywords, limits, and result columns before returning data.


Troubleshooting

Package Routes Are Missing

Confirm the route prefix:

Chat Says Conversation Tables Are Missing

Assets Are Missing

Then clear browser cache.

jQuery Is Not Available

Load jQuery in the host layout, or allow the package's default CDN fallback. For strict CSP environments, load jQuery from a local asset before rendering the LaraKnow component.

The Assistant Gives Wrong Business Answers

Check config/laraknow.php:

AI Provider Fails Or Rate Limits

Check:


Development Checklist

After package changes, run:

For route verification:


License

LaraKnow AI is distributed as a reusable Laravel package. Configure and deploy it according to the security requirements of each host application.


📊 Changelog

v1.0.0


Made with ❤️ by WebbyCrown

All versions of laraknow-ai with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-mbstring Version *
illuminate/support Version ^12.0|^13.0
laravel/ai Version ^0.6.8
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 webbycrown/laraknow-ai contains the following files

Loading the files please wait ...