Skip to main content

First-party Swarmauri standard components for agents, tools, parsers, vectors, model adapters, and composable intelligence workflows.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_standard Discord

Swarmauri Standard

swarmauri_standard provides first-party, ready-to-use Swarmauri components built on swarmauri_core interfaces and swarmauri_base component behavior. It is the standard component bundle for agents, chains, chunkers, conversations, documents, tools, toolkits, parsers, prompts, schema converters, metrics, similarities, deprecated distance compatibility shims, vectors, vector stores, tracing utilities, STT/TTS/VLM adapters, signing helpers, and key-provider components.

Why Swarmauri Standard?

swarmauri_standard provides maintained first-party components that users can install and instantiate directly. It also demonstrates the expected Swarmauri component style: typed base classes, direct class imports, dynamic serialization, and namespace-ready registration.

FAQ

Q: What kinds of components are included?

A: The package includes agents, chains, chunkers, conversations, documents, tools, toolkits, parsers, prompts, schema converters, metrics, similarities, deprecated distance compatibility shims, vectors, vector stores, tracing utilities, STT/TTS/VLM adapters, signing helpers, and key-provider components.

Q: Is this package the same as swarmauri?

A: No. swarmauri provides the namespace importer and plugin discovery layer. swarmauri_standard provides concrete first-party implementation classes.

Q: Should examples instantiate plugins directly?

A: Yes. Direct class imports and direct instantiation are the preferred documented workflow unless a package explicitly requires another integration pattern.

Features

  • Standard agents including question-answering, RAG, simple conversation, and tool-using agent patterns.
  • Tool and toolkit components such as calculator, HTTP request, readability, code extraction, temperature conversion, weather, and accessibility utilities.
  • Parser and document components for CSV, XML, OpenAPI specs, markdown-to-HTML, URLs, regular expressions, Python code, and phone-number extraction.
  • Chunkers, conversations, prompts, prompt templates, chains, pipelines, service registries, state objects, and tracing helpers for application workflows.
  • Deprecated distance compatibility shims, vectors, vector stores, measurements, metrics, norms, similarities, and related numerical components.
  • Model adapter classes for LLM, tool LLM, embedding, image generation, STT, TTS, OCR, and VLM workflows where provider configuration is available.
  • Signing and key-provider components that align with Swarmauri's security-oriented interfaces.
  • Dynamic JSON, YAML, and TOML serialization through ComponentBase, DynamicBase, and SubclassUnion.
  • Python 3.10, 3.11, 3.12, 3.13, and 3.14 support.

Installation

Install with uv:

uv add swarmauri_standard

Install with pip:

pip install swarmauri_standard

Usage

Use standard components directly from their implementation modules:

from swarmauri_standard.tools.CalculatorTool import CalculatorTool

calculator = CalculatorTool()
result = calculator("add", 5, 3)

assert result == {"operation": "add", "calculated_result": "8.0"}

Create documents and serialize them as Swarmauri components:

from swarmauri_standard.documents.Document import Document

doc = Document(content="Composable intelligence infrastructure")
payload = doc.model_dump_json()
restored = Document.model_validate_json(payload)

assert restored.type == "Document"
assert restored.content == doc.content

Hydrate registered standard components through a base-family union:

from pydantic import BaseModel

from swarmauri_base.DynamicBase import SubclassUnion
from swarmauri_base.toolkits.ToolkitBase import ToolkitBase
from swarmauri_standard.toolkits.Toolkit import Toolkit


class ToolkitEnvelope(BaseModel):
    toolkit: SubclassUnion[ToolkitBase]


payload = ToolkitEnvelope(toolkit=Toolkit()).model_dump_json()
restored = ToolkitEnvelope.model_validate_json(payload)

assert isinstance(restored.toolkit, Toolkit)

Component Families

The package includes these standard component families:

  • Agents: QAAgent, RagAgent, SimpleConversationAgent, and ToolAgent.
  • Chains and workflow: callable chains, chain steps, context chains, prompt context chains, pipelines, service registries, swarms, and round-robin task management.
  • Text and document processing: chunkers, documents, conversations, prompts, prompt templates, parsers, messages, and schema converters.
  • Tools and toolkits: calculator, arithmetic, HTTP requests, JSON requests, code extraction, code interpretation, readability scoring, weather, temperature conversion, parameters, accessibility toolkit, and generic toolkit support.
  • Vector and numerical work: vectors, TF-IDF vector store, deprecated distance compatibility shims, measurements, metrics, norms, similarities, pseudometrics, seminorms, matrices, tensors, and inner products.
  • AI model surfaces: LLMs, tool LLMs, embeddings, image generators, OCR, STT, TTS, and VLM classes for supported providers.
  • Runtime support: decorators, tracing, transports, state, logging, and utility classes.
  • Trust and security surfaces: signing and key-provider components that align with Swarmauri's core interfaces.

Distance Migration

The swarmauri_standard.distances module remains available only as a deprecated compatibility surface. Prefer the active metric and similarity families instead:

  • CosineDistance -> CosineSimilarity
  • EuclideanDistance -> EuclideanMetric
  • LevenshteinDistance -> LevenshteinMetric
  • JaccardIndexDistance -> JaccardIndexSimilarity
  • SorensenDiceDistance -> DiceSimilarity
  • ChebyshevDistance -> SupremumMetric
  • ManhattanDistance -> LpMetric(p=1)
  • MinkowskiDistance -> LpMetric(p=<order>)
  • SquaredEuclideanDistance -> EuclideanMetric or GaussianRBFSimilarity, depending on whether you need metric or similarity semantics
  • CanberraDistance, ChiSquaredDistance, and HaversineDistance do not yet have active drop-in replacements in the workspace

Related Packages

Foundational packages:

  • swarmauri provides namespace imports and plugin discovery.
  • swarmauri_core provides the interfaces implemented by these standard components.
  • swarmauri_base provides component base classes, mixins, and serialization behavior.
  • swarmauri_typing provides dynamic typing utilities used by the component model.

Related component packages:

When To Use This Package

Use swarmauri_standard when you want maintained first-party implementations that are ready for examples, prototypes, tests, and production workflows where the included component behavior fits. Use smaller standalone component packages when you want a narrower dependency surface for a specific provider, algorithm, or runtime integration.

License

Apache-2.0

Contributing

When adding standard components, inherit from the matching swarmauri_base class, satisfy the swarmauri_core interface, register the component type, document direct instantiation, and follow the Swarmauri SDK contribution guide.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_standard-0.11.0.dev1.tar.gz (256.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swarmauri_standard-0.11.0.dev1-py3-none-any.whl (483.5 kB view details)

Uploaded Python 3

File details

Details for the file swarmauri_standard-0.11.0.dev1.tar.gz.

File metadata

  • Download URL: swarmauri_standard-0.11.0.dev1.tar.gz
  • Upload date:
  • Size: 256.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for swarmauri_standard-0.11.0.dev1.tar.gz
Algorithm Hash digest
SHA256 9dfab71544dc0cca18f26a30751288727f12ae8e735235ea79d1d4453421c1b5
MD5 40cf82e1b8a87dd51aa55567aeb396e5
BLAKE2b-256 3c77eb5471b2c40b06e198b2b332ae8fcd4882376cdf8a8505d0aeaa77e4e595

See more details on using hashes here.

File details

Details for the file swarmauri_standard-0.11.0.dev1-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_standard-0.11.0.dev1-py3-none-any.whl
  • Upload date:
  • Size: 483.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for swarmauri_standard-0.11.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae1c3813ba381c0f728c9d106cb3d3b74ca30cc72182f39cffb76d0f22b1abc6
MD5 0c27a139b5cc852e5f3bd38e3bbef07b
BLAKE2b-256 08e1915dfc56446c4ccc39fedf3c4768ebde7d214613a8e48daa59b78da77128

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page