Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License
Swarmauri is a composable intelligence infrastructure SDK for building typed, pluggable Python systems. The repository contains the public swarmauri namespace package, interface contracts, reusable base classes, standard components, community integrations, plugin packages, and package-level documentation for independently installable Swarmauri distributions.
Swarmauri separates component contracts from implementations so applications can compose agents, tools, models, parsers, vector stores, signing components, key providers, transports, middleware, billing providers, and storage adapters without locking every workflow to one provider package. The namespace package gives users stable imports while individual packages keep dependencies focused.
Use the namespace package when composing installed components through stable public imports. Use the foundational packages when writing a component, or install a focused distribution for a specific provider or component kind.
- Stable
swarmauri.*namespace imports through the namespace package. - Interface-first package architecture through
swarmauri_core. - Pydantic-backed base classes, serialization helpers, and dynamic component registration through
swarmauri_base. - First-party standard components through
swarmauri_standard. - Independently installable community, plugin, experimental, and standards packages.
- Component families for agents, chains, conversations, documents, embeddings, LLMs, parsers, prompts, schema converters, tools, toolkits, vector stores, signing, crypto, key providers, transports, middleware, storage, XMP, billing, and more.
- Python 3.10, 3.11, 3.12, 3.13, and 3.14 support.
Application code owns provider selection, credentials, and deployment. The SDK supplies interfaces, reusable implementations, and discovery for the components installed in the application environment.
Use Python 3.10 through 3.14 for the workflows below. Check each implementation package for its own Python requirements and any provider credentials or services it needs.
Install swarmauri for the public namespace and plugin discovery. The full extra adds the broader curated component bundle. Install swarmauri_core and swarmauri_base to develop components against the foundational packages.
uv add swarmauriuv add "swarmauri[full]"uv add swarmauri_core swarmauri_baseChoose a focused package when you only need one component family.
uv add swarmauri_vectorstore_pinecone
uv add swarmauri_tool_jupyterexportlatex
uv add swarmauri_signing_ed25519pip install swarmauripip install "swarmauri[full]"pip install swarmauri_core swarmauri_basepip install swarmauri_vectorstore_pinecone
pip install swarmauri_tool_jupyterexportlatex
pip install swarmauri_signing_ed25519poetry add swarmauriImporting swarmauri activates namespace discovery for installed components.
import swarmauri
from swarmauri.interface_registry import InterfaceRegistry
from swarmauri.plugin_citizenship_registry import PluginCitizenshipRegistry
print(len(InterfaceRegistry.list_registered_namespaces()))
print(len(PluginCitizenshipRegistry.total_registry()))The example prints the number of registered namespaces and then the number of registered component mappings. The counts depend on the installed distributions.
Use a stable namespace import. Install swarmauri and swarmauri_signing_ed25519 to resolve the signer through the public namespace.
import swarmauri
from swarmauri.signings.Ed25519EnvelopeSigner import Ed25519EnvelopeSigner
signer = Ed25519EnvelopeSigner()
print(signer.type)Import an implementation directly. Install swarmauri_standard to use its document and tool classes through their package imports.
from swarmauri_standard.documents.Document import Document
from swarmauri_standard.tools.AdditionTool import AdditionTool
doc = Document(content="Direct package import")
tool = AdditionTool()
print(doc.type)
print(tool(2, 2))Inspect component mappings. Print up to ten public import paths alongside their implementation modules.
from swarmauri.plugin_citizenship_registry import PluginCitizenshipRegistry
for public_path, module_path in list(PluginCitizenshipRegistry.total_registry().items())[:10]:
print(public_path, "->", module_path)Deserialize a registered component. Use the base package to deserialize a typed component as part of a Pydantic model.
from typing import Literal
from pydantic import BaseModel
from swarmauri_base.ComponentBase import ComponentBase
from swarmauri_base.DynamicBase import SubclassUnion
@ComponentBase.register_model()
class ConnectorBase(ComponentBase):
type: Literal["ConnectorBase"] = "ConnectorBase"
label: str
@ComponentBase.register_type(ConnectorBase, "ApiConnector")
class ApiConnector(ConnectorBase):
type: Literal["ApiConnector"] = "ApiConnector"
endpoint: str
class ConnectorSpec(BaseModel):
connector: SubclassUnion[ConnectorBase]
spec = ConnectorSpec.model_validate_json(
'{"connector":{"type":"ApiConnector","label":"primary","endpoint":"https://api.example.test"}}'
)
assert isinstance(spec.connector, ApiConnector)Select optional dependency groups and implementation distributions at install time. Configure provider credentials and component options where the application constructs the selected implementation.
If a public import fails, check whether the implementation package is installed and inspect the registry mappings to see which module owns the requested path. If Pydantic rejects serialized component data, check the discriminator and the fields required by the registered type.
Instantiate components directly. Use a public namespace import where you want registry-backed resolution, or import from the implementation package to keep dependencies focused.
The repository contains separately installable distributions with distinct responsibilities.
Foundational packages
- swarmauri provides the namespace importer and plugin discovery layer.
- swarmauri_core provides interface contracts and shared types.
- swarmauri_base provides reusable base classes, serialization helpers, and component registration behavior.
- swarmauri_standard provides first-party standard components.
- swarmauri_typing provides dynamic typing utilities used by Swarmauri base classes.
Repository package areas
pkgs/10-interfaces/swarmauri_core,pkgs/20-bases/swarmauri_base,pkgs/00-typing/swarmauri_typing, andpkgs/80-facades/swarmauricontain foundational packages.pkgs/30-standard-kernel/swarmauri_standardcontains first-party standard components.pkgs/50-communitycontains community-maintained packages and provider integrations.pkgs/60-pluginscontains plugin packages.pkgs/40-standardscontains standard-interface and standards-oriented packages.pkgs/70-experimentalcontains early-stage packages.
Common package families
swarmauri_vectorstore_*packages provide vector database integrations.swarmauri_embedding_*packages provide embedding model integrations.swarmauri_tool_*packages provide task-specific tools.swarmauri_parser_*packages provide parsing utilities.swarmauri_signing_*packages provide signing implementations.swarmauri_keyprovider_*packages provide key-management implementations.swarmauri_billing_*packages provide billing provider implementations and stubs.
Applications can import registered classes through swarmauri.* or import directly from package paths such as swarmauri_standard.documents and swarmauri_standard.tools. Component authors use the contracts and base classes from swarmauri_core and swarmauri_base.
Packages that participate in namespace discovery declare their mappings in pyproject.toml. For example, a vector store plugin can declare this entry point.
[project.entry-points.'swarmauri.vectorstores']
YourVectorStore = "swarmauri_vectorstore_yourplugin:YourVectorStore"Applications supply the concrete components and provider settings they need. Each distribution declares its own install dependencies, and the namespace resolves implementations from the installed environment.
Applications consume the component contracts from swarmauri_core. The namespace importer consumes interface and citizenship registry mappings to resolve public import paths. The related package catalog includes stdio transport and JSON-RPC middleware implementations.
Create component packages with direct instantiation in mind. Plugins should expose clear package-level imports, use the relevant swarmauri_core interface and swarmauri_base base class, document installation and usage, and register entry points where namespace discovery is expected.
from typing import Literal
from swarmauri_base.ComponentBase import ComponentBase
from swarmauri_base.vector_stores.VectorStoreBase import VectorStoreBase
@ComponentBase.register_type(VectorStoreBase, "YourVectorStore")
class YourVectorStore(VectorStoreBase):
type: Literal["YourVectorStore"] = "YourVectorStore"Install the implementation packages in the same Python environment as the application. Provider-backed components may also require credentials, network access, or a running backend as documented by the selected package.
Use the registry inspection workflow to confirm which imports are available in the environment. For backend connectivity and runtime health, use the checks documented by the selected component.
Keep provider secrets in the application’s configuration and review each component’s documented permissions, limits, and failure behavior before using it with a backend.
The namespace package documents Python 3.10, 3.11, 3.12, 3.13, and 3.14 support. Consult the individual distribution’s metadata for its Python and dependency constraints.
Run tests for the package you changed from the pkgs/ workspace.
uv run --directory pkgs/80-facades/swarmauri --package swarmauri pytestThe repository’s checks provide package-level test and compatibility evidence. See each distribution’s README for any certification it claims.
Use the package test suite to verify behavior in a source checkout. Distribution metadata and releases are available on PyPI, and repository workflow runs record automated checks. Swarmauri on PyPI · Repository workflows
Why install the main package? Install swarmauri when you want the public namespace, plugin discovery, and curated optional dependency groups. Swarmauri on PyPI
How do I start writing a component? Start with swarmauri_core for interfaces. Use swarmauri_base when the implementation needs serialization, component registration, or reusable base behavior. Core on PyPI · Base on PyPI
When should I install a component package? Use swarmauri_standard for ready-to-use first-party components, or choose a focused community, plugin, or standards package for a specific provider or component kind. Standard components on PyPI
Which Python versions can I use? The documented range for the SDK workflows above is Python 3.10 through 3.14. See Compatibility for package-level constraints.
- Dynamic schemas guide
- Swarmauri namespace call flow
- Swarmauri citizenship notes
- Contribution guide
- Style guide
- index.toml
Security and signing packages
- swarmauri_signing_ed25519
- swarmauri_signing_jws
- swarmauri_crypto_composite
- swarmauri_keyprovider_inmemory
Runtime and infrastructure packages
Billing provider packages
- swarmauri_billing_adyen
- swarmauri_billing_authorize_net
- swarmauri_billing_braintree
- swarmauri_billing_paypal
- swarmauri_billing_stripe
Open an issue for a bug or proposal. Include the affected distribution and a minimal example when reporting a bug. Follow the repository’s pull request guidance. Contribution guide
Run formatting, linting, and tests for the affected workspace member. For example, to work on the namespace package, run these commands from the repository root.
uv run --directory pkgs/80-facades/swarmauri --package swarmauri ruff format .
uv run --directory pkgs/80-facades/swarmauri --package swarmauri ruff check . --fix
uv run --directory pkgs/80-facades/swarmauri --package swarmauri pytestKeep a component’s distribution metadata, installation instructions, usage examples, and entry point declarations aligned. When adding a workspace member, update the workspace configuration. SDK Style Guide
Repository code owners review changes through GitHub pull requests targeting master. CODEOWNERS
Use the repository contribution guide and SDK style guide for code, tests, and packaging. The package README policy defines the required outline and checks for distributions. Contribution guide · SDK Style Guide · Package README policy
The catalog in index.toml distinguishes foundational packages, standard components, community integrations, plugins, standards-oriented implementations, and early-stage projects. Consult the relevant package README and release history for lifecycle and migration guidance. index.toml
The Swarmauri SDK is licensed under the Apache License 2.0. See the LICENSE file for details.
See the license and attribution files shipped with each distribution for package-specific notices. Repository license