Download the PHP package synapcores/sdk without Composer

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

synapcores/sdk — PHP SDK for SynapCores AIDB

Official PHP SDK for SynapCores — the AI-native database that runs SQL, vectors, RAG, and the in-database agentic runtime from a single engine.

Framework-agnostic. Use it from vanilla PHP, Symfony, WordPress, or any Composer-managed project. For a Laravel-native experience (facade, artisan commands, Eloquent vector cast, queue jobs), see synapcores/laravel.

Requirements

Install

Quickstart — 30 seconds

What's in the box

Method What it does
sql(string $sql, array $params = []) Run SQL via /v1/query/execute. :name placeholders are substituted client-side with proper SQL escaping (the engine's REST surface doesn't parse placeholders). Returns QueryResult.
embed(string $text, ?string $model = null) SELECT EMBED(...) — returns float[].
ragSearch(string $query, array $opts = []) Top-K similar rows from a table with a VECTOR column.
agentRun(string $persona, string $task, array $opts = []) Fire AGENT_RUN() — in-DB agentic runtime. Returns AgentRunResult.
importRecipe(string $url) Import a recipe from a URL.
execRecipe(string $recipeId, array $params = []) Execute an imported recipe.
knnSearch(string $table, array $vec, int $k = 10, array $opts = []) KNN against a VECTOR column with a literal query vector.
login(?string $u, ?string $p) Exchange credentials for a JWT (only needed without API key).

Every error becomes a SynapCores\SDK\Exception\… — AuthException, QueryException, NetworkException, EnvelopeException. Catch SynapCoresException to catch them all.

Examples

RAG over your docs

In-DB agent

Import + run a recipe

Embedding generation

Configuration reference

Key Type Default Notes
host string localhost Gateway hostname
port int 28080 Gateway port
useHttps bool false Set true in prod
apiKey string — aidb_… Bearer key (recommended)
token string — Pre-obtained JWT (skip login())
username string — For the login() flow
password string — For the login() flow
timeout float 30.0 Request timeout in seconds
database string — Sets X-Database header
tenant string — Sets X-Tenant header
userAgent string synapcores-php-sdk/1.0.0
verifyTls bool true Set false ONLY for local self-signed dev

Parameter binding — how it actually works

The engine's /v1/query/execute route does NOT parse :name, ?, or $1 placeholders server-side. The SDK substitutes :name placeholders client-side with proper SQL escaping (single-quote doubling, backslash escape, NULL/TRUE/FALSE literals, vector array literals for float[]).

What goes over the wire is fully inlined SQL — you'll never see a params field in the request body. This means:

Engine compatibility

Tested live against SynapCores AIDB v1.7.0.2.1-ce (current :latest, image ghcr.io/synapcores/community:latest). The SDK targets the stable /v1/* REST surface — minor engine releases should not break it.

License

MIT — see LICENSE.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.5
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 synapcores/sdk contains the following files

Loading the files please wait ...