Back to API Overview

Workflow API

Deploy agents that patrol web sources on a schedule, detect what changed, and deliver signals when conditions are met.

Lifecycle: active -> paused -> completed/failed

Credits: 1/execution (basic) | 2 (with NL condition) | Variable for multi-step/AI-planned


Workflow Modes

ModeDescriptionKey Config
simpleSingle agent patrol per execution (default)workflow_type, operation_config
multi_stepMulti-agent pipeline with dependenciessteps[] array
ai_plannedDescribe what to watch; AI generates the patrol pipelineintent, max_credits_per_execution

Step Types (for multi_step mode)

TypeDescriptionConfig Fields
searchWeb searchquery, max_results, query_decomposition
crawlWeb crawlingurls, max_pages, extraction_schema
aggregateCombine/summarizeaggregation_type, format

Step Dependencies: depends_on (array of step IDs), output_key (reference name), cascade_condition (conditional execution)


POST /v1/workflows/assess-intent

Assess if a monitoring intent is specific enough for agents to patrol. FREE.

ParameterTypeDefaultDescription
intentStringrequiredThe monitoring intent to assess (10-2000 chars)
timeoutNumber10000Timeout in milliseconds (1000-30000)

Rate Limit: 10/hour/user

Response:

FieldTypeDescription
assessmentStringspecific or vague
specificity_scoreNumber1-10 (7+ is specific enough)
is_assessedBooleanfalse when assessment_source=fallback (system failure, not a real assessment)
assessment_sourceStringllm (full), heuristic (rate-limited), or fallback (LLM failed, defaults to specific/7)
fallback_reason_codeStringtimeout, parse_error, provider_error, rate_limited (only when source !== llm)
vague_aspectsString[]What's unclear (only if vague)
proposed_intentStringClearer rewrite (only if vague)
what_we_clarifiedString[]What was improved (only if vague)
inferredObjectAdvisory metadata: trigger_conditions, exclusions, entities, source_types, suggested_cadence (hourly/daily/weekly/monthly), monitoring_type
reasoningStringBrief explanation

POST /v1/workflows/plan

Preview an AI-planned patrol before deploying agents. Returns a complete workflow plan with recommended steps, topology, and quality scores.

Credits: Variable by preset — quick (~10), standard (~30), thorough (~50), comprehensive (~100). Returns 402 if insufficient.

Deprecated: The phase parameter and phased planning flow (discover → research → generate) were removed in March 2026. All planning now returns complete workflow plans in a single request. For async planning of complex workflows, use POST /v1/workflows/plan/async and poll GET /v1/workflows/plan/async/{session_id}.

Core Parameters

ParameterTypeDescription
intentString (required)Natural language description (10-2000 chars)
nameStringOptional workflow name
max_credits_per_executionNumberExecution budget limit
planning_budgetNumberPlanner budget hint (takes precedence over max_credits_per_execution)
quality_modeStringquality_first (default) or balanced
skip_entity_discoveryBooleanSkip entity discovery for faster response

Response Fields

All responses include: planning_profile (precision_linear | dual_lane_hybrid | fork_join_dag), topology_reason, planning_quality_score, coverage_score, depth_score, coverage_gaps, recommended_steps, credits_consumed.


GET /v1/workflows

List workflows. Query: limit (1-100), offset, status (active/planning/plan_failed/archived), scope (all/owned/shared), search (string), tags (comma-separated), sort_by (created/updated/name), sort_order (asc/desc)


POST /v1/workflows

Create a new workflow. Describe what to watch, set a schedule, and deploy agents on patrol.

Core Parameters

ParameterTypeRequiredDescription
nameStringYesWorkflow name (max 255 chars)
modeStringNosimple (default), multi_step, ai_planned
stop_conditionObjectYesWhen to complete workflow
dry_runBooleanNoEstimate cost without creating

Simple mode: workflow_type (search/crawl), operation_config Multi-step: steps[] array AI-planned: intent, max_credits_per_execution

Schedule Configuration (one required)

ParameterDescriptionExample
intervalHuman-readable ("N unit": minutes/hours/days/weeks)"6 hours", "1 day"
interval_minutesRaw minutes (takes precedence over interval)60
cron_expression5-field cron"0 9 * * MON,WED,FRI"
scheduled_forOne-time ISO 8601"2025-01-15T15:00:00Z"
anchor_minuteAlign to minute (0-59)0
timezoneIANA timezone (default: UTC)"America/New_York"

Stop Condition Types

TypeDescriptionKey Fields
result_countResult count meets conditionoperator (>,<,>=,<=,==), value
contains_urlResults contain specific URLurl
field_valueField matches valuefield, operator, value
extracted_fieldExtracted crawl field matchesfield, operator, value
natural_languageLLM evaluates conditiondescription, confidence_threshold (default: 0.7)
alwaysNever auto-stop-

NL Confidence: High (0.8-0.9) = strong evidence | Medium (0.6-0.7) = balanced | Low (0.4-0.5) = permissive


GET /v1/workflows/{workflow_id}

Get workflow details with recent executions.

PATCH /v1/workflows/{workflow_id}

Update workflow parameters.

Editable Fields: name, workflow_type, operation_config, stop_condition, interval_minutes, max_executions, status, session_id

DELETE /v1/workflows/{workflow_id}

Delete a workflow and stop scheduled patrols.


POST /v1/workflows/{workflow_id}/execute

Execute a patrol immediately. Supports dry_run: true.

Response: execution.credits, execution.condition_met, execution.result_changes

Result Change Tracking

For search workflows, compares against the immediately previous execution:

FieldDescription
net_new_countURLs not in previous execution
dropped_countURLs no longer in results
retained_countURLs in both executions
change_rate(new + dropped) / total_unique x 100
net_new_urlsEnriched data for new URLs (title, snippet, published_date)
previous_execution_idPrevious execution (null for first)

First execution counts all URLs as "new". For global uniqueness, use a Session (URL dedup via session_urls table).

Intent Relevance Filtering

The agent filters results not matching the workflow's monitoring intent. Intent extracted from: intent field > description > operation_config.query > name (fallback, filtering disabled).

Result classifications: NEW (relevant), CONTEXT (background), UPDATE (previously reported), IRRELEVANT (filtered).

Response includes intent_relevance_filter: filtered_count, filtered_items[] (url, title, reason), monitoring_intent_used.

When all changes are irrelevant, signal delivery is suppressed.

Skip to main content
Workflow API - Zipf AI Documentation