@solenai/sdk
v0.1.0
Published
TypeScript SDK for the Solen Agent API (v1)
Maintainers
Readme
@solenai/sdk
TypeScript client for the Solen Agent API v1 (/v1/*). Use a workspace API key with the required scopes.
Install
npm install @solenai/sdkUsage
import { SolenClient } from '@solenai/sdk';
const client = new SolenClient({
apiKey: process.env.SOLEN_API_KEY!,
baseUrl: 'https://api.solenai.ca', // optional; default shown
});
const { projects } = await client.listProjects();
const created = await client.createProject({
prompt: 'A todo app with auth',
name: 'Todos',
});
const status = await client.getStatus(created.id);
const deploy = await client.deploy(created.id);
await client.rollback(created.id);Methods
| Method | Scope | Description |
|--------|--------|-------------|
| createProject | projects:write | Create a project from a prompt |
| listProjects | projects:read | List projects |
| getProject / getStatus | projects:read | Get one project |
| deploy | projects:write | Start a deploy run |
| rollback | rollback | Roll back to last good version |
| listRuns | runs:read | List runs for a project |
| getRunLogs | runs:read | JSON logs for a run |
| streamRunLogs | runs:read | SSE logs while a run is active |
Errors throw SolenApiError with status and body.
Publishing (maintainers)
cd Omni/packages/solenai-sdk
pnpm run build
npm publish --access publicRequires an npm account with permission to publish the @solenai scope.
