Skip to main content

iQueue

iQueue logo

Intent-stabilized multi-queue reasoning for agentic systems.

iQueue is an open-source control plane for agentic AI: bidirectional expandable highway lanes, rotator multi-queues, pivot-anchored embeddings, KNN + VAE ranking, lightweight + large-model steering, and a γ discount for veering off-highway. Scored queues serialize to markdown contexts for future runs.

Multi-model support

Provider Mode Notes
OpenAI frontier API sol / terra / luna → GPT-5.6 (gpt-5.6-sol, …)
Anthropic frontier API opus5 / fable / sonnet5 → Claude 5 family
Google frontier API gemini-3.6-flash
Qwen DashScope / local cloud qwen-plus or HF/Ollama
OpenRouter gateway one key → Sol/Opus/etc.
mock (offline) local auto-downloads HF Qwen, else deterministic text
import iqueue

iqueue.configure(
    openai_api_key="sk-...",
    qwen_api_key="sk-...",
    ollama_base_url="http://127.0.0.1:11434",
)
client = iqueue.get_client("qwen")

See docs/MODELS.md. Copy config/models.example.jsonconfig/models.local.json for local keys.

Quick start

git clone https://github.com/ehallford11714/iQueue.git
cd iQueue
python -m venv .venv
# Windows: .venv\Scripts\activate
pip install -r requirements.txt
set IQUEUE_SKIP_HF_DOWNLOAD=1
python -m src.tutorial_demo        # progressive tutorial demo (or: iqueue-tutorial)
python -m src.demo
python -m src.highway.demo
python -m src.highway.stack_demo   # stacked levels + trainable velocities
python -m src.models.demo          # dedicated multi-provider + LM steering
python -m src.experiments.train_eval   # proper train/eval loop + metrics
python -m src.experiments.run_gamma_ablation

Tutorial: docs/TUTORIAL.md — install, core APIs, config, learn-the-road, and copy-paste use cases (diagnosis, incident, research, planning, policy, stack tiers).

Lane Engineering: docs/LANE_ENGINEERING.md — designing and operating expandable LaneQueues (agents, tasks, fill/drain, kinds, stack, policy).

Orchestration + browser: docs/ORCHESTRATION.md — harness pipeline (iqueue-harness), soft /v1/orchestration + MCP iqueue_orchestrate, and web/ IndexedDB / WebGPU / Wasm demo.

Streamlit demo (variable config + learn the road)

pip install -e ".[ui,local]"   # streamlit + torch/transformers/peft
# optional CUDA 4-bit: pip install -e ".[qlora]"
streamlit run app.py

All knobs (highway.*, train.*, qlora.*, policy.*, stack.*, models.*, trace.*) are editable in the sidebar or via JSON (config/iqueue.example.json).

# CLI trace with variables
set IQUEUE_SKIP_HF_DOWNLOAD=1
python -m src.trace_runner --config config/iqueue.example.json
# light QLoRA + SFT while learning the road:
python -m src.trace_runner --config config/iqueue.example.json --qlora

HTTP API suite (FastAPI)

pip install -e ".[api]"
set IQUEUE_SKIP_HF_DOWNLOAD=1
python -m src.api --port 8765
# docs: http://127.0.0.1:8765/docs

Route groups: /health, /config, /hardware, /highway, /stack, /policy, /rotator, /ranking, /pivotgraph, /models, /train, /trace, /cases, /integrations.

MCP server (Cursor / agent hosts)

pip install -e ".[mcp]"
set IQUEUE_SKIP_HF_DOWNLOAD=1
python -m src.mcp_server          # or: iqueue-mcp

Register in Cursor MCP config (cwd = this repo):

{
  "mcpServers": {
    "iqueue": {
      "command": "python",
      "args": ["-m", "src.mcp_server"],
      "cwd": "<path-to-iQueue>",
      "env": { "IQUEUE_SKIP_HF_DOWNLOAD": "1" }
    }
  }
}

Full tool/resource list: docs/MCP.md. Project agent skills live under .cursor/skills/ (iqueue-native, iqueue-lane-engineering, iqueue-integrations).

External agent frameworks (LangGraph / CrewAI / SmolAgents / DSPy)

pip install -e ".[integrations]"   # optional; demos work without it via mock/sim
set IQUEUE_SKIP_HF_DOWNLOAD=1
python -m src.integrations.demo --framework mock
python -m src.integrations.demo --framework langgraph --use-case uc_incident

Lanes can attach a framework runner (attach_framework / run_on_lane). See docs/INTEGRATIONS.md.

Demo test cases (CLI / Streamlit / API)

set IQUEUE_SKIP_HF_DOWNLOAD=1
python -m src.cases_cli --list
python -m src.cases_cli

See docs/CONFIG.md and docs/API.md.

Core ideas

Piece Role
Pivots Invariant latent anchors per system / use-case
Lane Engineering Design/operate LaneQueues: kinds, agents, tasks, expand, policy
Expandable lanes Own requests, spawn/assign agents, track tasks, expand under pressure
Stacked highways Multiple levels with different velocities; router + velocities are trainable
Highway Bidirectional FORWARD / REVERSE with lane control & changes
Rotator KNN + VAE specificity selection
LM steering Frontier/local models judge adherence → fit steering vector
γ veer penalty tuple_score = base × γ^{veer_steps} × lane_bonus
Context packs Markdown queue serialization for future context

Docs & schema

License

Apache-2.0 — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iqueue-0.2.0.tar.gz (200.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iqueue-0.2.0-py3-none-any.whl (260.4 kB view details)

Uploaded Python 3

File details

Details for the file iqueue-0.2.0.tar.gz.

File metadata

  • Download URL: iqueue-0.2.0.tar.gz
  • Upload date:
  • Size: 200.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.3

File hashes

Hashes for iqueue-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f732924d4376a29ff82567e6299349c6094facac70b0893b8c03d47a9ca8c807
MD5 486823cb0b90c43bc224c435e5cd3081
BLAKE2b-256 f9896146287649c5a95a0fb4e301044d709dc7117e708d283f0e27e455857191

See more details on using hashes here.

File details

Details for the file iqueue-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: iqueue-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 260.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.3

File hashes

Hashes for iqueue-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00325b29d95775672f951c4b305dc5d4cc82588de82a4c3d533b8c75f63d4279
MD5 62a7d23005bd81700ba8b30831d901f0
BLAKE2b-256 09c6128bda42fd02e01e907f9ca0363abf034d1af52c4a84af21cb8dead98c3f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page