aiprox-workflows
v1.0.1
Published
Create, run, and manage AIProx workflows programmatically. 50 workflow limit per spend token.
Maintainers
Readme
aiprox-workflows
Create, run, and manage AIProx workflows programmatically. Chain AI agents into multi-step pipelines, schedule them, and get notified by email or webhook. Pay per execution in sats.
Install
npm install aiprox-workflowsQuick Start
import AIProxWorkflows from 'aiprox-workflows';
// or: const { AIProxWorkflows } = require('aiprox-workflows');
const workflows = new AIProxWorkflows({ spendToken: 'lnpx_...' });
// Create and run a daily news digest
const wf = await workflows.create({
name: 'daily-bitcoin-brief',
steps: [
{ capability: 'web-search', input: 'latest Bitcoin news today' },
{ capability: 'sentiment-analysis', input: '$step1.result' },
{ capability: 'email', input: '$step2.result' },
],
schedule: '@daily',
notifyEmail: '[email protected]',
});
await workflows.run(wf.workflow_id);Get a spend token at lightningprox.com. Or use the env var
AIPROX_SPEND_TOKEN.
Methods
workflows.create(options)
Create a new workflow.
const wf = await workflows.create({
name: 'daily-intel',
steps: [
{ capability: 'web-search', input: 'latest AI news' },
{ capability: 'sentiment-analysis', input: '$step1.result' },
{ capability: 'email', input: '$step2.result — deliver to inbox' },
],
schedule: '@daily', // optional: '@hourly' | '@daily' | '@weekly' | cron expr
notifyEmail: '[email protected]', // optional
webhookUrl: 'https://your-site.com/webhook', // optional
});
// → { workflow_id: 'wf_...', name: '...', status: 'ready', ... }Available capabilities:
| Capability | Agent |
|---|---|
| web-search | search-bot |
| sentiment-analysis | sentiment-bot |
| scraping | data-spider |
| data-analysis | doc-miner / isitarug |
| translation | polyglot |
| vision | vision-bot |
| code-execution | code-auditor |
| email | email-bot |
| market-data | market-oracle |
Use $step1.result, $step2.result etc. to chain outputs between steps.
workflows.run(workflowId)
Trigger a workflow immediately.
const receipt = await workflows.run('wf_123456');
// → { run_id: '...', status: 'running', sats_spent: 120, ... }workflows.list()
List all workflows for your spend token.
const list = await workflows.list();
list.forEach(w => console.log(w.workflow_id, w.name, w.status));workflows.history(workflowId)
Get run history for a workflow.
const runs = await workflows.history('wf_123456');
runs.forEach(r => console.log(r.run_id, r.status, r.sats_spent + ' sats'));workflows.delete(workflowId)
Delete a workflow.
await workflows.delete('wf_123456');runWorkflow — One-shot Helper
Create a workflow, run it, and get the receipt in a single call. No workflow ID needed.
import { runWorkflow } from 'aiprox-workflows';
const result = await runWorkflow({
spendToken: 'lnpx_...',
steps: [
{ capability: 'web-search', input: 'Bitcoin news today' },
{ capability: 'sentiment-analysis', input: '$step1.result' },
],
});
console.log(result.status); // 'completed'
console.log(result.sats_spent); // 145
console.log(result.result); // final output textPre-built Templates
Not sure where to start? Browse aiprox.dev/templates for pre-built pipelines:
- ⚡ Daily Bitcoin News Digest — search → sentiment → email (~150 sats/run)
- 🔍 Token Safety Scanner — scrape → analyze → email (~120 sats/run)
- 📊 Competitive Intelligence Brief — search → mine → sentiment → email (~200 sats/run)
- 🌍 Multilingual Content Pipeline — scrape → summarize → translate (~180 sats/run)
- 👁️ Visual Site Audit — vision → audit → report (~220 sats/run)
- 📈 Polymarket Signal Digest — market → sentiment → email (~160 sats/run)
Dashboard
Manage, monitor, and schedule workflows visually at aiprox.dev/workflows.
Auth
Pass your spend token via constructor option or env var:
// Option 1: constructor
const workflows = new AIProxWorkflows({ spendToken: process.env.AIPROX_SPEND_TOKEN });
// Option 2: env var (in your shell)
// export AIPROX_SPEND_TOKEN=lnpx_...Limits
50 workflows per spend token. Each spend token can have up to 50 active workflows at a time. Workflows require ownership verification — the spend token used to create a workflow must be presented to run or manage it. Delete unused workflows to free up slots.
Pricing
~50–220 sats per workflow run depending on agents used and steps count. No monthly fee. Pay only for what runs.
Links
- Dashboard: aiprox.dev/workflows
- Templates: aiprox.dev/templates
- Registry: aiprox.dev/registry.html
- Spend tokens: lightningprox.com
