← Back to Home

Core Concepts

What is Juggernaut

Juggernaut is your operating system for managing business processes. It lets you automate internal workflows by leveraging large language models and system integrations — without requiring every stakeholder to be technical.

A Process is essentially a decision tree. You take a complex problem, break it down into small individual sub-problems, and over time get a clearer, more accurate, and actionable answer. Processes are reusable templates. An accounts receivable clerk can input business rules via the prompt editor, a systems person can configure database connections, and a developer can wire up custom plugins — all collaborating on the same workflow without stepping on each other.


![Watch a demo on YouTube](https://www.youtube.com/watch?v=H6NawEjWV1M)

Process

The root container with defined inputs, outputs, and global configuration.

Key Properties

  • inputs: Runtime parameters (typed schema: string, number, array, object). These are the variables fed into the process at execution time.
  • defaultState: Constants available to all pipelines (currency codes, thresholds, model identifiers). Think of these as global config.
  • defaultModel: Fallback LLM identifier (format: provider-model-name). Used when a step does not specify its own model.
  • pipelines[]: Ordered array of execution units. These are your reusable Lego pieces — the same pipeline can be referenced across multiple processes, and updates cascade automatically.

Execution Context

When a Process runs, it creates a State Object — a flat key-value store that persists across all pipelines. Steps read from and write to this state using variable references. You can inspect every output in the Data Logs tab after a run to debug failures or identify optimization points.


Pipelines

Execution containers that group related tasks. Pipelines are stored in a flat array and execute sequentially by index (0 → 1 → 2...). The array structure eliminates nested complexity while supporting conditional jumps.

Types

1. Sync (Sequential)

Tasks execute in strict order. Output of Step 1 is available to Step 2. Use when each operation depends on previous results.

Example: Market Analysis → Pricing Strategy → Risk Assessment (each needs the previous output).

2. Async (Parallel)

All steps execute simultaneously. Use when tasks are independent and you need speed.

Example: Simultaneously analyzing competitor pricing, market size, and regulatory environment.

3. Conditional

Routes execution to a different pipeline index based on state conditions.

Mechanism: Evaluates expressions (e.g., $riskScore > 0.8), then jumps to target pipeline index. After the target completes, execution continues sequentially from that point.

Critical Rules:

  • Always include a default case.
  • Expression syntax: $variable == value (no quotes on strings).
  • Targets are array indices (numbers) or pipeline names (strings).

Steps

Individual operations within a pipeline. Steps fall into two categories: LLM Steps and Plugin Steps.

Task Types

When adding a step, you choose the execution mode:

  • Generate Text: Standard LLM text completion.
  • Structured JSON: Enforces a JSON Schema output. Ideal for database records, API payloads, or structured reports.
  • Images: DALL-E or equivalent image generation.
  • Speech: Text-to-speech output.
  • Plugins: Custom code execution via the Plugins SDK.

LLM Steps

AI operations with prompts and output schemas.

Configuration:

  • messages[]: System and user prompts with template syntax ({{variable}}).
  • outputName: Variable to store result in state.
  • options.outputFormat: json or text.
  • options.outputSettings: JSON Schema for structured outputs (all properties must have descriptions).
  • Advanced: temperature, max_tokens, top_p, web search toggle.

Agentic vs Declarative Plugins: Steps can use plugins in two modes:

  • Declarative: You explicitly configure the plugin action (like Zapier).
  • Agentic: You define the available tools and let the LLM decide when and how to call them.

Data Transform: After a step completes, you can run a Data Transform — a scripting layer that lets you modify state data. This is essential for data engineers who need to reshape, move, or clean outputs before the next step consumes them.

Plugin Steps

Custom code execution via the Plugins SDK.

Configuration:

  • plugin: Plugin nickname (e.g., hubspot-contacts).
  • operation: Specific action (e.g., createContact).
  • data: Input parameters for the operation.

Built-in Plugin Examples:

  • Universal Database Connector: Write standardized SQL-like queries that get translated to MongoDB, Postgres, Neo4j, etc.
  • Data Analytics Plugin: Run regressions, multi-regressions, probability scoring, and weighted scoring on large datasets.
  • Juggernaut Process Trigger: Start or schedule another process from within the current one, enabling router/command-center patterns.

Execution Types

Steps can run once or repeat multiple times.

Standard

The step executes exactly once. Default behavior.

Iterative

The step executes multiple times. Use this when processing each item in a collection individually.

Configuration:

  1. Set type: "Iterative".
  2. Define iterations: Either a hardcoded number or @array.length (e.g., leads.length).
  3. In prompts, use {{STEPLOOP(arrayName)}} to reference the current item.
  4. Use {{SYSTEM:STEPINDEX}} for the current iteration number (0-based).

Performance Note: Iterations run sequentially by default. For bulk parallel processing, consider using an Async pipeline with a single step that processes batches.


State Management

Juggernaut uses a flat state object shared across the entire Process lifecycle.

Variable References

In Prompts (Templates):

{{variableName}}              // Root state variable
{{nested.property}}           // Dot notation
{{array.0.field}}             // Array access
{{STEPLOOP(collection)}}      // Current iteration item (Iterative steps only)
{{SYSTEM:STEPINDEX}}          // Current iteration index

In Conditions:

$variable == value           // Equality check
$variable > 10                // Comparison
$nested.prop == critical      // Dot notation in expressions

Output Modifiers

Control how step outputs interact with existing state:

| Modifier | Syntax | Behavior | |----------|--------|----------| | Create/Overwrite | outputName: "results" | Replaces existing key or creates new. Default behavior. | | Merge/Update | outputName: "append:results" | Merges objects, pushes to arrays, or concatenates strings. Use this to build large documents or accumulate array results across iterations. | | Update Index | outputName: "updateindex:results" | Replaces a specific array index. Advanced use case. |


Asset Reusability

Pipelines, prompts, and other sub-elements of a process are available as standalone assets in the navigation panel. This is intentional — Juggernaut treats building as a Lego-block exercise.

Example: Your Market Intelligence pipeline can be reused across 10 different processes. If you update that one pipeline, the changes cascade across all workflows that reference it. This keeps maintenance centralized and prevents drift.


Database Studio

The Database Studio is your universal command center for data sources.

Connections

Connect to traditional and non-traditional databases:

  • Traditional: MongoDB, Postgres, MySQL, Redis, Pinecone, DynamoDB.
  • Business Sources: Salesforce, HubSpot (and other sources of truth).

Connection settings are encrypted and stored securely. Data never leaves your instance — queries are executed transactionally and results are returned as-is.

Schema & Objects

Once connected, define schemas directly in the studio. For example, a company_profiles object might have fields like main_website (string), industry (selection), revenue (number), metadata (object), etc.

Reports & Queries

  • Visual Reports: Bar charts, line charts, pie charts, donut charts.
  • Structured Queries: Select fields, define WHERE clauses, GROUP BY, LIMIT, OFFSET.
  • Saved Reports: Reusable queries that can be shared or hidden via role-based permissions.
  • Process Integration: Processes can read from, write to, and manipulate these reports directly.

Process-Driven Applications

Raw JSON and static tables are not the best way to consume complex outputs. Juggernaut lets you add an interface layer on top of a completed job using the React Views SDK (@juggernautlabs/views).

Install the SDK, structure your project, and write standard React. The SDK injects job data directly into the view, so you can build interactive dashboards, financial models, approval workflows, or media players without building a separate application layer.

Since most Juggernaut outputs are structured data, it is trivial to map them into rich, interactive React components. Vibe-coding these views is highly effective because the data contract is already strict.


Execution & Cost Tracking

Processes can be triggered manually, via API, or scheduled.

After execution, the Results tab shows:

  • Raw Data Logs: Every step output for debugging.
  • Success/Failure Status: Per pipeline and per step.
  • Process-Driven App: The React view rendered on top of the job data.

The Token Usage tab breaks down:

  • Juggernaut Cloud Credits: Platform execution cost.
  • LLM Cost: Third-party model usage (e.g., OpenAI, Anthropic).

This gives you predictable pricing. If costs drift, you can audit by model and switch to cheaper alternatives where precision is less critical.


Content Generation Patterns

Pattern 1: Summary → Structure → Iterate → Assemble

For complex multi-part content (presentations, reports, structured documents).

  1. Pipeline 0: Analyze raw input → Create analysis object.
  2. Pipeline 1: Design structure → Create outline/array specs.
  3. Pipeline 2 (Iterative): Generate each section/item individually.
  4. Pipeline 3: Assemble final output from accumulated parts.

Pattern 2: List Expansion

For bulk data processing.

  1. Pipeline 0: Receive/validate input array.
  2. Pipeline 1 (Iterative): Process each item independently.
  3. Pipeline 2: Aggregate results into final report.

Pattern 3: Conditional Routing

For smart classification and specialized handling.

  1. Pipeline 0: Classify input (e.g., priority level, content type).
  2. Pipeline 1 (Conditional): Route to specialized pipeline based on classification.
  3. Pipeline 2-N: Type-specific processing logic.