@cognitiondesk/client
v0.1.0
Published
Lightweight CognitionDesk command SDK for assistants, workflows, and tasks without widget UI dependencies.
Maintainers
Readme
@cognitiondesk/client
Lightweight SDK for managing assistants, workflows, and tasks from external apps without installing widget UI dependencies.
Install
npm install @cognitiondesk/clientQuick start
import { createCognitionDeskClient } from '@cognitiondesk/client';
const client = createCognitionDeskClient({
backendUrl: 'https://api.cognitiondesk.com',
getAuthToken: async () => firebaseAuth.currentUser.getIdToken(),
});
const assistants = await client.listAssistants();
const assistant = await client.getAssistant('assistant-id');
await client.patchAssistant('assistant-id', {
temperature: 0.6,
maxTokens: 4096,
});Raw command execution
await client.executeCommand('assistants.assignWorkflow', {
assistantId: 'assistant-id',
workflowId: 'workflow-id',
workflowEnabled: true,
});Supported commands
- assistants.list
- assistants.listSystem
- assistants.get
- assistants.create
- assistants.update
- assistants.patch
- assistants.assignWorkflow
- assistants.removeWorkflow
- workflows.list
- workflows.get
- workflows.create
- tasks.list
- tasks.get
- tasks.create
- tasks.update
