CLIver README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the CLIver listing page.

CLIver

CLIver

Embeddable agent core with a companion CLI — agent loop, tools, skills, MCP, and media generation in one Python library.


CLIver is an embeddable agent core with a companion CLI, built from two packages:

  • cliver-core — the embeddable engine: an agent loop with tool calling, provider engines for the OpenAI and Anthropic protocols, per-purpose model bindings (chat, image, video, TTS, ASR, embed, rerank), nine built-in tools, Agent Skills, MCP, and opt-in permission and execution-policy axes. No CLI, database, or config files — Python objects in, messages out.
  • cliver — the CLI application built on cliver-core: config-path and skill-discovery conventions plus a cliver command that runs one task per invocation or starts a streaming interactive REPL, with interactive tool approval in both modes. It remains experimental and is published to PyPI as cliver.

cliver-core 0.3 is the first stable series: the public API stays backward compatible, and 0.3.x patch releases contain bug fixes and backward-compatible additions. The cliver CLI is for tinkering: run one-shot tasks or a multi-turn REPL with your own skills and tools, approve mutating calls interactively, and inspect tool events. See Stability & Versioning for the support policy.

Quick Start

Install the core library (Python 3.10–3.13):

Terminal
pip install cliver-core==0.3.2

As a library

server.ts
import asyncio

from cliver_core import AgentCore, ModelBindings, presets


async def main():
    bindings = ModelBindings(llm=presets.deepseek(api_key="..."))
    async with AgentCore.open(bindings) as agent:
        response = await agent.chat("Summarize the agent loop in one sentence.")
        print(response.message.content)


asyncio.run(main())

See the cliver-core README for tools, skills, MCP, media capabilities, and the full API.

From the terminal

Install the cliver CLI from PyPI. With a prompt it runs one task; with no prompt on a terminal it starts a streaming REPL:

Terminal
pip install cliver

export CLIVER_MODEL=deepseek-v4-flash
export CLIVER_PROVIDER=deepseek        # or CLIVER_BASE_URL for any compatible endpoint
export DEEPSEEK_API_KEY=...            # or CLIVER_API_KEY

cliver --yes "Read pyproject.toml and summarize the dependencies."
cliver --yes                           # interactive REPL: /help, /clear, /exit

From a repository checkout, uv run cliver runs the same command after make init.

--yes approves ASK tools without prompting; without it, safe tools still run and each ASK tool asks on the terminal (non-interactive runs deny them). --skill NAME runs a skill explicitly, --cwd DIR selects the project root for skill discovery, and {config_dir}/.env is loaded automatically. In the REPL, each turn streams its answer and keeps the conversation for follow-ups.

With media models in ~/.cliver/config.json (keys image, video, tts, and asr under models), media commands need no chat model:

bash
cliver image "a red panda on a skateboard"   # saves ./image-<timestamp>-0.png
cliver asr ./meeting.mp3 --language zh       # prints the transcript

When those purposes are configured, the agent also gets media tools — GenerateImage, GenerateVideo, TextToSpeech, and TranscribeAudio — so a chat request such as "make a logo for this project" can produce media without a subcommand. Generation tools ask for approval (use --yes in non-interactive runs); transcription is safe. Files are saved in the working directory with the same naming, and the tool result is the saved path.

Built-in Capabilities

  • Model-agnostic — OpenAI and Anthropic protocols, live-verified presets, any compatible endpoint
  • Built-in tools — file I/O, shell, code execution, grep, directory listing, todo tracking, and web fetch
  • Skills system — Agent Skills loading plus model-driven FindSkills / ActivateSkill / ReadSkillFile
  • MCP support — stdio and streamable HTTP clients with CLIver-style discovery
  • Permission and execution policy — opt-in SAFE/ASK gates and env/cwd/path scopes
  • Media capabilities — image, video, text-to-speech, speech-to-text, embedding, and rerank
  • Reliability — same-purpose failover, run deadlines, and explicit credential rotation
  • Structured output — schema-validated chat_structured() with retries and usage accounting
  • Context management — declarative compaction plans, an opt-in LlmCompactor, and a full-history escape hatch, all inside the run deadline
  • System One — decision-model tool/skill selection with a fail-open selector
  • Embeddable API — AgentCore.chat(), .stream(), and .run_skill() with no CLI dependencies

Repository Layout

Code
packages/cliver-core/   # embeddable library (published)
packages/cliver/        # CLI application built on cliver-core
website/                # documentation site (Astro + Starlight)

Documentation

Full documentation at cliver-project.github.io/CLIver

Development

bash
git clone https://github.com/cliver-project/CLIver.git
cd CLIver

make init     # Set up dev environment
make test     # Run the workspace test suite
make lint     # Lint and format check
make format   # Auto-fix lint/format issues
make dist     # Build the cliver-core sdist + wheel

cd website && npm install && npm run dev   # Docs dev server at localhost:4321

License

Apache 2.0