# AI use cases for Auto Swarm Shadow Adapter (AhmadHassan-BTed/AutoSwarm-Shadow-Adapter)

Repo: [AhmadHassan-BTed/AutoSwarm-Shadow-Adapter](https://github.com/AhmadHassan-BTed/AutoSwarm-Shadow-Adapter) | Use cases: 4 | Page: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/

A Python adapter that lets AutoSwarm agentic DAG tasks pause for a human reviewer or a remote worker without blocking parallel branches, with state kept in SQLite.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Pause a legal review step for human sign-off: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/pause-legal-review-for-human-signoff/
- Serve a developer seat from a local GPU model: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/run-local-gpu-worker-for-dev-seat/
- Fill a QA seat with a remote OpenAI key: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/fill-qa-seat-with-remote-openai-key/
- Plug a private agent into the shadow queue: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/embed-custom-agent-as-shadow-worker/

## How to pause a legal review step for human sign-off with Auto Swarm Shadow Adapter

Repo: [AhmadHassan-BTed/AutoSwarm-Shadow-Adapter](https://github.com/AhmadHassan-BTed/AutoSwarm-Shadow-Adapter) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Park a legal_counsel task for a human reviewer while other DAG branches keep running.

**Who it is for:** A team lead running an AutoSwarm company session where a contract or policy step needs a named human to approve before the workflow continues.

**The problem:** A normal AutoSwarm task waits on the engine. A human approval can take hours, and the engine may time out or stall parallel branches.

**The outcome:** The task is parked in the shadow queue with status AWAITING_HUMAN, the thread is released, and the reviewer approves it in the React portal. The approval moves the phase to Phase.APPROVED and the dependent step resumes.

### Steps

1. Set `SHADOW_JWT_SECRET` to a secret of at least 32 characters, and optionally `SHADOW_API_PORT` (default 8800), before starting the adapter.
2. Start an AutoSwarm company session with `opc chat --mode company "Build feature X"`; the Manager AI assigns work to role seats such as legal_counsel.
3. Open the React portal on the adapter port, find the parked task in the pending queue, and read the brief.
4. Attach up to 5 deliverable files (10MB each, 50MB total by default) and submit through the REST API, or send rework_requested if the work needs changes.
5. Confirm the task shows Phase.APPROVED in the store and that the downstream AutoSwarm node has resumed.

### Prompt to paste into your agent

```text
Use the repo AhmadHassan-BTed/AutoSwarm-Shadow-Adapter with the AutoSwarm session for <target project>. Park the legal_counsel task, then list the pending items in the shadow queue. Expected output: a list of parked tasks with their status and brief. Verify that each parked task shows AWAITING_HUMAN and that no other DAG branch is blocked.
```

### Caveat

The README does not show how to start the adapter server or install the package, so those steps need to be confirmed from the docs before use.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/pause-legal-review-for-human-signoff/

## How to serve a developer seat from a local GPU model with Auto Swarm Shadow Adapter

Repo: [AhmadHassan-BTed/AutoSwarm-Shadow-Adapter](https://github.com/AhmadHassan-BTed/AutoSwarm-Shadow-Adapter) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Connect a local Ollama model to the senior_developer role using shadow-worker.

**Who it is for:** An engineer with a GPU workstation who wants AutoSwarm's senior_developer tasks handled by a local model instead of a cloud API.

**The problem:** AutoSwarm tasks assigned to a developer seat need a worker to pick them up, and the engineer wants the work done locally on their own model.

**The outcome:** The shadow-worker process logs in to the adapter server as a named user, claims senior_developer tasks, and runs them through the local Ollama model.

### Steps

1. Start the Ollama server at `http://localhost:11434` and run `export OLLAMA_HOST="http://localhost:11434"`.
2. Run `shadow-worker --server-url http://192.168.1.100:8800 --username <username> --password <password> --role senior_developer --provider ollama --model llama3.3:70b` with your own account details. (inferred, check the README)
3. Leave the worker running and confirm it stays connected to the server.
4. Start an AutoSwarm session with `opc chat --mode company "Build feature X"` so a senior_developer task is created and assigned.
5. Check the portal or store for the worker's submitted deliverable and the task's new phase.

### Prompt to paste into your agent

```text
Use the repo AhmadHassan-BTed/AutoSwarm-Shadow-Adapter to connect a shadow-worker for the senior_developer role at <server URL> using the Ollama provider with model llama3.3:70b. Expected output: a running worker that reports the tasks it claims and the deliverables it submits. Verify that the worker logged in with the account <username> and that a claimed task reached the submitted state.
```

### Caveat

The README example uses the llama3.3:70b model, so the machine must have enough memory to run that model in Ollama.

Risk, credentials: The worker command takes a username and password on the command line, so use an account created for this node and avoid saving the password in shared shell history.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/run-local-gpu-worker-for-dev-seat/

## How to fill a QA seat with a remote OpenAI key with Auto Swarm Shadow Adapter

Repo: [AhmadHassan-BTed/AutoSwarm-Shadow-Adapter](https://github.com/AhmadHassan-BTed/AutoSwarm-Shadow-Adapter) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Run a shadow-worker on a separate machine that uses its own OpenAI key for qa_tester tasks.

**Who it is for:** A QA lead who has an OpenAI API key on a remote tester machine and wants that machine to handle qa_tester tasks in an AutoSwarm company workflow.

**The problem:** QA tasks in a company DAG need a worker on a separate machine, and the tester wants to use a hosted model without moving the work onto the main server.

**The outcome:** A remote shadow-worker picks up qa_tester tasks, calls the OpenAI provider with the local key, and submits results back to the adapter queue.

### Steps

1. On the remote tester machine, run `export LOCAL_OPENAI_API_KEY="<your-openai-key>"` with your own key. (inferred, check the README)
2. Run `shadow-worker --server-url http://192.168.1.100:8800 --username <username> --password <password> --role qa_tester --provider openai --model gpt-4o` with your account details. (inferred, check the README)
3. Start an AutoSwarm session with `opc chat --mode company "Build feature X"` so a qa_tester task is assigned.
4. Watch the worker output to confirm it claimed the task and submitted a deliverable.
5. Review the submission in the React portal before the phase moves on.

### Prompt to paste into your agent

```text
Use the repo AhmadHassan-BTed/AutoSwarm-Shadow-Adapter to start a shadow-worker for the qa_tester role on <remote machine> with the openai provider and model gpt-4o. Expected output: the worker's log showing each claimed task and each submitted deliverable. Verify that the key is read from the LOCAL_OPENAI_API_KEY variable and not printed to the log.
```

### Caveat

The README gives the tester example for OpenAI gpt-4o only, so other models from that provider are not shown as tested.

Risk, credentials: This setup puts an OpenAI API key and an account password on a remote machine, so limit who can access that machine and rotate the key if it is exposed.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/fill-qa-seat-with-remote-openai-key/

## How to plug a private agent into the shadow queue with Auto Swarm Shadow Adapter

Repo: [AhmadHassan-BTed/AutoSwarm-Shadow-Adapter](https://github.com/AhmadHassan-BTed/AutoSwarm-Shadow-Adapter) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Use the ShadowWorker Python class to run your own handler against parked tasks.

**Who it is for:** A developer with a private model or internal database who wants AutoSwarm's human-in-the-loop queue to hand tasks to custom code.

**The problem:** Off-the-shelf providers do not cover a private model, so a custom handler is needed to process parked tasks from the same queue.

**The outcome:** A Python script connects as a ShadowWorker, calls your custom_handler for each task, and returns the handler's output as the deliverable.

### Steps

1. Install the adapter package from PyPI (inferred: `pip install AutoSwarm-shadow-adapter`). (inferred, check the README)
2. Write an async function `my_local_agent(task: dict) -> str` that returns the result for the task.
3. Create `ShadowWorker(server_url=..., username=..., password=..., role=..., custom_handler=my_local_agent)` with your server and account details. (inferred, check the README)
4. Run `asyncio.run(worker.run_forever())` so the worker keeps polling the queue.
5. Check the submitted outputs in the React portal or the store.

### Prompt to paste into your agent

```text
Use the repo AhmadHassan-BTed/AutoSwarm-Shadow-Adapter to build a ShadowWorker with a custom_handler that calls <private model or database> for the <role> role. Expected output: a Python script that runs forever and returns one string per task. Verify that the handler's returned text appears as the deliverable for a parked task.
```

### Caveat

The README's SDK example uses a placeholder password, so real credentials must be set separately and the install command is not shown in the README.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ahmadhassan-bted-autoswarm-shadow-adapter/embed-custom-agent-as-shadow-worker/
