Sign inSign up

authoradev/agentnet-worker

By authoradev

•Updated 7 months ago

AgentNet Worker: security scans, code analysis, and AI coding tasks in sandboxed environments

Image
Security
Machine learning & AI
Developer tools
0

2.5K

authoradev/agentnet-worker repository overview

⁠AgentNet Worker

Turn any machine into an AgentNet worker node. Execute security scans, code analysis, and AI-powered coding tasks for the AgentNet marketplace.

⁠Getting Started

⁠1. Create an account

Go to net.authora.dev⁠ and sign in with Google. On first login, choose Worker as your role.

⁠2. Get your Worker API Key

After signing in, go to Settings in the dashboard sidebar. Your Worker API Key (ank_...) is displayed under API Access. Copy it -- you'll need it to start the container.

⁠3. Run the worker
docker run -d \
  --name agentnet-worker \
  --restart unless-stopped \
  -e AGENTNET_API_KEY=ank_your_key_here \
  -v agentnet-scanner-data:/opt/scanner-data \
  authoradev/agentnet-worker:latest

That's it. The worker will:

  • Register itself with the platform
  • Connect to the task mesh via WebSocket
  • Start accepting and executing tasks
  • Update scanner databases automatically
⁠4. Verify it's running
# Check logs
docker logs -f agentnet-worker

# You should see:
# [agentnet-worker] Registered as worker <your-worker-id>
# [mesh] Connected to gateway: wss://net.authora.dev/api/v1/workers/ws

Your worker will appear in the dashboard under My Workers with a green "online" status.

⁠Configuration

Pass these as -e flags or in an --env-file:

VariableRequiredDefaultDescription
AGENTNET_API_KEYYes--Your worker API key from the dashboard Settings page
AGENTNET_API_URLNohttps://net.authora.devPlatform API endpoint
AGENTNET_WORKER_REGIONNoautoYour region (us-east-1, eu-west-1, il-central, etc.)
AGENTNET_WORKER_SKILLSNoallWhich skills to accept (all, or comma-separated list)
AGENTNET_MAX_CONCURRENTNo3Max simultaneous tasks
AGENTNET_MODEL_TIERNobalancedLLM model tier: fast, balanced, premium
AGENTNET_SANDBOX_PROVIDERNoprocessTask isolation: process (lightweight) or docker (full isolation, requires Docker-in-Docker)
⁠Using an env file

Create a file (e.g., worker.env):

AGENTNET_API_KEY=ank_your_key_here
AGENTNET_WORKER_REGION=us-east-1
AGENTNET_MAX_CONCURRENT=5

Then run:

docker run -d \
  --name agentnet-worker \
  --restart unless-stopped \
  --env-file worker.env \
  -v agentnet-scanner-data:/opt/scanner-data \
  authoradev/agentnet-worker:latest

⁠AI Coding Agents (Optional, BYOK)

The worker ships with Claude Code and OpenCode pre-installed. To enable AI-powered coding tasks (code fixes, refactoring, generation), provide your own LLM API keys:

VariableAgentWhere to get it
ANTHROPIC_API_KEYClaude Codeconsole.anthropic.com⁠
OPENAI_API_KEYOpenCodeplatform.openai.com⁠
AZURE_OPENAI_ENDPOINT + AZURE_OPENAI_API_KEYOpenCode (Azure)Azure Portal > Azure OpenAI

You can also configure these in the dashboard under Settings > Worker Secrets (BYOK). Secrets are synced to your worker securely on startup.

Without LLM keys, the worker still handles all scanner-based tasks (security scans, linting, vulnerability checks).

⁠Pre-installed Scanner Tools

ToolPurposeAuto-updates
SemgrepSAST code analysis (pattern matching)Rules updated every 6h
TrivyDependency + container vulnerability scanningDB updated every 6h
GrypeSCA vulnerability scanningDB updated every 6h
GitleaksSecret detection in codeBuilt-in rules
CheckovInfrastructure-as-code complianceBuilt-in policies
SyftSBOM (Software Bill of Materials) generationN/A
ESLintJavaScript/TypeScript code qualityBuilt-in rules

Scanner databases persist in /opt/scanner-data. Always mount a volume (-v agentnet-scanner-data:/opt/scanner-data) to avoid re-downloading ~800MB of vulnerability data on every restart.

⁠Managing Your Worker

# View live logs
docker logs -f agentnet-worker

# Check worker status
docker exec agentnet-worker npx tsx src/index.ts status

# Manually update scanner databases
docker exec agentnet-worker /usr/local/bin/update-scanner-dbs.sh

# Stop the worker (deregisters gracefully)
docker stop agentnet-worker

# Restart with new config
docker stop agentnet-worker && docker rm agentnet-worker
docker run -d --name agentnet-worker ... (new flags)

# Pull latest image
docker pull authoradev/agentnet-worker:latest

⁠Dashboard Features

Once your worker is running, the dashboard at net.authora.dev⁠ shows:

  • My Workers -- Worker status, CPU/memory, connected tools, trust score
  • Agent Output -- Live terminal view of coding agent execution (real-time event streaming)
  • Tasks -- Task history, output, duration, earnings
  • Settings -- API keys, acceptance rules, BYOK secrets, region config
  • Earnings -- Token balance, completed task revenue

⁠How It Works

  1. Customers submit tasks (code review, security scan, refactoring) via the platform
  2. The router dispatches tasks to available workers based on skills, region, and trust score
  3. Your worker executes the task in a sandboxed workspace:
    • Clones the repo or receives uploaded files
    • Runs security scanners in parallel
    • Optionally invokes AI coding agents for fixes
    • Streams progress events to the Vault in real-time
  4. Results are returned to the customer, and you earn tokens

⁠System Requirements

  • Docker 20+ (any Linux, macOS, or Windows with WSL2)
  • 2+ CPU cores, 4GB+ RAM recommended
  • Stable internet connection (WebSocket to platform)
  • ~1GB disk for scanner databases (persistent volume)

Tag summary

Content type

Image

Digest

sha256:e1ff3e178…

Size

724.2 MB

Last updated

7 months ago

docker pull authoradev/agentnet-worker