@smythos/sdk
Version:
57 lines (56 loc) • 2.1 kB
TypeScript
import { TStorageProviderInstances } from '../types/generated/Storage.types';
import { Agent, TAgentSettings } from '../Agent/Agent.class';
import { TVectorDBProviderInstances } from '../types/generated/VectorDB.types';
import { TSchedulerProviderInstances } from '../types/generated/Scheduler.types';
export declare class Team {
id: string;
constructor(id: string);
addAgent(settings: TAgentSettings): Agent;
/**
* Access to storage instances from the agent for direct storage interactions.
*
* When using storage from the agent, the agent id will be used as data owner
*
* **Supported providers and calling patterns:**
* - `team.storage.default()` - Default storage provider
* - `team.storage.LocalStorage()` - Local storage
* - `team.storage.S3()` - S3 storage
*
* @example
* ```typescript
* // Direct storage access
* const defaultStorage = team.storage.default();
* const local = team.storage.LocalStorage();
* const s3 = team.storage.S3();
* ```
*/
private _storageProviders;
get storage(): TStorageProviderInstances;
private _vectorDBProviders;
get vectorDB(): TVectorDBProviderInstances;
/**
* Access to scheduler instances from the team for team-scoped scheduler interactions.
*
* When using scheduler from the team, the team id will be used as job owner (shared across team)
*
* **Supported providers and calling patterns:**
* - `team.scheduler.default()` - Default scheduler provider
* - `team.scheduler.LocalScheduler()` - Local scheduler
*
* @example
* ```typescript
* // Direct scheduler access
* const teamScheduler = team.scheduler.default();
*
* // Add a team-wide scheduled job
* await teamScheduler.add('team-backup',
* Schedule.every('6h'),
* new Job(async () => {
* console.log('Team backup running...');
* }, { name: 'Team Backup' })
* );
* ```
*/
private _schedulerProviders;
get scheduler(): TSchedulerProviderInstances;
}