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.

Docs

Documentation Explanation
Tutorial API
Config MCP
Lane Engineering Orchestration
Multimodal Cloud
Integrations Ablations H1–H7
Roadmap Source / Issues

PyPI: iqueue · Repo: ehallford11714/iQueue

Session SDK (v0.3)

import iqueue

with iqueue.Session() as s:
    s.configure(skip_hf_download=True)
    s.admit("Plan fever differential", system_id="uc_diagnosis")
    s.service(ticks=1)
    s.pack_contexts()
    s.export_audit("outputs/audit")  # JSON + Markdown

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
python -m src.experiments.run_h1_h7    # full H1–H7 ablation battery (or: iqueue-ablation)
python -m src.v03_demo                 # Session + kernel admit + audit + integrations smoke

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.3.0.tar.gz (218.3 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.3.0-py3-none-any.whl (278.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for iqueue-0.3.0.tar.gz
Algorithm Hash digest
SHA256 78f99fd1d3a11fc5171e45df63975536da0be6a3743cc10336a1ab271da2fa0f
MD5 e8fa7cfb61825f8f364945485a3acfc0
BLAKE2b-256 66696ad906f25a920dddc24c4cc970510a927b2366ca07a731c6c4aab88cf479

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iqueue-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 278.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25e77a0865123007944deb2e5a5c3904258a42a8f0b0f092b62179453d67eb03
MD5 350a77fe0940d33c2fb33b402e9d6620
BLAKE2b-256 e22a0bd35938fc368939079fdc04fd2eb13b32022283fb9971c8ea4186281758

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

This release

0.3.0 This release

2 files

0.2.1

2 files

0.2.0

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