Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@scoopika/client
Advanced tools
Run AI agents & boxes on the client side with real-time streaming hooks and client-side actions
This package facilitates communication with a Scoopika server, allowing you to run LLM-powered agents and multi-agent boxes from the client-side with client-side actions and real-time streaming hooks supported out-of-the-box.
npm install @scoopika/client
bun add @scoopika/client
Note: This package has been tested with Bun version 1.0.15.
<script src="https://cdn.jsdelivr.net/npm/@scoopika/client/index.global.js"></script>
When loaded from a CDN, the global variable is Scoopika
.
Ensure you have a running Scoopika server. Refer to the documentation for more details.
import { Client } from "@scoopika/client";
const client = new Client("SCOOPIKA_SERVER_URL");
// iife
const client = new Scoopika.Client("SCOOPIKA_SERVER_URL");
import { Client, Agent } from "@scoopika/client";
const client = new Client("SCOOPIKA_SERVER_URL");
const agent = new Agent("AGENT_ID", client);
(async () => {
const response = await agent.run({
inputs: { message: "Hello!" },
hooks: {
onToken: (token) => console.log(token), // real-time hook
},
});
console.log(response);
})();
import { Client, Box } from "@scoopika/client";
const client = new Client("SCOOPIKA_SERVER_URL");
const box = new Box("BOX_ID", client);
(async () => {
const response = await box.run({
inputs: { message: "Hello!" },
hooks: {
onToken: (token) => console.log(token), // real-time hook
},
});
console.log(response);
})();
import { Client, Agent } from "@scoopika/client";
const client = new Client("SCOOPIKA_SERVER_URL");
(async () => {
// Create new session
const session = await client.store.newSesssion({
user_id: "USER_1", // optional
});
console.log(session); // StoreSession
// Get session info by id
const mySession = await client.store.getSession(session.id);
console.log(mySession); // StoreSession
// List user sessions
const userSessions = await client.store.listUserSessions("USER_1");
console.log(userSessions); // string[]
// Get session runs (messages)
const runs = await client.store.getSessionRuns(userSessions[0]);
console.log(runs); // HistoryRun[]
})();
You're free to clone the Github repository, The code can be found in the src
directory and the tests in the tests
and e2e
directories.
Read the tests/README.md
for more information on how to setup and run tests.
FAQs
Run multimodal LLM-powered text generation and object generation on the client-side
We found that @scoopika/client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.