Environment:AIScientists Dev WorldSeed Autoresearch Agent Runtime
Appearance
| Knowledge Sources | |
|---|---|
| Domains | LLM, Agent_Systems |
| Last Updated | 2026-10-26 19:00 GMT |
Overview
Python 3.11+ environment with Anthropic SDK, websockets, and httpx for the custom autoresearch agent runtime that drives Claude-powered research agents via the WorldSeed WebSocket gateway.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux / macOS / WSL2 | Same as core engine |
| Python | >= 3.11 | Inherits core engine requirement |
| Hardware | CPU only | Agent logic is LLM API calls, no local inference |
| Network | WebSocket to engine + Anthropic API | Requires both simultaneously |
Dependencies
System Packages
- Inherits all from Environment:AIScientists_Dev_WorldSeed_Python_3_11_Engine
Python Packages
- `anthropic` >= 0.86.0 (already in core dependencies)
- `websockets` (for WebSocket gateway connection)
- `httpx` >= 0.28, < 1 (already in core dependencies)
- `structlog` >= 25.1, < 26 (already in core dependencies)
Credentials
The following environment variables must be set:
- `ANTHROPIC_API_KEY`: Anthropic API key — required (checked at startup)
- `WORLDSEED_WS_URL`: WebSocket gateway URL (default: `ws://localhost:8000/ws`)
- `WORLDSEED_HTTP_URL`: HTTP server URL (default: `http://localhost:8000`)
- `WORLDSEED_GATEWAY_TOKEN`: Gateway auth token (default: `worldseed-gw-token`)
- `AUTORESEARCH_MODEL`: Claude model ID (default: `claude-sonnet-4-5-20250929`)
- `AUTORESEARCH_MAX_TOOL_CALLS_PER_WAKE`: Max tool calls per agent wake (default: 15)
Quick Install
# Install core engine (includes anthropic + httpx)
pip install -e .
# Install websockets if not already present
pip install websockets
# Set required credentials
export ANTHROPIC_API_KEY="sk-ant-..."
export WORLDSEED_WS_URL="ws://localhost:8000/ws"
export WORLDSEED_GATEWAY_TOKEN="worldseed-gw-token"
# Run the agent runtime
python -m worldseed.autoresearch.agent
Code Evidence
Environment configuration from `src/worldseed/autoresearch/agent.py:48-52`:
WS_URL = os.environ.get("WORLDSEED_WS_URL", "ws://localhost:8000/ws")
HTTP_URL = os.environ.get("WORLDSEED_HTTP_URL", "http://localhost:8000")
GATEWAY_TOKEN = os.environ.get("WORLDSEED_GATEWAY_TOKEN", "worldseed-gw-token")
MODEL = os.environ.get("AUTORESEARCH_MODEL", "claude-sonnet-4-5-20250929")
MAX_TOOL_CALLS = int(os.environ.get("AUTORESEARCH_MAX_TOOL_CALLS_PER_WAKE", "15"))
API key check from `src/worldseed/autoresearch/agent.py:487`:
if os.environ.get("ANTHROPIC_API_KEY") is None:
Agent docstring from `src/worldseed/autoresearch/agent.py:19-26`:
"""
Environment:
WORLDSEED_WS_URL (default: ws://localhost:8000/ws)
WORLDSEED_HTTP_URL (default: http://localhost:8000)
WORLDSEED_GATEWAY_TOKEN (default: worldseed-gw-token)
ANTHROPIC_API_KEY (required)
AUTORESEARCH_MODEL (default: claude-opus-4-5)
AUTORESEARCH_MAX_TOOL_CALLS_PER_WAKE (default: 15)
"""
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `ANTHROPIC_API_KEY not set` | Missing API key | `export ANTHROPIC_API_KEY="sk-ant-..."` |
| `websockets.exceptions.ConnectionClosed` | Engine server not running | Start engine with `worldseed play` first |
| `anthropic.AuthenticationError` | Invalid or expired API key | Regenerate key at console.anthropic.com |
| `ConnectionRefusedError` | Wrong `WORLDSEED_WS_URL` or port | Verify engine is running and URL is correct |
Compatibility Notes
- Claude models only: The agent runtime uses the Anthropic SDK directly, not LiteLLM. Only Claude models are supported.
- Default model: `claude-sonnet-4-5-20250929`. Override with `AUTORESEARCH_MODEL` env var.
- Tool set is minimal: Only `worldseed_perceive` and `worldseed_act`. No Bash, Edit, Write, or Read tools — agents submit code as string payloads.
- Max 15 tool calls per wake: Override with `AUTORESEARCH_MAX_TOOL_CALLS_PER_WAKE`. Higher values increase cost and latency.
- Single process: One process connects to the gateway and drives all preset agents. Not horizontally scalable.
Related Pages
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment