Metadata-Version: 2.5
Name: spec-agents-core
Version: 0.7.0
Summary: Spec-driven pipelines and hierarchical agents (PydanticAI, DSPy, CrewAI, LangChain) over a LiteLLM proxy
Project-URL: Homepage, https://github.com/marcionicolau/spec-agents
Project-URL: Repository, https://github.com/marcionicolau/spec-agents
Project-URL: Issues, https://github.com/marcionicolau/spec-agents/issues
Project-URL: Changelog, https://github.com/marcionicolau/spec-agents/blob/main/packages/agent-fabric/CHANGELOG.md
Project-URL: Documentation, https://github.com/marcionicolau/spec-agents/tree/main/docs
Author: Marcio Nicolau
License-Expression: MIT
License-File: LICENSE
Keywords: agents,llm,pipelines,pydantic,specs
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: numpy>=1.26
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=13.7.1
Provides-Extra: all
Requires-Dist: crewai>=0.100; extra == 'all'
Requires-Dist: dspy>=3.0; extra == 'all'
Requires-Dist: langchain-core>=0.3; extra == 'all'
Requires-Dist: pandas>=2.1; extra == 'all'
Requires-Dist: pydantic-ai-slim[openai]>=1.0; extra == 'all'
Provides-Extra: crewai
Requires-Dist: crewai>=0.100; extra == 'crewai'
Provides-Extra: dspy
Requires-Dist: dspy>=3.0; extra == 'dspy'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == 'langchain'
Provides-Extra: proxy
Requires-Dist: litellm[proxy]>=1.60; extra == 'proxy'
Provides-Extra: pydantic-ai
Requires-Dist: pydantic-ai-slim[openai]>=1.0; extra == 'pydantic-ai'
Provides-Extra: tabular
Requires-Dist: pandas>=2.1; extra == 'tabular'
Description-Content-Type: text/markdown

# spec-agents-core (`agent_fabric`)

Domain-agnostic core for **spec-driven pipelines and hierarchical agents**. Components, pipelines and agents are declared in Markdown
with YAML frontmatter (`SKILL.md`, `AGENT.md`, `fabric.md`); the frontmatter is a contract validated by Pydantic and the body is guidance
injected into prompts on demand. LLMs plan, delegate, repair and interpret — **they never compute**: every result comes from
deterministic `Component.compute()` code run by the `PipelineExecutor`.

> **Install:** `pip install spec-agents-core` ([PyPI](https://pypi.org/project/spec-agents-core/)); wheels and sdists are also attached to each
> [GitHub Release](https://github.com/marcionicolau/spec-agents/releases) (`agent-fabric-vX.Y.Z`).

## Names

| | |
| --- | --- |
| PyPI distribution | `spec-agents-core` |
| Import name | `agent_fabric` |
| Directory in the monorepo | `packages/agent-fabric` |
| Release tag / PR scope | `agent-fabric-vX.Y.Z` / `agent-fabric` |

The distribution is named `spec-agents-core` because the shorter names are taken on PyPI; the import name and the entry point do not change.

## Install
```bash
pip install spec-agents-core                  # core: pydantic, numpy, pyyaml, rich (import name: agent_fabric)
pip install "spec-agents-core[tabular]"       # + pandas (dataframe artifact types)
pip install "spec-agents-core[all]"           # + PydanticAI, DSPy, CrewAI, LangChain adapters
```
Domain packs ([statistics](../statistics/README.md), [lakehouse](../lakehouse/README.md), [coworker](../coworker/README.md),
[text-pack](../text-pack/README.md)) register themselves through the `agent_fabric.domains` entry point.

## Use
```bash
agent-fabric catalog --skills path/to/skills     # list components and pipelines
agent-fabric agents path/to/config               # render and validate an agent tree
agent-fabric lint --agents path/to/config --strict
agent-fabric run path/to/config "task" --input name=file.txt
```
```python
from agent_fabric import build_registry
from agent_fabric.agents import AgentFabric, AgentsConfig

fabric = AgentFabric(build_registry(discover=True), AgentsConfig.load("config"))
report = fabric.run("question", {"data": df}, session_id="s1")
```

Optional frameworks are imported lazily; models are referenced by LiteLLM alias only. See the repository
[docs](../../docs/README.md) for the architecture, the error model and how to add components, pipelines and agents.
