Skip to main content Switch to mobile version matrx-ai 0.5.607 Unified multi-provider AI client, orchestration, and tool system
pip install matrx-ai==0.5.607 Copy PIP instructions
Unified multi-provider AI client, orchestration, and tool system for Python. One UnifiedAIClient that speaks to 12+ provider SDKs (OpenAI, Anthropic, Google, Groq, Cerebras, xAI, Together, ElevenLabs, Hugging Face, Cohere, Fireworks, Replicate) through a common UnifiedConfig / UnifiedMessage / UnifiedResponse contract, with streaming, tool calls, agents, and an orchestrator that runs a model until its task is complete.
pip install matrx-ai Python 3.13+ required. Depends on matrx-utils, matrx-connect, matrx-graph, plus the provider SDKs. Host applications inject their own ORM models at startup via matrx_ai.configure(...).
Unified client (UnifiedAIClient): one async interface over every supported provider; request translation + response normalization handled by per-provider adapters.
Config + message types: UnifiedConfig, UnifiedMessage, MessageList, UnifiedResponse, enums (Provider, Role, ContentType, FinishReason), usage trackers (TokenUsage, TimingUsage, ToolCallUsage).
Orchestrator: AIMatrixRequest, CompletedRequest, execute_until_complete(...) — autonomous multi-turn execution with tool loops.
Agents (matrx_ai.agents): template + session-based agent system; caching; services.
Tools (matrx_ai.tools): registry + built-in implementations (ctx_patch, ctx_create, shell, code, …). All host-specific integration points (ContextManifest, writeback persistence, test helpers) come in via configure().
Context (matrx_ai.context): re-exports AppContext + Emitter from matrx-connect.
Persistence (matrx_ai.db): Supabase-backed conversation/request storage. ORM models are host-injected.
Providers (matrx_ai.providers): per-provider translators, request shaping, streaming adapters, parameter modifiers (e.g. GPT-5 strips temperature/top_p).
from matrx_ai import UnifiedAIClient, UnifiedConfig, UnifiedMessage, Provider, Role client = UnifiedAIClient() config = UnifiedConfig( provider=Provider.ANTHROPIC, ai_model="claude-sonnet-4-6", messages=[UnifiedMessage(role=Role.USER, content="Summarize the Magna Carta.")], stream=False, ) response = await client.run(config) print(response.text) Streaming
config = UnifiedConfig( provider=Provider.OPENAI, ai_model="gpt-4o", messages=[UnifiedMessage(role=Role.USER, content="Explain RAFT.")], stream=True, ) async for chunk in client.stream(config): print(chunk.delta, end="", flush=True) Autonomous execution (tools + multi-turn)
from matrx_ai import execute_until_complete, AIMatrixRequest request = AIMatrixRequest( config=config, tools=["web_search", "code_executor"], max_iterations=10, ) completed = await execute_until_complete(request) print(completed.final_response.text) print(completed.timing_usage, completed.token_usage) Host integration — matrx_ai.configure(...)
matrx-ai is designed to be embedded in a larger application (like aidream) that supplies ORM models, settings, and context-object classes. It is also designed to run without any of that configuration — most features work on their own; the DB-dependent ones raise ExtNotConfiguredError at call time if the host didn't wire them up.
import matrx_ai matrx_ai.configure( db_models={"AiModel": AiModel, "CxConversation": CxConversation, ...}, db_bases={"CxConversationBase": CxConversationBase, ...}, db_instances={"guest_executions_manager": guest_manager}, db_extras={"ContentBlocksDTO": ContentBlocksDTO}, settings=settings, get_supabase_client=get_async_supabase_client, # Context-object model classes (used by ctx_patch / ctx_create tools) context_object_cls=ContextObject, context_object_type_cls=ContextObjectType, context_source_cls=ContextSource, persist_mode_cls=PersistMode, context_manifest_cls=ContextManifest, load_manifest_from_ctx=load_manifest_from_ctx, schedule_context_writeback=schedule_writeback, # …anything else the host wants to make available ) This is the reference implementation of the "capability-within, injection-without" pattern used throughout the Matrx family — the package stores injected values in a module-level _ext registry; feature code retrieves them at call time via get_ext("…"). import matrx_ai always works in a minimal environment; only features that need a specific injection will raise if it's missing.
For a client host, get_jwt may be a synchronous or asynchronous zero-argument provider. matrx-ai resolves it at each authenticated server request and does not cache its result. Once a host configures that provider, a failure or missing token refuses the authenticated request instead of falling back to anonymous access. Without a provider, the public tool-catalog fetch remains unauthenticated.
Hard deps: matrx-utils, matrx-connect, matrx-graph, plus the provider SDKs (Anthropic, OpenAI, Google GenAI, Groq, Cerebras, xAI, Together, Cohere, Fireworks, Replicate, Tiktoken) and core libs (pydantic, httpx, aiohttp, supabase, asyncpg, json-repair, numpy, rich).
matrx-ai does not depend on matrx-orm. The host app that embeds matrx-ai may use matrx-orm (aidream does), but matrx-ai itself accepts ORM model classes through configure(db_models=..., db_bases=..., ...) rather than importing them.
The old root-level ai/ folder in the aidream monorepo. matrx-ai is now the canonical AI layer.
See CLAUDE.md for package-specific rules (including the _ext injection pattern and the forbidden-imports list). Deep per-subsystem docs live in matrx_ai/MODULE_README.md. This package lives in the aidream monorepo at github.com/AI-Matrix-Engine/aidream-current.
Both files in this release have provenance metadata.
agents ai anthropic llm openai orchestration streaming supabase tools
Development Status 4 - Beta
Intended Audience Developers
License OSI Approved :: MIT License
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Python Modules
Release files for matrx-ai 0.5.607
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 10.1 MB
Release files / matrx_ai-0.5.607.tar.gz
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.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Release files / matrx_ai-0.5.607-py3-none-any.whl
Security for matrx-ai 0.5.607
Both files in this release have been uploaded with provenance metadata.
With provenance matrx_ai-0.5.607.tar.gz Oct 16, 2026
With provenance matrx_ai-0.5.607-py3-none-any.whl Oct 16, 2026
Attestation for matrx_ai-0.5.607.tar.gz
Attestation for matrx_ai-0.5.607-py3-none-any.whl
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files Full provenance
Nov 23, 2026 2 release files Full provenance
Oct 30, 2026 2 release files Full provenance
Oct 28, 2026 2 release files Full provenance
Oct 27, 2026 2 release files Full provenance
Oct 26, 2026 2 release files Full provenance
Oct 25, 2026 2 release files Full provenance
Oct 24, 2026 2 release files Full provenance
Oct 23, 2026 2 release files Full provenance
Oct 22, 2026 2 release files Full provenance
Oct 21, 2026 2 release files Full provenance
Oct 20, 2026 2 release files Full provenance
Oct 19, 2026 2 release files Full provenance
Oct 17, 2026 2 release files Full provenance
Oct 16, 2026 2 release files Full provenance
Oct 15, 2026 2 release files Full provenance
Oct 14, 2026 2 release files Full provenance
Oct 13, 2026 2 release files Full provenance
Oct 12, 2026 2 release files Full provenance
Oct 11, 2026 2 release files Full provenance
Oct 10, 2026 2 release files Full provenance
Oct 9, 2026 2 release files Full provenance
Oct 8, 2026 2 release files Full provenance
Oct 7, 2026 2 release files Full provenance
Oct 6, 2026 2 release files Full provenance
Oct 5, 2026 2 release files Full provenance
Oct 4, 2026 2 release files Full provenance
Oct 3, 2026 2 release files Full provenance
Oct 2, 2026 2 release files Full provenance
Oct 1, 2026 2 release files Full provenance
Sep 30, 2026 2 release files Full provenance
Sep 29, 2026 2 release files Full provenance
Sep 28, 2026 2 release files Full provenance
Sep 27, 2026 2 release files Full provenance
Sep 26, 2026 2 release files Full provenance
Sep 25, 2026 2 release files Full provenance
Sep 24, 2026 2 release files Full provenance
Sep 23, 2026 2 release files Full provenance
Sep 21, 2026 2 release files Full provenance
Sep 20, 2026 2 release files Full provenance
Sep 19, 2026 2 release files Full provenance
Sep 18, 2026 2 release files Full provenance
Sep 17, 2026 2 release files Full provenance
Sep 16, 2026 2 release files Full provenance
Sep 15, 2026 2 release files Full provenance
Sep 14, 2026 2 release files Full provenance
Sep 13, 2026 2 release files Full provenance
Sep 12, 2026 2 release files Full provenance
Sep 11, 2026 2 release files Full provenance
Sep 10, 2026 2 release files Full provenance
Sep 9, 2026 2 release files Full provenance
Sep 8, 2026 2 release files Full provenance
Sep 7, 2026 2 release files Full provenance
Sep 2, 2026 2 release files Full provenance
Sep 1, 2026 2 release files Full provenance
Aug 31, 2026 2 release files Full provenance
Aug 30, 2026 2 release files Full provenance
Aug 29, 2026 2 release files Full provenance
Aug 28, 2026 2 release files Full provenance
Aug 27, 2026 2 release files Full provenance
Aug 26, 2026 2 release files Full provenance
Aug 25, 2026 2 release files Full provenance
Aug 24, 2026 2 release files Full provenance
Aug 23, 2026 2 release files Full provenance
Aug 22, 2026 2 release files Full provenance
Aug 21, 2026 2 release files Full provenance
Aug 20, 2026 2 release files Full provenance
Aug 19, 2026 2 release files Full provenance
Aug 18, 2026 2 release files Full provenance
Aug 17, 2026 2 release files Full provenance
Aug 16, 2026 2 release files Full provenance
Aug 15, 2026 2 release files Full provenance
Aug 14, 2026 2 release files Full provenance
Aug 13, 2026 2 release files Full provenance
Aug 12, 2026 2 release files Full provenance
Aug 11, 2026 2 release files Full provenance
Aug 10, 2026 2 release files Full provenance
Aug 9, 2026 2 release files Full provenance
Aug 8, 2026 2 release files Full provenance
Aug 7, 2026 2 release files Full provenance
Aug 4, 2026 2 release files Full provenance
Jul 30, 2026 2 release files Full provenance
Jul 29, 2026 2 release files Full provenance
Jul 28, 2026 2 release files Full provenance
Jul 27, 2026 2 release files Full provenance
Jul 26, 2026 2 release files Full provenance
Jul 25, 2026 2 release files Full provenance
Jul 24, 2026 2 release files Full provenance
Jul 23, 2026 2 release files Full provenance
Jul 22, 2026 2 release files Full provenance
Jul 21, 2026 2 release files Full provenance
Jul 20, 2026 2 release files Full provenance
Jul 19, 2026 2 release files Full provenance
Jul 18, 2026 2 release files Full provenance
Jul 17, 2026 2 release files Full provenance
Jul 15, 2026 2 release files Full provenance
Jul 14, 2026 2 release files Full provenance
Jul 13, 2026 2 release files Full provenance
Jul 12, 2026 2 release files Full provenance
Jul 11, 2026 2 release files Full provenance
Mar 25, 2026 2 release files Full provenance
Mar 24, 2026 2 release files Full provenance
Mar 16, 2026 2 release files Full provenance
Mar 12, 2026 2 release files Full provenance
Mar 11, 2026 2 release files Full provenance
Mar 4, 2026 2 release files Full provenance
Mar 3, 2026 2 release files Full provenance
Mar 1, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




