<!-- Auto-generated by scripts/skill_generator.py. Do not edit manually. -->
<!-- Regenerate with: just skills -->

# Composition Patterns & Primitives

Extracted from `src/adk_fluent/patterns.py` and `src/adk_fluent/_primitives.py`.

## Higher-order patterns (`from adk_fluent.patterns import ...`)

### `Any(*args, **kwargs)`

Special type indicating an unconstrained type.

### `Callable()`

### `a2a_cascade(*endpoints: 'str', names: 'list[str] | None' = None, timeout: 'float' = 300.0) -> 'Any'`

Fallback chain across remote A2A agents.

### `a2a_delegate(coordinator: 'Any', **remotes: 'str') -> 'Any'`

Coordinator agent with named remote specialists as sub-agents.

### `a2a_fanout(*endpoints: 'str', names: 'list[str] | None' = None, timeout: 'float' = 300.0) -> 'Any'`

Fan-out across remote A2A agents in parallel.

### `cascade(*agents: 'Any') -> 'Any'`

Try agents in order. First success wins (fallback chain).

### `chain(*steps: 'Any') -> 'Any'`

Chain steps sequentially using ``>>`` (Pipeline).

### `conditional(predicate: 'Callable[[dict], bool]', if_true: 'Any', if_false: 'Any | None' = None, *, key: 'str | None' = None) -> 'Any'`

Route to different agents based on a state predicate.

### `fan_out_merge(*agents: 'Any', merge_key: 'str' = 'merged', merge_fn: 'Callable | None' = None) -> 'Any'`

Run agents in parallel, then merge their outputs into one state key.

### `map_reduce(mapper: 'Any', reducer: 'Any', *, items_key: 'str', item_key: 'str' = '_item', result_key: 'str' = 'results') -> 'Any'`

Fan-out a mapper agent over items in state, then reduce.

### `review_loop(worker: 'Any', reviewer: 'Any', *, quality_key: 'str' = 'quality', target: 'str' = 'good', max_rounds: 'int' = 3) -> 'Any'`

Create a refinement loop: worker produces, reviewer evaluates, repeat until target.

### `supervised(worker: 'Any', supervisor: 'Any', *, approval_key: 'str' = 'approved', max_revisions: 'int' = 3) -> 'Any'`

Worker-supervisor pattern: worker produces, supervisor approves or requests revision.

### `ui_dashboard_agent(name: 'str', model: 'str', *, cards: 'list[dict[str, Any]]', instruction: 'str' = '') -> 'Any'`

Create an agent with an attached dashboard UI surface.

### `ui_form_agent(name: 'str', model: 'str', *, fields: 'dict[str, str]', on_submit: 'Callable | None' = None, instruction: 'str' = '', submit_label: 'str' = 'Submit') -> 'Any'`

Create an agent with an attached form UI surface.

## Expression primitives

| Primitive | Usage | Description |
|---|---|---|
| `until(pred, max=10)` | `>> until(...)` | Loop condition for `*` operator |
| `tap(fn)` | `>> tap(...)` | Inline transform (no LLM, zero cost) |
| `expect(fn)` | `>> expect(...)` | Alias for tap |
| `map_over(key)` | `>> map_over(...)` | Map agent over list items in state[key] |
| `gate(predicate)` | `>> gate(...)` | Conditional execution (skip if false) |
| `race(*agents)` | `>> race(...)` | First-to-complete wins |
| `dispatch(name=, on_complete=)` | `>> dispatch(...)` | Launch background task |
| `join()` | `>> join(...)` | Wait for all background tasks |

## Expression operators

| Operator | Syntax | Result |
|---|---|---|
| `>>` | `a >> b` | Pipeline (sequential) |
| `|` | `a | b` | FanOut (parallel) |
| `*` | `(a >> b) * 3` | Loop (fixed iterations) |
| `* until()` | `(a >> b) * until(pred)` | Loop (conditional) |
| `//` | `a // b` | Fallback chain |
| `@` | `a @ Schema` | Structured output (.returns(Schema)) |
