Search by

veda-ai / client

neresson

PHP SDK for the Veda AI sidecar HTTP API (embed tokens, streaming chat, histories).

v0.1.0 2026-09-16 06:37 UTC

This package is auto-updated.

Last update: 2026-09-16 06:40:49 UTC


README

Framework-agnostic PHP SDK for the Veda AI sidecar HTTP API.

Install

composer require veda-ai/client

Usage

use Veda\Client\Factory;

$client = Factory::factory()
    ->withBaseUri('https://veda.example.com')
    ->withHostApiKey($hostKey)
    ->make();

$session = $client->embed()->createToken([
    'visitor_id' => 'user-1',
    'host_mcp_url' => 'https://app.test/mcp/veda',
    'host_mcp_token' => $mcpToken,
]);

$client = Factory::factory()
    ->withBaseUri('https://veda.example.com')
    ->withEmbedToken($session->token)
    ->make();

foreach ($client->chat()->createStreamed([
    'messages' => [['role' => 'user', 'content' => 'Hello']],
    'chatId' => 'chat-1',
]) as $event) {
    echo $event->type."\n";
}

License

MIT