autogen-pathcourse
AutoGen / AG2 integration for PathCourse Health. Run multi-agent conversations with autonomous USDC billing on Base L2 — no accounts, no credit cards, no KYC.
Install
# AutoGen (legacy package name)
pip install autogen-pathcourse pyautogen
# AG2 (the new fork)
pip install autogen-pathcourse ag2
Quick Start
from autogen import AssistantAgent, UserProxyAgent
from autogen_pathcourse import pch_config
config_list = pch_config(model="pch-pro")
llm_config = {"config_list": config_list, "temperature": 0.7}
assistant = AssistantAgent(
name="assistant",
llm_config=llm_config,
system_message="You are a helpful AI assistant.",
)
user_proxy = UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
max_consecutive_auto_reply=3,
code_execution_config=False,
)
user_proxy.initiate_chat(assistant, message="Explain x402 in two sentences.")
Mixed-model multi-agent setup
Use different PCH models for different agents in the same conversation:
from autogen import AssistantAgent
from autogen_pathcourse import pch_config
planner = AssistantAgent(
name="planner",
llm_config={"config_list": pch_config(model="pch-pro")},
system_message="You plan multi-step research.",
)
coder = AssistantAgent(
name="coder",
llm_config={"config_list": pch_config(model="pch-coder")},
system_message="You implement what the planner specifies.",
)
reviewer = AssistantAgent(
name="reviewer",
llm_config={"config_list": pch_config(model="pch-fast")},
system_message="You spot-check work for issues.",
)
Models
| Model | Rate | Min tier | Notes |
|---|---|---|---|
pch-fast |
$0.44 / M tokens | uncertified | Fast reasoning, classification, routing |
pch-coder |
$3.50 / M tokens | uncertified | Code generation, debugging |
pch-embed |
$0.015 / M tokens | uncertified | Text embeddings for semantic search / RAG |
pch-translate |
$0.08 / M chars | uncertified | Multilingual translation |
pch-pro |
$1.96 / M tokens | bronze | Deep reasoning, multi-step planning |
pch-audio |
$1.85 / M chars | bronze | Text-to-speech, standard quality |
pch-documents |
$0.26 in / $1.48 out per M tokens | bronze | Document parsing / OCR |
pch-transcribe |
$0.0008 / minute | bronze | Speech-to-text |
pch-extract |
$0.012 / M tokens | bronze | Structured data extraction |
pch-rerank |
$0.025 / M tokens | bronze | Reranking for RAG pipelines |
pch-image |
$0.028 / image | silver | Text-to-image |
pch-audio-premium |
$37.00 / M chars | silver | Text-to-speech, premium quality |
pch-talk |
$0.001 / minute | silver | Voice conversation |
claude-haiku |
Common rate | silver | Anthropic Claude Haiku |
claude-sonnet |
Common rate | gold | Anthropic Claude Sonnet |
pch_config only operates on chat-completion shapes — for image/audio/transcription, use the PCH Python SDK directly.
Choosing a chat model:
- Fast response, simple task →
pch-fast - Complex reasoning, multi-step →
pch-pro - Writing or reviewing code →
pch-coder - Long context or premium reasoning →
claude-sonnet(Gold tier)
Authentication
Set PCH_API_KEY in your environment, or pass pch_api_key= to pch_config.
export PCH_API_KEY=pch_prod_b_...
Developer access — $5 USDC. Send $5+ USDC on Base (chain ID 8453) to the PCH treasury wallet, then call pathcourse.claim_key(tx_hash, wallet) to retrieve your key. No accounts, no credit card, no KYC. $5 buys thousands of pch-fast calls — enough to verify any AutoGen group chat. Top up to $25 lifetime and your account auto-upgrades to Uncertified with pch-coder access. Treasury address: see payment.treasury_wallet in /.well-known/agent.json.
How it works
AutoGen's config_list accepts any OpenAI-compatible endpoint via the base_url and
api_type: "openai" fields. The PCH gateway is fully OpenAI API-compatible, so this adapter
is purely configuration — every AutoGen feature (group chat, code execution, function
calling, custom agents) works unchanged.
Links
- Platform: pathcoursehealth.com
- AutoGen: microsoft.github.io/autogen
- AG2: ag2.ai
- Python SDK: pypi.org/project/pathcourse-sdk
- Integration examples: github.com/pathcourse-health/pch-integration-examples
License
MIT
Release files for autogen-pathcourse 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autogen_pathcourse-0.1.2.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autogen_pathcourse-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / autogen_pathcourse-0.1.2.tar.gz
| Download URL | autogen_pathcourse-0.1.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92335ae931ca35ce69cb01bc764d315081613eb9a11280c4b4fcfd4c21aea1fb
|
|
BLAKE2b-256 checksum How to use checksums |
aefd84742c3c095a61808a9ffa61a1b71a7d2189c7bb5cbe6ea5db019a496719
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Release files / autogen_pathcourse-0.1.2-py3-none-any.whl
| Download URL | autogen_pathcourse-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6680268038e07c67c0b459c5b768071383fb63762bf5b4e3fc88214b4fd8c5ab
|
|
BLAKE2b-256 checksum How to use checksums |
868b4420bba0c2c9d8982b0799e3f5a49336e2dd887cde9d59c652be3697d425
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|