Metadata-Version: 2.4
Name: agentivium-core
Version: 0.2.0
Summary: Core abstractions for Agentivium agent-native systems.
Author: Agentivium AI
License: MIT License
        
        Copyright (c) 2026 Agentivium AI
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: pydantic<3,>=2.0
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# Agentivium Core

`agentivium-core` defines the small, domain-neutral contracts shared by
Agentivium agent-native systems. It provides typed schemas and abstract
interfaces for intent parsing, policy validation, planning, tool adaptation,
provider-neutral LLM calls, execution tracing, and evaluation.

It is not an agent runtime, a provider-specific LLM wrapper, or a domain
implementation. Schedulers, provider clients, policies, and orchestration
belong in extension packages.

## Install

```bash
pip install agentivium-core
```

For local development:

```bash
pip install -e ".[dev]"
```

## Extend the core

Domain packages subclass schemas and implement interfaces:

```python
from agentivium_core.intent import IntentIR, IntentParser


class MyIntentIR(IntentIR):
    domain: str = "my_domain"
    task: str


class MyIntentParser(IntentParser):
    def parse(
        self,
        request: str,
        context: dict[str, object] | None = None,
    ) -> MyIntentIR:
        return MyIntentIR(raw_request=request, task=request)
```

The dependency direction stays one-way: domain packages import
`agentivium_core`; the core never imports a domain package.

## Public API

```python
from agentivium_core.intent import IntentIR, IntentParser
from agentivium_core.planner import ActionPlan, Planner
from agentivium_core.policy import (
    PolicyValidator,
    ValidationIssue,
    ValidationResult,
)
from agentivium_core.tools import ToolAdapter
from agentivium_core.trace import ExecutionTrace
from agentivium_core.eval import EvaluationRecord
```

## Provider-neutral LLM abstraction

`agentivium-core` defines `LLMClient`, `LLMRequest`, `LLMResponse`,
`PromptTemplate`, `StructuredOutputSpec`, and `LLMCallTrace` so downstream
packages can use LLMs without coupling core to OpenAI, Anthropic, Gemini,
Ollama, vLLM, llama.cpp, or any other provider.

```python
from agentivium_core.llm import (
    LLMClient,
    LLMRequest,
    LLMResponse,
    PromptTemplate,
)


class MyLocalLLMClient(LLMClient):
    def generate(self, request: LLMRequest) -> LLMResponse:
        return LLMResponse(content='{"intent": "example"}', model="local")


template = PromptTemplate(
    name="intent_parser",
    system="You extract structured intent.",
    user_template="Request: {request}",
)

messages = template.render({"request": "Run a small MPI job."})
client = MyLocalLLMClient()
response = client.generate(LLMRequest(messages=messages))
print(response.content)
```

Production provider clients live in domain or provider packages. Core only
defines the contracts and a `MockLLMClient` for tests and demos.

See the [concepts](docs/concepts.md), [API reference](docs/api.md),
[extension guide](docs/extension_guide.md), and
[examples](docs/examples.md). The complete v0.1 rationale and boundaries are
preserved in the original [design guideline](docs/design-guideline.md).
