SDK Reference
Typed TypeScript and Go clients for apps built on the CompozyOS daemon.
571 operations · 31 resources · 213 available to app tokens36 pages in SDK Reference
On this page4
import { Compozy } from "@compozy/client";Install
npm install --save-exact @compozy/clientCreate a session and prompt it
run.mjs
import { Compozy } from "@compozy/client";
const compozy = await Compozy.connect();
console.log(`Connected to CompozyOS ${compozy.daemon.version}`);
const { workspace } = await compozy.workspaces.resolveWorkspace({
body: { path: process.cwd() },
});
const { session } = await compozy.sessions.createSession({
body: { workspace: workspace.id, agent_name: "claude" },
});
const reply = await compozy.prompt({
workspaceId: workspace.id,
sessionId: session.id,
message: "List the three largest files in this repo.",
});
if (reply.kind === "stream") {
for await (const chunk of reply.chunks) {
if (chunk.type === "text-delta") process.stdout.write(chunk.delta);
}
} else {
console.log(reply.result.status, reply.result.queue_position);
}Client
- ClientDiscover the daemon, verify its identity, and get a connected client.
- PromptSend input to a session and read the reply as a stream or an accepted receipt.
- EventsFollow server-sent event operations, with reconnection handled for you.
- ErrorsWhat the clients raise when the daemon is away, misconfigured, or returns an error.
Resources
- Sessions98
compozy.sessions - Agents60
compozy.agents - Workspaces60
compozy.workspaces - Tasks57
compozy.tasks - Settings52
compozy.settings - Loops44
compozy.loops - Automation21
compozy.automation - Extensions19
compozy.extensions - Cmd palette16
compozy.cmdPalette - Worktrees16
compozy.worktrees - Profiles15
compozy.profiles - Providers14
compozy.providers - Agent13
compozy.agent - Gateway13
compozy.gateway - Tools12
compozy.tools - Marketplace9
compozy.marketplace - Skills8
compozy.skills - Diagnostics7
compozy.diagnostics - Observe5
compozy.observe - Resources5
compozy.resources - App tokens4
compozy.appTokens - Vault4
compozy.vault - Hooks3
compozy.hooks - Onboarding3
compozy.onboarding - Support3
compozy.support - Logs2
compozy.logs - Notifications2
compozy.notifications - Roles2
compozy.roles - Toolsets2
compozy.toolsets - Filesystem1
compozy.filesystem - Openai1
compozy.openai