juglans

mcp
SUMMARY

AI workflow orchestration DSL — compiler, runtime & CLI

README.md

Juglans

Juglans

AI workflow orchestration DSL — compiler, runtime & CLI

CI Release License


Juglans is a declarative workflow language for building and orchestrating AI agent pipelines. Write .jg files to define DAG-based workflows, .jgagent for agent configs, and .jgx for reusable prompt templates.

Features

  • Declarative DAG workflows — conditional edges, switch routing, loops, error handling, function definitions
  • AI-native builtinschat(), p() (prompt render), memory, history
  • 80+ expression functionslen, map, filter, reduce, zip, sorted, group_by, ...
  • Lambda expressionsfilter($list, x => x > 10)
  • Python interop — call pandas, sklearn, any Python module directly
  • MCP integration — connect external tools via Model Context Protocol
  • Package ecosystem — publish & install reusable workflow packages
  • Web server — built-in Axum server with SSE streaming
  • Docker deploymentjuglans deploy for one-command containerization
  • Cross-platform — macOS, Linux, Windows + WASM support

Quick Install

curl -fsSL https://raw.githubusercontent.com/juglans-ai/juglans/main/install.sh | sh

Hello World

# hello.jg
[hello]: print(message="Hello, World!")
juglans hello.jg

AI Chat Workflow

# chat.jg
[greet]: chat(message="Say hello in 3 languages")
[format]: chat(message="Format as a numbered list: " + output)
[greet] -> [format]

Conditional Routing

# router.jg
entry: [classify]
exit: [reply]

[classify]: chat(message=input.message, format="json")
[save]: intent = $classify.output.intent

[handle_question]: chat(message="Answer: " + input.message)
[handle_task]: chat(message="Execute: " + input.message)
[reply]: print(value=output)

[classify] -> [save]
[save] if intent == "question" -> [handle_question]
[save] if intent == "task" -> [handle_task]
[save] -> [handle_question]

[handle_question] -> [reply]
[handle_task] -> [reply]

Agent Config

# analyst.jgagent
slug: "analyst"
name: "Data Analyst"
model: "claude-sonnet-4-20250514"
system_prompt: "You are a data analyst. Answer questions with data-driven insights."
tools: ["devtools"]
juglans analyst.jgagent --message "Analyze the CSV in ./data/"

CLI

juglans <file>                    # Execute .jg / .jgagent / .jgx
juglans check [path]              # Validate syntax
juglans web --port 8080           # Local dev server (SSE)
juglans deploy                    # Docker deployment
juglans pack / publish            # Package management
juglans chat                      # Interactive TUI

Documentation

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT

Reviews (0)

No results found