Metadata-Version: 2.4
Name: aif-normative-agent
Version: 0.3.1
Summary: Norm-Native Agent SDK — Harness + Host loop over EDA / Normbase / Schemo HTTP APIs
License: Proprietary License
        
        Copyright (c) 2026 LangXAI. All rights reserved.
        
        The Agent Information Field (AIF) software, documentation, and related
        materials in this repository are proprietary and confidential.
        
        No part of this software may be copied, modified, merged, published,
        distributed, sublicensed, or sold without prior written permission from
        LangXAI.
        
        Access and use are permitted only for authorized users under applicable
        service terms, license agreements, or other written authorization from
        LangXAI.
        
        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
        LANGXAI 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.
        
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.26.0
Requires-Dist: aiohttp>=3.9.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Dynamic: license-file

# aif-normative-agent

PyPI distribution for the **Norm-Native Agent SDK** (`normative_agent`).

Thin HTTP client + Host tool loop over remote **EDA**, **Normbase**, and **Schemo** APIs. Does **not** ship Normbase, EDA server, Platform, MCP adapters, or Facilitator code.

Sibling package: [`aif-mcp`](../aif-mcp/README.md) (MCP tool surface over the same HTTP APIs).

## Install

```bash
pip install aif-normative-agent
```

Editable install from monorepo (full-stack development):

```bash
pip install -e .
# at AIF repository root (aif-normbase)
```

SDK-only wheel build (this directory):

```bash
cd packaging/normative-agent
python sync_sources.py
python -m build --wheel
python verify_wheel.py dist/aif_normative_agent-0.3.1-py3-none-any.whl
python verify_wheel_imports.py dist/aif_normative_agent-0.3.1-py3-none-any.whl
```

Or from repo root:

```bash
pwsh ./scripts/publish/publish_normative_agent.ps1
```

## Verify import

```bash
python -c "from normative_agent import NormativeAgent; print('ok')"
```

## Configuration

| Variable | Purpose |
|----------|---------|
| `AIF_AGENT_API_KEY` | Agent API key for `NormativeAgent.from_api_key` |
| `EDA_BASE_URL` | EDA HTTP API (default `http://localhost:8002`) |
| `NORMBASE_BASE_URL` | Normbase HTTP API (default `http://localhost:8001`) |
| `SCHEMO_QUERY_BASE_URL` | Schemo read API |
| `AIF_INTERNAL_SERVICE_TOKEN` | Optional internal Bearer for mixed deployments |

## Monorepo note

Source lives under `normative_agent/`, plus shared helpers `ontology/schemo/client`, `ontology/schemo/contracts`, and `security/auth` (same shared layer as `aif-mcp`).

Norm bind **build** logic stays in `eda_agent/norm_projection.py` (server). SDK formats EDA `bound_norm_projections` via `normative_agent.harness.projection_format`.

Developer guide: `normative_agent/docs/developer-guide.md` in the AIF monorepo (not shipped in the wheel).

Host app devkit: `docs/agent-app-devkit/` in the AIF repository.

Publish: `pwsh ./scripts/publish/publish_normative_agent.ps1`

## Package scope

Bundled:

- `normative_agent` (Harness + Host)
- `ontology.schemo.client` / `contracts`
- `security.auth`

Not bundled:

- `eda_agent`, `normbase`, `aif_platform`, `integrations`, `llm`, SDK docs under `normative_agent/docs/`

Optional LLM semantic governance uses monorepo `llm` or inject your own `ToolCallingModel` / `SemanticTriggerClassifier`.
