Catalog PyPI
PACKAGE EXPLORERView in registry

acaiagent

PyPI

ACAIAgent — a model-agnostic layer for the Claude Agent SDK. Switch models mid-session without losing context. Bring your own models.

agent-sdkanthropicclaudeclaude-codedeepseekglmllmminimaxmulti-modelqwenrouter
Versions collected1
Direct dependencies4From release 0.3.0
Last observed20 Oct, 17:51 UTC

README

Version 0.3.0 documentation

ACAIAgent

CI PyPI Python License

A model-agnostic layer for the Claude Agent SDK. Switch models mid-session without losing context. Bring your own models.

ACAIAgent = Any-CLI AI Agent

Status (v0.1): mid-session model switching verified end-to-end on Zhipu GLM (BigModel) — a fact planted on glm-4.5-air is recalled correctly after switching to glm-5.2 and back, in one session. MiniMax-M3 direct also verified on claude-agent-sdk 0.2.110 (no proxy, no OAuth gate). Other Anthropic-format endpoints should work direct; OpenAI/Gemini/local go through a LiteLLM proxy for format translation — see docs/providers.md.


The problem

The Claude Agent SDK (and Claude Code) is brilliant — but it's welded to one endpoint and a fixed set of model aliases per session. Want to answer a quick question on a cheap model, then switch to a long-context model to read your whole project, then back? You either restart and lose the conversation, or run a resident proxy.

If you're on GLM / Qwen / DeepSeek / MiniMax / a local model — i.e. not the Anthropic-default world — this hurts more, because no single model is always the right one.

The fix

ACAIAgent is a thin wrapper around claude_agent_sdk.query() that puts the model router in your hands:

  • 🔄 Switch models mid-conversation, zero context loss — /model <key> keeps your full history.
  • 🧩 Bring your own models — any Anthropic-compatible endpoint works out of the box (Claude, GLM, MiniMax, DeepSeek, Qwen…). Non-compatible formats via a LiteLLM proxy.
  • ⚙️ Add a model = one line of config, zero code, zero restart.
  • 🧠 Model-agnostic cross-session memory (~/.acaiagent/memory/) — not tied to Claude Code.
  • 📝 Inherits your project's CLAUDE.md and Claude Code skills automatically.

Quickstart

git clone https://github.com/arronfly/ACAIAgent.git
cd ACAIAgent
python3 -m venv .venv && source .venv/bin/activate
pip install -e .

acaiagent init        # interactive: pick providers, write config
acaiagent doctor      # verify claude CLI + keys + endpoints
acaiagent             # start the REPL

Note: the claude-agent-sdk package bundles its own claude binary, so you usually don't need to install anything else. acaiagent doctor verifies it's found.

Then in the REPL:

you: help me refactor this function
acaiagent: ...                       # uses your default model
you: /model glm-strong               # switch to a stronger model — history stays
you: now write the tests for it      # continues with full context, on glm-strong

Configure models

Copy the template and edit:

cp config/models.yaml.example config/models.yaml
models:
  glm-strong:
    base_url: https://open.bigmodel.cn/api/anthropic
    model: glm-5.2
    auth_env: GLM_AUTH_TOKEN        # key read from env / .env, never committed
  minimax:
    base_url: https://api.minimax.io/anthropic
    model: MiniMax-M3
    auth_env: MINIMAX_AUTH_TOKEN
default: glm-strong

Add a model = add one entry. That's it. See config/models.yaml.example for the full provider list and docs/providers.md for the LiteLLM-proxy path (OpenAI / Gemini / local models).

Roadmap (v1 is GitHub-first)

  • Mid-session model switching, no context loss
  • Bring-your-own-models config
  • init wizard + doctor self-check
  • Model-agnostic memory
  • PyPI release + CI matrix (once there are real users)
  • Optional LLM-based auto-routing (today: manual /model + keyword rules)
  • Sub-agent multi-model orchestration
  • Cost / token dashboard

Why this exists

Built by someone who runs Claude Code on GLM-5.2 because the Anthropic API isn't easy to reach from where I sit. If you're on GLM / Qwen / DeepSeek / MiniMax / a local model, ACAIAgent is for you — dogfooded from exactly that seat.

License

MIT — see LICENSE. The Claude Agent SDK is © Anthropic and governed by its own terms; ACAIAgent is an independent wrapper and is not affiliated with Anthropic.

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
0.3.06 Jul 20264

Package advisories

0
No matching advisories collected

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

Repository

PENDING
arronfly/acaiagent

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:51 UTC

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

Record identity

package:c9d2561e33b5e5cf8129ef8200c5335d8c81db6c26614759ea3d7210a456f3ce