AbstractCore Documentation Index
This folder contains the canonical user documentation for AbstractCore. The codebase is the source of truth; if you spot a mismatch, please open an issue.
Table of Contents
AbstractFramework ecosystem Start here (recommended reading order) Core guides Media, embeddings, and MCP (optional subsystems) Server (optional HTTP API) Built-in CLI apps Project docs Docs layout (what’s where)AI assistants and documentation indexers can use the repository-level
llms.txt and llms-full.txt files. MCP clients such as Context7 can also
query the public documentation directly.
For agents writing integrations or operating an installation, load the
abstractcore skill with its references/ folder.
The integration and operations guide is the canonical documentation for
its bounded generation, tool-loop, configuration and lifecycle recipes.
AbstractFramework ecosystem
AbstractCore is one of the core packages of the AbstractFramework ecosystem:
- AbstractFramework (umbrella): https://github.com/lpalbou/AbstractFramework
- AbstractCore (this package): unified LLM interface + cross-provider infrastructure (tools, streaming, structured output, media policies)
- AbstractRuntime: durable tool/effect execution, workflows, and state persistence (recommended runtime for executing
response.tool_calls) — https://github.com/lpalbou/abstractruntime
Start here (recommended reading order)
- Installation — the three install settings: light (
pip install abstractcore),abstractcore[apple],abstractcore[gpu] - Prerequisites — install/configure providers (Ollama, LMStudio, vLLM, HuggingFace, MLX, OpenAI, Anthropic, OpenRouter, Portkey, …)
- Getting Started — first call (
create_llm,generate), streaming, tools, structured output - FAQ — install settings, local servers, common gotchas
- Troubleshooting — actionable fixes for common failures
- API (Python) — user-facing map of the public API
- API Reference — complete function/class reference (including events)
- Architecture — component ownership, provider boundaries, request lifecycle, native MLX execution, server routes and local model management
Core guides
- Integrating and operating AbstractCore — version verification, explicit endpoints, bounded Python recipes, host-controlled tools, model lifecycle, serving and troubleshooting; companion to the package agent skill
- Tool Calling — native + prompted tools; passthrough vs execution
- Tool Syntax Rewriting — normalize tool-call markup for different runtimes/clients
- Email — connect one IMAP/SMTP account (password or OAuth2), encrypted credentials, recipient policy (allowlist / denylist), send limits, Read only or Read and write access (
EmailAccount.access,set_access), email tools,abstractcore email ..., the consoles' Email pages and theabstractcore.comms.emaillibrary - Web and Document Tools —
fetch_url,skim_url,web_search,skim_websearch: extraction, result contract, optional JavaScript rendering, and safety - Structured Output —
response_model=...strategies and limitations - Request and Output — canonical
request=+output=shape, structural task inference, and route-inspection basics - Session Management — conversation state, persistence, compaction
- Chat Compaction — conversation reduction and continuity controls
- Async Guide — async generation, streaming and concurrency patterns
- Concurrency and Throughput — async versus tensor batching and the historical direct-backend MLX profile
- Prompt Caching —
prompt_cache_key, KV/prefix caches, persistence, durable memory bloc bindings, and the measured cold-vs-warm prefill matrix for the MLX, transformers and GGUF lanes - Generation Parameters — unified parameter vocabulary, default hierarchy, caller overrides, and provider quirks
- Speculative Decoding — native MTP controls, Qwen3.8-Flash-Next Q4 on the in-process MLX provider, selectable draft depth, prefix caching, and measured tradeoffs
- Native MLX Runtime — concurrent native requests, target continuous batching versus MTP cohorts, shared ownership, cancellation, bounded RAM/SSD prefix caches, and HTTP serving
- Native MLX Benchmarks — M5 Max 128-GiB measurements for Qwen3.8-27B and Flash-Next versus oMLX: actual MTP, concurrent requests, vision, memory and workload-dependent limits
- Reasoning Control — the unified
thinking=parameter, what each provider sends for on/off and effort levels, model requirements, and how to verify a request took effect - HuggingFace Model Compatibility — Transformers/GGUF loading rules, quantized checkpoint caveats, and trusted proof targets
- Memory Blocs — persistent extracted text snapshots + per-model KV artifacts
- Stopping a Generation and Ejecting a Model — host
cancel_eventper lane (MLX, transformers, GGUF, LM Studio, Ollama, llama.cpp server / OpenAI-compatible), severed HTTP requests, what cannot be interrupted, and eject safety (in-flight calls stopped first,load_model, reload on demand) - Memory and Model Residency — process-local artifact sharing and configuration refusals, host memory snapshot (
get_memory_snapshot), host-wide resident-model sweep (sweep_loaded_models), per-provider loaded-model listings, whatunload_model()frees (weights + session caches) and how to verify it, ejecting a model from the whole process across MLX, HuggingFace (transformers and GGUF) and embedding models (process_residency.eject/eject_unclaimedwith the claims registry), the one-figuredevice.process_held_bytes, gateway model locks (/acore/models/lock), and context calibration/estimation (estimate_context_fit) - Model/architecture registries (source of truth) —
abstractcore/assets/model_capabilities.json,abstractcore/assets/model_capabilities.schema.json, andabstractcore/assets/architecture_formats.json(seeabstractcore/assets/README.md) - Local Models — browse the download catalog with fit verdicts for this machine (
abstractcore models catalog|search), the recommended text model per machine, list installed models with sizes, download (with MTP companions and live progress) and delete weights, follow jobs,models verifyandmodels repair-refs - Knowledge-Graph Extraction Models — measured comparison of local and hosted models for ontology-constrained entity and relationship extraction: precision, coverage and time per model, the prompt rules and second-pass strategies that change results, and recommendations
- Decision Models — text in, calibrated typed decisions out:
generate(document, output="decision", questions=...)with choice / noul / score questions; one abstraction over hosted Jev (typesafe), any System One host (systemone) and local Kev, Lev and Laya checkpoints (MLX / transformers / llama.cpp);POST /v1/decisions; conversion to quantized checkpoints and measured quality per precision - Recommended Models — the recommended model per capability (text, image input, speech output and input, image, video, music) for Apple silicon by memory, NVIDIA Linux/Windows, processor-only machines and Intel Macs;
abstractcore models recommendations [--host] [--json]; tables generated from the code - Local Engines — detect Ollama / LM Studio / MLX / llama.cpp / vLLM / transformers, the exact install command per OS,
abstractcore engines install, and the install safety policy - Centralized Config — config file, config CLI (
abstractcore --config), and capability route defaults (input.*,output.*,embedding.*,rerank.*) - Data-Home Registry — machine-level registry of framework data directories (model/prompt caches, runs, sessions, logs, entity homes) with owner-declared safe-purge verbs
- Events and Structured Logging — observability hooks
- Interaction Tracing — record prompts/responses/usage for debugging
- Capabilities — what AbstractCore can and cannot do
- Fallbacks — explicit fallback behavior and compatibility boundaries
- Model Compatibility and Issue Reporting — provider/artifact checks and useful issue reports
- Practical Examples — end-to-end Python recipes
- Framework Comparison — AbstractCore and AbstractFramework alongside other LLM libraries
- Capability plugins (voice/audio/vision/music/scene3d/camera) — optional deterministic outputs via
llm.voice/llm.audio/llm.vision/llm.music/llm.scene3d/llm.camera, plus shared provider/model discovery (seecapabilities.mdandserver.md)
Media, embeddings, and MCP (optional subsystems)
- Media Handling System — images/audio/video + documents (policies + fallbacks)
- Vision Capabilities — image/video input, native MLX image input, vision fallback, and how this differs from generative vision
- Glyph Visual-Text Compression — optional vision-based document compression (experimental)
- Vision Compression — rendering, configuration and quality tradeoffs for text-as-image workflows
- Embeddings —
EmbeddingManagerand local embedding models (opt-in) - MCP (Model Context Protocol) — consume MCP tool servers (HTTP/stdio) as tool sources
Server (optional HTTP API)
- Server — optional OpenAI-compatible
/v1serving, Core authentication, standaloneabstractcore serveand managed listener lifecycle in an execution owner - Web Console — browser console at
/console(responsive on phones and tablets): host profile, model catalog with fit badges, download/delete, engine install with confirmation, and the embedding contract for AbstractGateway - Terminal Console —
abstractcore-console: the same Models and Engines screens in a terminal, plus config screens - Endpoint — single-model OpenAI-compatible
/v1endpoint (installpip install abstractcore; runabstractcore-endpoint)
Built-in CLI apps
These are convenience CLIs built on top of the core library:
- Interactive Chat CLI —
abstractcore-chatusage and controls - Summarizer
- Extractor
- Judge
- Intent
- DeepSearch
Project docs
- Changelog — release notes and upgrade guidance
- Contributing — dev setup and PR guidelines
- Security — responsible vulnerability reporting
- Acknowledgements — upstream projects and communities
- License — MIT license text
Docs layout (what’s where)
docs/ is mostly a flat set of guides plus a few subfolders:
docs/apps/— CLI app guidesdocs/known_bugs/— focused notes on known issues (when present)docs/archive/— superseded/historical docs (seedocs/archive/README.md)docs/backlog/— planning notes (seedocs/backlog/README.md)docs/reports/— non-authoritative engineering notes (seedocs/reports/README.md)docs/research/— non-authoritative experiments (seedocs/research/README.md)
Key distinction:
- api.md = API overview (how to use the public API)
- api-reference.md = full Python API reference
- server.md = HTTP server endpoints and deployment