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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page