
breyta
by breyta
SKILL.md
name: breyta
description: >-
Use Breyta to build and operate workflows ("flows"): multi-step backend
processes with triggers, steps, waits, versioning, deploys, and runnable
executions. Use the breyta CLI to create, edit, deploy, and run flows.
At a glance
- Quick start
- Core concepts
- CLI workflow
- Bindings and activation
- Secrets
- Installations
- Authoring reference
- Templates
- Step reference
- Patterns and do/dont
- Reference index
- Glossary
Quick start
Minimal runnable flow (uses :requires, :templates, and :functions):
{:slug :fetch-users
:name "Fetch Users"
:description "Template + function + requires example"
:tags ["draft"]
:concurrency {:type :singleton :on-new-version :supersede}
:requires [{:slot :api
:type :http-api
:label "Users API"
:base-url "https://jsonplaceholder.typicode.com"
:auth {:type :none}}] ;; note: webhook triggers require auth; :none is not allowed there
:templates [{:id :get-users
:type :http-request
:request {:path "/users"
:method :get}}]
:functions [{:id :summarize
:language :clojure
:code "(fn [input] {:count (count (:users input))})"}]
:triggers [{:type :manual :label "Run" :enabled true :config {}}]
:flow
'(let [input (flow/input)]
users (flow/step :http :get-users
{:connection :api
:template :get-users})
summary (flow/step :function :summarize
{:ref :summarize
:input {:users users
:input input}})]
summary))}
Next:
- Authoring details:
./references/authoring-reference.md - Webhooks and event routing:
./references/webhooks.md - CLI workflow:
./references/cli-workflow.md - Bindings and activation:
./references/bindings-activation.md - Secrets:
./references/secrets.md
Shorter variant (LLM + template + function + requires):
{:slug :welcome-user
:name "Welcome User"
:concurrency {:type :singleton :on-new-version :supersede}
:requires [{:slot :ai
:type :llm-provider
:label "AI Provider"
:auth {:type :api-key}}]
:templates [{:id :welcome
:type :llm-prompt
:system "You are helpful."
:prompt "Welcome {{user.name}}!"}]
:functions [{:id :upper-name
:language :clojure
:code "(fn [input] {:user (update (:user input) :name clojure.string/upper-case)})"}]
:triggers [{:type :manual :label "Run" :enabled true :config {}}]
:flow
'(let [input (flow/input)
prepared (flow/step :function :upper-name {:ref :upper-name :input input})
reply (flow/step :llm :welcome
{:connection :ai
:template :welcome
:data prepared})]
reply)}
Core concepts
- Flow definition: a versioned EDN map that describes triggers, steps, and orchestration.
- End-user flow: a flow intended for others to use, marked with the
:end-usertag (MVP). - Installation: a per-user instance of an end-user flow, backed by a (user-scoped) prod profile.
- Flow profile: runtime configuration (bindings + activation inputs + enabled state) used for runs; profiles can be user-scoped (installations) or workspace-scoped.
- Bindings: apply
:requiresslots and activation inputs (form values) for draft or prod. - Activation: enables the prod profile after bindings are set;
--versionpins which version to run and does not accept inputs. - Draft vs deployed: draft runs use draft bindings and draft version; deploy publishes an immutable version, activate enables prod.
Details: ./references/core-concepts.md
CLI workflow
The intended workflow is:
- List flows
- Pull a flow to a
.cljfile - Edit the file
- Push a new draft version
- Deploy (publish a version)
- Apply bindings + activate the prod profile
Fast loop (agent-friendly): do one step at a time
- Add or change exactly one
flow/step - Run the step in isolation (no flow deploy needed):
breyta steps run --type <type> --id <id> --params '<json-object>'- Optionally record the observed output as sidecars (requires
--flow):breyta steps record --flow <flow-slug> --type <type> --id <id> --params '<json-object>' --note '...' --test-name '...'- (or)
breyta steps run --flow <flow-slug> --type <type> --id <id> --params '<json-object>' --record-example --record-test --record-note '...' --record-test-name '...'
- Capture step sidecars (updatable without a new flow version):
- Docs:
breyta steps docs set <flow-slug> <step-id> --markdown '...'(or--file ./notes.md) - Examples:
breyta steps examples add <flow-slug> <step-id> --input '<json>' --output '<json>' --note '...' - Tests (as documentation, runnable on demand):
breyta steps tests add <flow-slug> <step-id> --type <type> --name '...' --input '<json>' --expected '<json>' --note '...'
- Docs:
- Inspect the step context quickly:
breyta steps show <flow-slug> <step-id>- Tip: when run interactively,
steps showalso prints a short "Next actions" helper to stderr (stdout remains structured JSON/EDN).
- Verify stored tests against the live step runner:
breyta steps tests verify <flow-slug> <step-id> --type <type>
- Push/validate/compile, then run the draft flow end-to-end
Notes:
breyta steps runis best-effort isolation; waits/sleeps/fanout aren’t supported.- Keep step ids stable and short; don’t rename ids unless you intend to invalidate history/examples.
- Step ids and flow slugs accept either keywords or strings on the server; the CLI takes plain strings (e.g.
make-output, not:make-output).
Core commands:
breyta flows listbreyta flows pull <slug> --out ./tmp/flows/<slug>.cljbreyta flows push --file ./tmp/flows/<slug>.cljbreyta flows deploy <slug>breyta flows validate <slug>breyta flows compile <slug>breyta runs start --flow <slug> --source draft --input '{"n":41}' --waitbreyta runs cancel <workflow-id> --reason "..."(use--forceto terminate)
Details: ./references/cli-workflow.md
Installations
How end-user flows (:tags [:end-user]) are subscribed to, configured, and run
via installation profiles (including multi-file uploads).
Details: ./references/installations.md
Bindings and activation
Draft workflow (safe preview):
- Generate a draft template:
breyta flows draft bindings template <slug> --out draft.edn - Set draft bindings:
breyta flows draft bindings apply <slug> @draft.edn - Show draft bindings status:
breyta flows draft bindings show <slug> - Run draft:
breyta flows draft run <slug> --input '{\"n\":41}' --wait
Prod workflow:
- Generate a template:
breyta flows bindings template <slug> --out profile.edn - Apply bindings:
breyta flows bindings apply <slug> @profile.edn - Or promote draft bindings:
breyta flows bindings apply <slug> --from-draft - Show bindings status:
breyta flows bindings show <slug> - Enable prod profile:
breyta flows activate <slug> --version latest
Templates prefill current bindings by default; add --clean for a requirements-only template.
Profile pinning: set :profile :autoUpgrade true to follow latest versions, false to pin.
Details: ./references/bindings-activation.md
Secrets
How secret slots and secret refs work, how to bind values, and rotation patterns.
Details: ./references/secrets.md
Authoring reference
Flow file format and core fields:
:requiresfor connection slots and activation inputs.:concurrencyfor execution behavior.:triggersfor run initiation.:flowfor orchestration and determinism rules.- Limits: definition size 100 KB; inline results up to 10 KB; max step result 1 MB.
Details: ./references/authoring-reference.md
Templates
- Use
:templatesfor large prompts, request bodies, or SQL. - Reference with
:templateand:datain steps. - Templates are packed to blob storage on deploy; versions store small refs.
- Flow definition size limit is 100 KB; templates help keep definitions small.
- Template strings use Handlebars syntax (
{{...}}); seereferences/templating.mdfor a short reference. - For large step outputs, use
:persistto store results as refs.
Details: ./references/templates.md
Step reference
:httpfor HTTP requests.:llmfor model calls.:dbfor SQL queries.:waitfor webhook/human-in-the-loop waits.:functionfor transforms.
Details: ./references/step-reference.md
Persisted results
How :persist works, when to use it, and how refs flow to downstream steps.
Details: ./references/persist.md
Resources (CLI)
Use breyta resources ... to inspect persisted result refs (resource URIs like res://...) and fetch their content.
Ready today:
breyta resources list/breyta resources workflow list <workflow-id>/breyta resources workflow step <workflow-id> <step-id>breyta resources get <uri>breyta resources read <uri>(intended for:resultresources like persisted refs)breyta resources url <uri>
Notes:
resourcesrequires API mode (BREYTA_API_URL+ auth); it does not work against the local mock/TUI surface.- Resource types like
:import,:file,:bundle,:external-dirmay list/get, but content reads are currently intended for persisted results.
Patterns and do/dont
- Bindings then activate; draft stays in draft.
- Keep flow body deterministic.
- Use connection slots for credentials.
Details: ./references/patterns.md
Agent guidance
- Prefer the fast loop: implement one step, run it in isolation, then move to the next step.
- Once a step is stable, store docs + examples + tests using
breyta steps docs|examples|testsso future edits don’t require rediscovering intent (or usebreyta steps run --record-example/--record-testto capture quickly). - Use
breyta steps showto load docs/examples/tests before editing a step. - Use
breyta steps tests verifywhen you want the stored test cases to run against the step runner. - Stop and ask for missing bindings or activation inputs instead of inventing values.
- Provide a template path or CLI command the user can fill (
flows bindings templateorflows draft bindings template). - Keep the API-provided
:redacted/:generateplaceholders for secrets in templates. - For webhook secrets, require explicit
:secret-refon the slot.
Details: ./references/agent-guidance.md
Reference index
Quick lists of slot types, auth types, trigger types, step types, and form field types.
Details: ./references/reference-index.md
Glossary
Common terms like flow profile, bindings, activation inputs, and draft bindings.
Details: ./references/glossary.md
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です