Skip to main content

TOXP CLI - Team Of eXPerts parallel reasoning with multiple LLM agents and AWS Bedrock

Project description

TOXP - Team Of eXPerts

Parallel reasoning CLI and Python library using multiple LLM agents. TOXP spawns N independent reasoning agents to tackle complex queries, then synthesizes their outputs through a coordinator agent into a coherent, high-confidence answer.

Features

  • Parallel Reasoning: Spawn 2-32 independent reasoning agents
  • Intelligent Synthesis: Coordinator analyzes agreements, contradictions, synthesizes best answer
  • Confidence Levels: Low/Medium/High confidence ratings
  • Streaming Output: Real-time coordinator synthesis
  • Session Logging: Markdown logs with token counts and cost estimates
  • Python API: Use run_query() directly from your own code
  • 1M Context: Optional 1M token context window for supported models (Opus 4.6)

Prerequisites

  • Python 3.10+
  • AWS credentials with Bedrock access:
    aws configure --profile your-profile
    
  • Claude model access in AWS Bedrock console

Installation

# Using uvx (no install needed)
uvx toxp "Your question"

# Or install permanently
uv tool install toxp    # recommended
pipx install toxp       # alternative
pip install toxp        # in current env

Upgrading

uv tool upgrade toxp    # if installed with uv
pipx upgrade toxp       # if installed with pipx
pip install -U toxp     # if installed with pip

Setup

toxp config set aws-profile your-profile
toxp config show

Quick Start

toxp "Solve: x^2 + 5x + 6 = 0"
echo "Explain recursion" | toxp
toxp -v "Analyze quicksort"        # verbose
toxp --quiet "What is 2 + 2?"      # only answer
toxp --output answer.txt "Question"
toxp --context-1m "Summarize this very long document..."
toxp --html "Compare PostgreSQL vs MongoDB for time-series data"
toxp --html --html-style "minimal academic paper" "Explain CRDTs"

Python API

from toxp import run_query, QueryResult, validate_credentials

# Simple usage
result = await run_query("What is 2+2?")
print(result.final_answer, result.confidence)

# With overrides and callbacks
result = await run_query(
    "Explain recursion",
    config_overrides={"num_agents": 8, "temperature": 0.7},
    callbacks=MyCallbacks(),
    cancel_token=my_cancel_event,
)

# Check credentials before running
validate_credentials()

Configuration

Stored at ~/.toxp/config.json:

toxp config show                    # view all
toxp config get model               # get value
toxp config set num-agents 24       # set value
toxp config reset                   # reset defaults
Key Default Description
aws-profile default AWS profile
region us-east-1 AWS region
num-agents 15 Parallel agents (2-32)
temperature 0.9 Agent temperature
coordinator-temperature 0.7 Coordinator temperature
model claude-opus-4-7 Model ID (supports Sonnet 4.5, Opus 4.6, Opus 4.7)
max-tokens 8192 Max tokens per response
max-concurrency auto Max concurrent API requests
context-1m false Enable 1M token context window beta
log-enabled true Enable session logging
log-retention-days 30 Days to keep logs

Environment variables: TOXP_AWS_PROFILE, TOXP_REGION, TOXP_NUM_AGENTS

CLI Reference

toxp [OPTIONS] [QUERY]

Options:
  -q, --query TEXT         Query string
  -n, --num-agents INT     Agents (2-32)
  -t, --temperature FLOAT
  -c, --max-concurrency N  Max concurrent API requests
  --aws-profile TEXT
  --region TEXT
  --context-1m             Enable 1M token context window beta
  --html                   Generate a rich self-contained HTML artifact and open it
  --html-style TEXT        Style hint for the HTML artifact (e.g. "dashboard")
  -o, --output FILE
  -v, --verbose
  --quiet
  --help

HTML artifacts

--html swaps the terminal markdown output for a rich, self-contained HTML file that opens in your browser. The HTML is authored by a single additional LLM call (so it costs ~one extra request and a few extra seconds) and is asked to use SVG diagrams, tables, color-coded sections, and a prominent "Final Answer" hero block.

  • Where it lands: ~/.toxp/html/<timestamp>-<query-slug>.html by default. Pass -o path/to/file.html to override.
  • Self-contained: all CSS and JS are inlined, no external requests — shareable by just sending the file.
  • Retention: old HTML files are aged out using the same log-retention-days config as session logs.
  • --html-style TEXT: optional free-form hint (e.g. "dashboard", "academic paper", "playful") appended to the HTML-author prompt.
  • Fallback: if the HTML pass fails for any reason, toxp falls back to printing the markdown answer so you never lose your result.

How It Works

  1. Query sent to N reasoning agents (T=0.9)
  2. At least 50% must succeed
  3. Coordinator synthesizes responses
  4. Final answer with confidence level

Troubleshooting

# Credentials expired
aws sso login --profile your-profile

# Rate limiting
toxp config set num-agents 8

# Debug
toxp -v "Your question"

Development

pip install -e ".[dev]"
pytest -v

License

MIT

Project details


Download files

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

Source Distribution

toxp-0.8.1.tar.gz (89.1 kB view details)

Uploaded Source

Built Distribution

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

toxp-0.8.1-py3-none-any.whl (60.4 kB view details)

Uploaded Python 3

File details

Details for the file toxp-0.8.1.tar.gz.

File metadata

  • Download URL: toxp-0.8.1.tar.gz
  • Upload date:
  • Size: 89.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toxp-0.8.1.tar.gz
Algorithm Hash digest
SHA256 096fa6c5ed3fe95b3ffb26006a487887f37e8ec98c7a44fa61964ed4b3d3789a
MD5 cd070ece3c3c24a754ecf54b56f65da1
BLAKE2b-256 2c34b99a4fe65ca2871d07222bcf1aff49a3566691162204d7a3fbd2e8016102

See more details on using hashes here.

Provenance

The following attestation bundles were made for toxp-0.8.1.tar.gz:

Publisher: release.yml on raghuvaran/team-of-experts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file toxp-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: toxp-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 60.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for toxp-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f07ba1fa6536f68293ac4d48a7fa3ef8c117cf0e177e190c47252201d352263
MD5 d707f169758e2b1510619bd29b7c4cb6
BLAKE2b-256 546be43d320a65802f761f9f3cec97b858855852a8ac272cedb69aec862425fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for toxp-0.8.1-py3-none-any.whl:

Publisher: release.yml on raghuvaran/team-of-experts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page