Who it is forA developer with a private model or internal database who wants AutoSwarm's human-in-the-loop queue to hand tasks to custom code.
The problemOff-the-shelf providers do not cover a private model, so a custom handler is needed to process parked tasks from the same queue.
The outcomeA Python script connects as a ShadowWorker, calls your custom_handler for each task, and returns the handler's output as the deliverable.
What you need first
- A working AutoSwarm install (the README links to HKUDS/AutoSwarm)
- Python
- A SHADOW_JWT_SECRET of at least 32 characters
- Access to a local model server (Ollama) or an API key for Anthropic or OpenAI, depending on the use case
Steps
- Install the adapter package from PyPI (inferred:
pip install AutoSwarm-shadow-adapter). (inferred, check the README) - Write an async function
my_local_agent(task: dict) -> strthat returns the result for the task. - Create
ShadowWorker(server_url=..., username=..., password=..., role=..., custom_handler=my_local_agent)with your server and account details. (inferred, check the README) - Run
asyncio.run(worker.run_forever())so the worker keeps polling the queue. - Check the submitted outputs in the React portal or the store.
Prompt for your agent
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for AhmadHassan-BTed/AutoSwarm-Shadow-Adapter and "Plug a private agent into the shadow queue"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer