Skip to main content

Core abstractions for Agentivium agent-native systems.

Project description

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

pip install agentivium-core

For local development:

pip install -e ".[dev]"

Extend the core

Domain packages subclass schemas and implement interfaces:

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

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.

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, API reference, extension guide, and examples. The complete v0.1 rationale and boundaries are preserved in the original design guideline.

Project details


Download files

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

Source Distribution

agentivium_core-0.2.0.tar.gz (57.0 kB view details)

Uploaded Source

Built Distribution

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

agentivium_core-0.2.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file agentivium_core-0.2.0.tar.gz.

File metadata

  • Download URL: agentivium_core-0.2.0.tar.gz
  • Upload date:
  • Size: 57.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Rocky Linux","version":"9.7","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentivium_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 be35a194d38d1281b136502caba13d30896e38dd19d345024251fff7cd9170eb
MD5 b3e47f71cf78bbc9060434ab49a0c9da
BLAKE2b-256 ce392e3d026d95de6405db98d34dc7792df367cfb1fd8708f25bb0d5644e762b

See more details on using hashes here.

File details

Details for the file agentivium_core-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentivium_core-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Rocky Linux","version":"9.7","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentivium_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8c1079262c3cd9c485c7641c430fe10c9011181ef99563e52d94c5db2663c1a
MD5 25e352a80eab8695de08e589ac9661af
BLAKE2b-256 0cebaa83f3f44666b89edb0d94a2bea8ff4142c023be9609284eb3c761158b28

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