composition

Guidance for connecting Junjo agents and workflows, where a workflow is a graph-based process and an agent is a model-driven process. It describes how applications pass data between these separate components.

In plain words
What is it for?
Use it to call an agent from a workflow node, call a workflow from an agent tool, map inputs and outputs, and preserve the original causes of errors.
Why use it?
It prevents the agent's state from being mixed with a workflow's state and makes failures, cancellation, results, and execution boundaries explicit.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/mdrideout/junjo/composition
Clone the repo
git clone --depth 1 https://github.com/mdrideout/junjo
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 387 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00387
Opus 5 $0.00000 $0.00193
Sonnet 5 $0.00000 $0.00077
Haiku 4.5 $0.00000 $0.00039

Measured yesterday against content hash 6dccf3fb891d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

composition scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sdks/python/docs/content/docs/python/agents/composition.md · 38 lines

What it actually says

Composition uses ordinary application boundaries. Junjo does not add a generic Agent Node, Workflow Tool, shared Store mapper, or universal executable base.

Workflow to Agent

An application Node reads a detached Workflow Store snapshot, maps it to Agent input and dependencies, awaits Agent.execute(), then maps the detached result through explicit Store actions. The Agent span is a physical and semantic child of the Node. Agent state is never the Workflow Store.

Agent to Workflow

An application Tool service maps its validated input into a fresh Workflow definition, awaits the normal Workflow API, and maps ExecutionResult into the Tool output type. The hierarchy is Agent -> Tool operation -> Workflow. The Workflow retains its own Graph, Store, identities, limits, lifecycle, and result; the Agent is its semantic parent executable.

Failure and cancellation

An uncaught Agent error fails its Node and Workflow. The caller receives a WorkflowExecutionError with the Agent error retained as its cause. An uncaught admitted Workflow failure inside a Tool likewise retains its typed Workflow boundary error and original domain cause beneath AgentToolError. Cancellation propagates through every active owner and operation; WorkflowCancelledError remains an asyncio.CancelledError while adding the admitted Workflow run identity. Parent and child limits are independent, and completed side effects are not rolled back.

Application code may explicitly catch a known typed failure and commit a domain recovery result. Junjo does not supply an implicit fallback, transaction, compensation, or persistent memory policy.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 38 lines · 0 tokens per session scan A 6dccf3fb891d

Subscribe to this mod's changes

composition is an agent published in the GitHub repository mdrideout/junjo (20 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 387 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.