This release is a pre-release and may not be stable for production use.
cliver-core
The embeddable agent core behind CLIver: a Re-Act loop with tool calling, per-purpose model bindings, media capabilities, and optional MCP support.
No CLI, no database, no config files — you pass Python objects in and get messages back.
Install
pip install cliver-core # core library
pip install "cliver-core[mcp]" # + MCP client (stdio / streamable HTTP)
pip install "cliver-core[local]" # + in-process local embedding / rerank models
Python 3.10+.
Quick start
import asyncio
from cliver_core import AgentCore, ModelBinding, ModelBindings
async def main():
agent = AgentCore(
ModelBindings(
llm=ModelBinding.llm(
model="deepseek-v4-flash",
api_key="...",
base_url="https://api.deepseek.com",
)
)
)
response = await agent.chat("Summarize the Re-Act pattern in one sentence.")
print(response.message.content)
await agent.aclose()
asyncio.run(main())
Ready-made bindings for live-verified providers live in cliver_core.presets:
from cliver_core import ModelBindings, presets
bindings = ModelBindings(llm=presets.deepseek(api_key="..."))
agent = AgentCore(bindings)
Tools
cliver_core.tools ships nine file, shell, todo, and web tools. Register them directly:
from cliver_core.tools import discover_builtin_tools
agent = AgentCore(bindings, builtin_tools=discover_builtin_tools())
ToolRegistry and the @tool decorator build custom tools.
Capabilities
Every purpose works standalone — no AgentCore required:
from cliver_core import ModelBinding
from cliver_core.capabilities import embed, generate_image
vectors = await embed(
texts=["hello", "world"],
binding=ModelBinding.embed(model="text-embedding-3-small", api_key="...", base_url="..."),
)
image = await generate_image(
prompt="a red panda on a skateboard",
binding=ModelBinding.image(model="gpt-image-1", api_key="...", base_url="..."),
)
Purposes: image, video, text-to-speech, speech-to-text, embed, rerank. Long generations can return
a MediaJob future via the submit_* variants.
Local models
Run embedding and rerank models in-process — no endpoint. The backends pull torch, so they are opt-in:
pip install "cliver-core[local-st]" # sentence-transformers embeddings
pip install "cliver-core[local-flag]" # FlagEmbedding embeddings + rerank
pip install "cliver-core[local]" # both
from cliver_core.capabilities import embed, rerank
from cliver_core.local import (
LocalEmbeddingProvider,
LocalRerankProvider,
local_embed,
local_rerank,
)
embedder = LocalEmbeddingProvider(
model="BAAI/bge-base-zh-v1.5", # Hugging Face id or local directory
backend="sentence-transformers", # required; never inferred from the model name
)
reranker = LocalRerankProvider(
model="BAAI/bge-reranker-v2-m3",
backend="flag-embedding",
)
vectors = await embed(
texts=["hello", "world"],
binding=local_embed(provider=embedder, normalize=True),
)
items = await rerank(
query="hello",
documents=["hi", "hey"],
binding=local_rerank(provider=reranker, top_k=1),
)
await embedder.close()
await reranker.close()
A provider owns one loaded model and is meant to be long-lived: create it once, share it across
bindings and calls, and close it at shutdown. There is no process-global model cache.
ModelBinding.aclose() never closes a provider you supplied.
The API is deliberately explicit: model, backend, device, and dtype are parameters, not
name-based defaults. Call options are generic — dim (optional output-size check), normalize
(off by default; raw vectors/scores), batch_size, and top_k (rerank). Query/document prefixes
and instruction templates belong to the application.
provider.info() reports the resolved model directory, revision, device, dtype, and load time.
Hugging Face downloads honor HF_TOKEN, cache_dir, revision, and local_files_only.
MCP
from cliver_core.mcp import MCPClient
client = MCPClient.from_discovery() # ~/.cliver/mcp.json, .cliver/mcp.json, drop-ins
agent = AgentCore(bindings, mcp_client=client)
MCP tools are advertised to the model as mcp__<server>__<tool>. Prompts and resources are read on
demand — list_prompts, get_prompt, list_resources, read_resource — never registered as
tools.
License
Apache-2.0
Metadata
Release files for cliver-core 0.3.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cliver_core-0.3.0a2.tar.gz | 166.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cliver_core-0.3.0a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 309.2 kB
Release files / cliver_core-0.3.0a2.tar.gz
| Download URL | cliver_core-0.3.0a2.tar.gz |
|---|---|
| Size | 166.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7c762ba8d9fe334468e1ad96a94425d1ee9645152041dac02a48a20481e062a
|
|
BLAKE2b-256 checksum How to use checksums |
b1b8e772c87ff502be7f0ca7dbebf188824f19e9f496399528535e12b3a0753a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / cliver_core-0.3.0a2-py3-none-any.whl
| Download URL | cliver_core-0.3.0a2-py3-none-any.whl |
|---|---|
| Size | 143.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
871bfbaa4b88d38876c69a888410033c527bbf9594e1fe093d60cae7a9517b6b
|
|
BLAKE2b-256 checksum How to use checksums |
de6ddca0ed5a95f2b65ed56ca79481891e4cacd000ae43f963540f1c90e2e84e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for cliver-core 0.3.0a2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.