Skip to main content

Multi-LLM roundtable for diverse perspective gathering

Project description

taskforce

AI agent-oriented multi-LLM roundtable library.

Multiple top-tier LLMs (GPT, Grok, Claude, Gemini) are queried in parallel with the same agenda, and the collected opinions are classified into common / divergent / unique perspectives, returned as a structured IdeaPool.

This package is designed for AI agents, not for direct human use. The primary interface is the MCP wrapper (roundtable_discuss tool), which allows agents to invoke a roundtable discussion as a tool call. A Python API is also available for programmatic integration.

Quick Start

1. Install

pip install ff-taskforce

For MCP server support:

pip install ff-taskforce[mcp]

2. Set environment variables

At least two provider API keys are required (one will be excluded as the caller). XAI_API_KEY is always required (used by the summarizer).

OPENAI_API_KEY=sk-...
XAI_API_KEY=xai-...
ANTHROPIC_API_KEY=sk-ant-...
GEMINI_API_KEY=AI...

3. Use as MCP tool (recommended for agents)

Add to your MCP server config:

TASKFORCE_CALLER_PROVIDER is the provider of the agent that will call this tool. The matching provider's model is excluded from the panel -- querying the same model that is already reasoning adds no diversity. For example, if Claude Code is the caller, set it to "anthropic" so Claude is excluded from the panel.

{
  "mcpServers": {
    "taskforce": {
      "command": "python",
      "args": ["-m", "taskforce.mcp_wrapper"],
      "env": {
        "TASKFORCE_CALLER_PROVIDER": "anthropic"
      }
    }
  }
}

The agent can then call the roundtable_discuss tool with agenda and context parameters.

4. Use as Python library

from taskforce import Taskforce

tf = Taskforce(caller_provider="anthropic")
pool = tf.discuss(
    agenda="Evaluate the trade-offs of approach A vs B",
    context="<detailed context here>"
)

# pool.common    -- list[str]: points most models agree on
# pool.divergent -- list[DivergentPoint]: topics with differing positions
# pool.unique    -- list[UniquePoint]: points raised by only one model

Important Notes

  • Paid API calls. Every discuss() invocation calls multiple LLM APIs in parallel. Agents should confirm with the user before calling.
  • caller_provider exclusion. The model from the same provider as the calling agent is excluded from the panel to maximize perspective diversity.
  • XAI_API_KEY is mandatory. The summarizer (grok-4-1-fast-non-reasoning) always uses the XAI key.
  • Rich context matters. Input tokens are cheap. Provide as much context as possible -- specifications, constraints, background, decisions already made -- so the panel can give concrete, actionable opinions instead of generic advice.

API

Taskforce(caller_provider, dotenv_path=None)

  • caller_provider (str): The LLM provider of the calling agent (e.g. "anthropic", "openai"). That provider's model is excluded from the panel.
  • dotenv_path (str | None): Path to .env file. Defaults to auto-discovery.

Taskforce.discuss(agenda, context="") -> IdeaPool

Synchronous wrapper. Queries the panel, summarizes, and returns an IdeaPool.

Taskforce.discuss_async(agenda, context="") -> IdeaPool

Async version for use in async contexts.

IdeaPool

Field Type Description
agenda str The original agenda
common list[str] Points most models agree on
divergent list[DivergentPoint] Topics with differing positions (topic, positions: dict[model, position])
unique list[UniquePoint] Points from a single model (point, source_model)
total_cost float Total API cost (USD)
total_tokens int Total tokens consumed

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

ff_taskforce-0.1.1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

ff_taskforce-0.1.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file ff_taskforce-0.1.1.tar.gz.

File metadata

  • Download URL: ff_taskforce-0.1.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for ff_taskforce-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6f8d8d65addb99ad4f13885a59c3098f45c06dcc3093bc8433eebd15ae6163ca
MD5 e69d741aa85b6d5a13971c3988360848
BLAKE2b-256 d8989e04fce1207527e5a4719e7ebe15584231213357cd861b9eafa3258bc5f0

See more details on using hashes here.

File details

Details for the file ff_taskforce-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ff_taskforce-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for ff_taskforce-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee6d9f5d0be606e1d27b67c8c496790a5dc6f0ab9b0a50588015545855fc478d
MD5 8190d3ffd937c6011f391ac1c6e7adce
BLAKE2b-256 b8686bff537e1c9959dd91303d2a950d5dd6af62b6654f2706bbd2f766e88d02

See more details on using hashes here.

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