allium
免费Give your AI agents something more useful than a prompt. Velocity through clarity.
中文简介正在准备中。当前显示原文说明。
Build an ORC behavior tree workflow using the DSL
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Build a behavior tree workflow using the ORC DSL. Read docs/DSL-REFERENCE.md for the full reference.
(require '[ai.obney.orc.orc-service.interface :as orc])
Every workflow has three parts:
(orc/workflow "workflow-name"
;; 1. Blackboard (input/output schema)
(orc/blackboard {:input-key :string
:output-key :string})
;; 2. Root node (tree structure)
(orc/sequence "main"
(orc/llm "step-1" ...)
(orc/code "step-2" ...)))
(orc/llm "summarize"
:instruction "Summarize the input text in 2 sentences."
:reads [:input-text]
:writes [:summary]
:model "google/gemini-2.0-flash-001") ;; optional, uses default if omitted
;; :fn must be a fully-qualified function name (resolved at runtime)
;; The function receives {:keys [inputs]} and returns {:key value}
(orc/code "transform"
:fn "my.ns/transform-fn"
:reads [:raw-data]
:writes [:processed-data])
(orc/sequence "pipeline"
(orc/llm "extract" ...)
(orc/code "validate" ...)
(orc/llm "respond" ...))
(orc/fallback "with-retry"
(orc/llm "try-gpt4" :model "openai/gpt-4o" ...)
(orc/llm "try-gemini" :model "google/gemini-2.0-flash-001" ...))
(orc/parallel "gather"
{:success-policy :all} ;; :all, :any, or :majority
(orc/llm "analysis-a" ...)
(orc/llm "analysis-b" ...))
(orc/map-each "process-items"
:source-key :items ;; blackboard key with the collection
:item-key :current-item ;; blackboard key for each item
:output-key :results ;; blackboard key for collected results
(orc/llm "process-one" ...))
(orc/condition "check-length"
:check "(fn [bb] (> (count (:text bb)) 100))"
:reads [:text])
(orc/llm-condition "is-relevant?"
:instruction "Is this text relevant to the user's question? Answer yes or no."
:reads [:text :question])
;; Build (stores in event store, returns sheet-id)
(def sheet-id (orc/build-workflow! ctx my-workflow))
;; Execute (blocking, returns result)
(orc/execute ctx sheet-id {:input-key "value"})
;; => {:status :success, :outputs {:output-key "result"}, :duration-ms 1234}
;; Execute with options
(orc/execute ctx sheet-id inputs :timeout-ms 60000)
(orc/execute ctx sheet-id inputs :use-version 2)
After a processor restart against the same durable event store, recover abandoned execution frontiers without creating replacement ticks:
(orc/resume-in-progress! ctx)
The recovery call is idempotent and preserves tick, sheet, node, and task-call identity. It is distinct from reconnecting a live stream, which does not replay history.
:reads and :writes must be declared in the blackboard:fn must be a namespace-qualified symbol string, not inline codebuild-workflow! is idempotent — same workflow name produces the same sheet-id, and unchanged definitions are a true no-op (zero events) via content hashingorc/publish-version for production snapshotsorc/start-telemetry-exporter!; inspect
retry/drop counters with orc/telemetry-exporter-stats and stop it explicitly(orc/workflow "with-judges"
(orc/blackboard {:question :string :answer :string})
(orc/judges
{:grounding {:type :grounding :weight 0.5}
:completeness {:type :completeness :weight 0.5}})
(orc/llm "answer"
:instruction "Answer the question."
:reads [:question]
:writes [:answer]
:judges [:grounding :completeness]))
docs/DSL-REFERENCE.md — Full DSL reference with examplesdocs/ORC-SERVICE-GUIDE.md — Execution engine internals还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Give your AI agents something more useful than a prompt. Velocity through clarity.
中文简介正在准备中。当前显示原文说明。
Extract an Allium specification from an existing codebase. Use when the user has existing code and wants to distil behaviour into a spec, reverse engineer a specification from implementation, generate a spec from code, turn implementation into a behavioural specification, or document what a codebase does in Allium terms.
中文简介正在准备中。当前显示原文说明。
Run a structured discovery session to build an Allium specification through conversation. Use when the user wants to create a new spec from scratch, elicit or gather requirements, capture domain behaviour, specify a feature or system, define what a system should do, or is describing functionality and needs help shaping it into a specification.
中文简介正在准备中。当前显示原文说明。
Implement command handlers that validate state and emit events using the Grain framework
中文简介正在准备中。当前显示原文说明。
Create scheduled background jobs that run on cron schedules
中文简介正在准备中。当前显示原文说明。
Implement query handlers that read from event-sourced read models
中文简介正在准备中。当前显示原文说明。