Documentation Index
Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
SDK Reference
CLI commands
| Command | Use |
|---|
deepline auth register | Connect this machine |
deepline auth status --json | Confirm host, user, and workspace |
deepline org list | See available workspaces |
deepline org switch <name> | Switch interactively |
deepline plays search <query> --json | Find saved and prebuilt workflows |
deepline plays describe <name> --json | Inspect inputs and outputs |
deepline plays check <file> | Validate a workflow file without running it |
deepline plays run <target> --watch | Run a file or saved workflow |
deepline plays publish <file> | Save and activate a workflow revision |
Workflow shape
import { definePlay } from 'deepline';
export default definePlay('workflow-name', async (ctx, input) => {
return { ok: true };
});
Use ctx.map for lists:
await ctx.map('accounts', rows, { key: 'domain' })
.step('research', (account, rowCtx) =>
rowCtx.runPlay('research', 'company-research-brief', account),
)
.run();
Use ctx.runPlay for a saved or prebuilt workflow:
await ctx.runPlay('email', 'person-linkedin-to-email', input);
Use ctx.tools.execute for one low-level provider action:
await ctx.tools.execute({
id: 'create_task',
tool: 'salesforce_create_task',
input: { company_domain: 'acme.com' },
});
Config
| Name | Use |
|---|
DEEPLINE_API_KEY | Workspace API key |
DEEPLINE_ORIGIN_URL | Preferred Deepline host override |
DEEPLINE_API_BASE_URL | Compatibility base URL override; prefer DEEPLINE_ORIGIN_URL |
.env.worktree | Local worktree port discovery |
For automation, pass DEEPLINE_API_KEY explicitly in the process environment.
Triggers
Webhook:
definePlay('inbound', handler, {
webhook: {},
});
Schedule:
definePlay('daily', handler, {
cron: { schedule: '0 9 * * *', timezone: 'America/New_York' },
});
Run cap:
definePlay('capped', handler, {
billing: { maxCreditsPerRun: 25 },
});
Multi-org safety
Before customer or background runs, record:
| Check | Example |
|---|
| credential source | explicit DEEPLINE_API_KEY |
| workspace | DEEPLINE_API_KEY="$ACME_KEY" deepline auth status --json |
| input path | customers/acme/input/leads.csv |
| output path | customers/acme/output/leads-enriched.csv |
| workflow | file path or saved workflow name |
Do not use org switch in CI, cron, background agents, or shared terminals.
Common fixes
| Symptom | Try |
|---|
| Missing API key | deepline auth register or set DEEPLINE_API_KEY |
| Wrong workspace | deepline auth status --json |
| Workflow syntax fails | deepline plays check <file> |
| Prebuilt workflow called as a tool | Use deepline plays run or ctx.runPlay |
| Background job used wrong org | Pass DEEPLINE_API_KEY explicitly |