Catalog PyPI
PACKAGE EXPLORERView in registry

agentk8

PyPI

Multi-LLM Council Backend for AGENT-K - Three-stage consensus with GPT, Gemini, and Claude

agentsaiclaudeclaude-codecliconsensuscouncildeveloper-toolsgeminigptlitellmllmmachine-learningmlmulti-agentterminal
Versions collected1
Direct dependencies6From release 2.3.8
Last observed20 Oct, 22:30 UTC

README

Version 2.3.8 documentation

AGENT-K Python Backend

Multi-LLM Council Backend for AGENT-K

╭──────────────────────────────────────────────── AGENT-K v2.3.7 ────────────────────────────────────────────────╮
│                            Multi-LLM Council - GPT + Gemini + Claude                                           │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

The Python backend provides multi-LLM consensus and Smart Context Selection for AGENT-K.

Features

  • Council Mode - Three-stage consensus with GPT-4, Gemini, and Claude
  • Smart Context Selection - RLM-inspired file selection using LLM reasoning
  • Scout Agent - Intelligent codebase research with query-aware file selection
  • LiteLLM Integration - Unified API for multiple LLM providers

Installation

pip install agentk8

Requirements

  • Python 3.10+
  • API Keys (set as environment variables):
    • OPENAI_API_KEY - For GPT-4
    • GEMINI_API_KEY - For Gemini
    • ANTHROPIC_API_KEY - For Claude

Quick Start

Scout Agent (Smart Context Selection)

from agentk.scout import Scout
import asyncio

async def main():
    scout = Scout(project_root="/path/to/project")

    # Query-aware file selection
    context = await scout.scan_project("Where is authentication handled?")
    print(context["files"])  # Returns only relevant files

    # Full investigation with web search
    report = await scout.investigate("Latest JWT best practices")
    print(report.to_context_string())

asyncio.run(main())

Council Mode (Multi-LLM Consensus)

from agentk.council import Council
import asyncio

async def main():
    council = Council()

    # Three-stage consensus
    result = await council.deliberate(
        "Design a rate limiting system for our API",
        mode="council"  # or "solo" for multi-Claude personas
    )
    print(result["final_synthesis"])

asyncio.run(main())

Council Architecture

                    ┌─────────────────────────────────────┐
                    │           Stage 1: Analysis          │
                    │  GPT-4 | Gemini | Claude (parallel)  │
                    └─────────────────┬───────────────────┘
                                      │
                    ┌─────────────────▼───────────────────┐
                    │         Stage 2: Cross-Review        │
                    │   Each model reviews others' work    │
                    └─────────────────┬───────────────────┘
                                      │
                    ┌─────────────────▼───────────────────┐
                    │       Stage 3: Chairman Synthesis    │
                    │     Claude synthesizes consensus     │
                    └─────────────────────────────────────┘

Smart Context Selection (RLM-Inspired)

Instead of blindly grabbing files, the Scout asks the LLM to select relevant files:

# Traditional approach (naive):
files = get_top_10_files()  # Often irrelevant

# Smart Context Selection:
scout = Scout(project_root=".")
context = await scout.scan_project("How does the auth middleware work?")
# LLM analyzes file tree + query → selects only auth-related files

This is inspired by the Recursive Language Models paper, which treats the codebase as an environment to navigate intelligently.

CLI Usage

# Run Scout investigation
python -m agentk.scout "Where are the API endpoints defined?"

# Run Council deliberation
python -m agentk.council "Design a caching strategy" --mode council

Module Structure

agentk/
├── __init__.py
├── council.py      # Multi-LLM consensus logic
├── scout.py        # Smart Context Selection
├── llm.py          # LiteLLM wrapper for unified API
└── tools.py        # File tree, directory scanning

Environment Variables

VariableDescription
OPENAI_API_KEYOpenAI API key for GPT-4
GEMINI_API_KEYGoogle API key for Gemini
ANTHROPIC_API_KEYAnthropic API key for Claude

License

MIT License


AGENT-K v2.3.7 - Python Backend

GitHub • PyPI

Downloads & popularity

Awaiting observations

No metric observations yet

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

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
2.3.816 Jan 20266

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
de5truct0/agentk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:30 UTC

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

Record identity

package:d4d103201f35dfa63e5080a3b7060fdeae0e74cb541ee964ba5c82dbc481f6db