| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A minimal, universal starting point for adding MachineID.io device registration and validation to any Python-based agent or script.
Use this starter to prevent runaway fleets, enforce hard device limits, and ensure every agent checks in before doing work.
The free org key supports up to 3 devices, with higher limits available on paid plans.
This is the base template all other MachineID.io examples build on.
git clone https://github.com/machineid-io/machineid-python-starter.git
cd machineid-python-starterpip install -r requirements.txtVisit https://machineid.io
Click “Generate free org key”
Copy the key (it begins with org_)
export MACHINEID_ORG_KEY=org_your_org_key_hereOne-liner (run immediately):
MACHINEID_ORG_KEY=org_xxx python agent.pypython agent.pyYou'll see a register call, a validate call, and a summary showing whether this device is allowed.
Reads MACHINEID_ORG_KEY from the environment
Uses a default deviceId of python-starter:01
Calls /api/v1/devices/register:
Calls /api/v1/devices/validate:
This simple cycle prevents uncontrolled scaling and mirrors the behavior of real production fleets.
To integrate MachineID.io:
This prevents accidental over-scaling and uncontrolled agent spawning.
Drop the same register/validate block into any Python worker, task runner, or background script.
This is all you need to enforce simple device limits across your entire system.
Optional .env pattern:
MACHINEID_ORG_KEY=org_your_org_key_hereDashboard → https://machineid.io/dashboard
Generate free org key → https://machineid.io
Docs → https://machineid.io/docs
→ LangChain: https://github.com/machineid-io/langchain-machineid-template
→ CrewAI: https://github.com/machineid-io/crewai-machineid-template
→ OpenAI Swarm: https://github.com/machineid-io/swarm-machineid-template
MIT licensed · Built by MachineID.io
| Back | FazBrowse Home | New Git URL |