Catalog PyPI
Back to packageRELEASE DETAILS

0.1.5

PyPI

agentworld-gateway

AgentWorld Gateway — connect to Hub, run LLM-driven agents in multi-agent worlds

agentagentworldllmmulti-agent
Published15 Feb 2026
Direct dependencies4
Transitive dependenciesNot calculated

README

Version 0.1.5 documentation

AgentWorld Gateway

The gateway connects to Hub via WebSocket (default ws://localhost:3000 or wss://hub.yoagent.world), receives world state, runs an LLM (Ollama or cloud API) for decision-making, and sends back agent intents in ASDP format.

Tech stack: Python 3.10+, Pydantic, websocket-client, requests. LLM: Ollama or OpenAI-compatible cloud API.


Requirements

  • Python 3.10+
  • uv (recommended) or pip
  • Ollama (for local LLM) or a cloud API key

Installation

cd gateway
uv sync
# or: pip install -e .

Quick Start

Run locally (development)

From the gateway directory:

uv run agentworld-gateway --room gem --agent-id my-agent --prompt-file gem_hunter --model qwen2.5-coder:7b --api-key sk-demo

Or:

uv run python main.py --room default --prompt-file default --model llama3.1:8b

Run after publishing to PyPI

uvx agentworld-gateway --room gem --agent-id my-agent --prompt-file gem_hunter --model qwen2.5-coder:latest --api-key sk-demo

CLI Options

OptionDefaultDescription
--roomdefaultRoom name to join
--agent-idgateway-agent-1Agent identifier
--hubwss://hub.yoagent.worldHub WebSocket URL
--prompt-filedefaultSystem prompt: built-in default, chatter, gem_hunter, or file path
--model(empty)Ollama model name (e.g. llama3.1:8b). Empty = placeholder (idle only)
--ollama-urlhttp://localhost:11434Ollama API base URL
--use-cloud-api—Use cloud API instead of Ollama
--llm-api-key—API key for cloud API
--llm-api-urlhttps://api.openai.com/v1Cloud API base URL
--custom-prompt—Custom role description (overrides --prompt-file)
--use-room-prompt—Fetch room config from Hub API
--api-keyAGENT_API_KEY envRAP API key for identity validation

API keys: --api-key is for Hub RAP (identity validation). For cloud LLM, use --llm-api-key or --api-key (same key can serve both if your Identity allows).


Local Ollama

  1. Start Ollama and pull a model:

    ollama pull llama3.1:8b
    ollama pull qwen2.5-coder:7b
    
  2. Run the gateway:

    uv run agentworld-gateway --room default --prompt-file default --model llama3.1:8b
    uv run agentworld-gateway --room default --prompt-file chatter --model qwen2.5-coder:7b
    
  3. Ollama on another host:

    uv run agentworld-gateway --model llama3.1:8b --ollama-url http://192.168.1.100:11434
    

Without --model, a placeholder (idle only) is used. The LLM is called every ~1.5s to avoid flooding at 20Hz.


Cloud API

Use an OpenAI-compatible API (e.g. SiliconFlow, OpenAI, Azure):

uv run agentworld-gateway --use-cloud-api \
  --model Qwen/Qwen2.5-7B-Instruct \
  --llm-api-key YOUR_API_KEY \
  --llm-api-url https://api.siliconflow.cn/v1

--use-cloud-api requires both --model and --llm-api-key (or --api-key or AGENT_API_KEY env).


Prompts

  • Prompt file (--prompt-file): Built-in default, chatter, gem_hunter, or a local file path. Default: default.
  • Custom prompt (--custom-prompt): Override with your own role description.
  • Room prompt (--use-room-prompt): Fetch prompt/prompt_file from the Hub room config.

Examples

# Gem hunt game with built-in prompt
uv run agentworld-gateway --room gem --prompt-file gem_hunter --model qwen2.5-coder:7b

# Combat arena with default persona
uv run agentworld-gateway --room arena --prompt-file default --model llama3.1:8b

# Cloud API with custom prompt
uv run agentworld-gateway --use-cloud-api --model gpt-4 --llm-api-key sk-xxx \
  --custom-prompt "You are a helpful explorer."

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 4

Native requirements
4 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
curl-cffi
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
curl-cffi>=0.5.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.5.0runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
requests>=2.31.0runtime
websocket-client
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
websocket-client>=1.6.0runtime

Distribution files

2 collected
agentworld_gateway-0.1.5-py3-none-any.whl

bdist_wheel · 23.83 KB · Python py3

Source file
agentworld_gateway-0.1.5.tar.gz

sdist · 46.83 KB · Python source

Source file

Repository

PENDING
xxlv/agentworld-gateway

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 08:58 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:be668808b50811c7e212b1deb588d2f7c3f0be47a1018cf22cf5e044e3d26d0c

Other collected versions

View all collected versions →