Metadata-Version: 2.4
Name: agentomy-agent
Version: 0.3.1
Summary: Embedded AI agent governance peer. Standalone or connected to Agentomy infrastructure.
Author-email: Agentomy <governance@agentomy.com>
License: MIT
Project-URL: Homepage, https://agentomy.com
Project-URL: Documentation, https://agentomy.com/docs
Project-URL: Source, https://github.com/getagentomy
Keywords: governance,ai-agents,security,compliance
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# agentomy-agent

Embedded AI Agent Governance Peer. Drop it into any agent session to get real-time governance assessment, flag reporting, and GovernanceBench scoring.

**License:** MIT | **Requires:** Python 3.9+

## Installation

```bash
pip install agentomy-agent
```

## Quick start

```bash
# Detect local LLMs and print the governance system prompt
agentomy-agent init

# Start a governed session (prints governance context + system prompt)
agentomy-agent session --model llama3.1:70b --scope security-research

# Check governance state
agentomy-agent status

# Connect to Agentomy infrastructure (6/6 mode)
agentomy-agent status --infra http://localhost:3000
```

## What it does

The Agentomy Agent is a governance peer -- not a wall. It observes, assesses, flags, and summarises. It does not block or halt. Enforcement belongs to the human operator.

**Standalone mode:** 3/6 GovernanceBench dimensions.
- Authorization: is the agent operating within its assigned scope?
- Behavioral Integrity: is the agent's behavior consistent with its stated purpose?
- Auditability: every flag and every confirmed clean action is appended to a SHA-256 hash chain inside the session, exportable with `session.audit_chain()` and verifiable with `verify_audit_chain()`; the head hash is the session's verification hash.

**Connected mode:** 6/6 GovernanceBench dimensions.
- Adds: a centralized, non-repudiable audit trail + Override Capability (verified kill switch) + OWASP coverage + message governance

## Governance system prompt

The governance system prompt is bundled in the package. Paste it into any LLM session to activate the Agentomy Agent:

```bash
agentomy-agent init --full-prompt
```

Or access it in Python:

```python
from agentomy_agent.prompt import SYSTEM_PROMPT
print(SYSTEM_PROMPT)
```

## Ollama MCP integration

Start the MCP server:

```bash
agentomy-agent serve
# Listening on http://127.0.0.1:8765
```

Add to your Ollama MCP config (`~/.ollama/mcp.json`):

```json
{
  "mcpServers": {
    "agentomy": {
      "url": "http://127.0.0.1:8765",
      "description": "Agentomy Agent -- Embedded AI Agent Governance Peer"
    }
  }
}
```

The MCP server exposes two tools:
- `agentomy_prompt` -- returns the full governance system prompt
- `agentomy_status` -- returns current governance state (standalone mode)

## Model recommendations

Use a frontier model (Claude, GPT-5.x, Gemini) or a local model of 32B+ parameters for reliable governance assessment. Models below 14B may produce false governance confidence.

```bash
# Check what you have installed
agentomy-agent init
```

The `init` command probes Ollama (localhost:11434) and LM Studio (localhost:1234) and reports available models with size tags and recommendations.

## Python API

```python
from agentomy_agent.governance import GovernanceSession, check_model_capability, verify_audit_chain
from agentomy_agent.detector import detect_all
from agentomy_agent.prompt import SYSTEM_PROMPT

# Detect local LLMs
providers = detect_all()
for p in providers:
    print(p["provider"], [m["name"] for m in p["models"]])

# Check model capability
cap = check_model_capability("llama3.1:70b")
print(cap["level"], cap["message"])  # degraded / full / warning

# Track a governance session
session = GovernanceSession(model="llama3.1:70b", connected=False)
session.record_clean()
session.record_flag("HIGH", "tool call outside scope", "accessed /etc/passwd", "Authorization")
print(session.summary())

# The audit chain: hash-linked, oldest first; verification recomputes every link
chain = session.audit_chain()
print(verify_audit_chain(chain))  # (True, None); a tampered or truncated chain returns (False, index)
```

## Standalone mode vs connected mode

| | Standalone mode | Connected mode |
|---|---|---|
| GovernanceBench score | 3/6 | 6/6 |
| Authorization assessment | Yes | Yes |
| Behavioral Integrity | Yes | Yes |
| Tamper-evident audit trail | In-session hash chain, exportable | Centralized, non-repudiable |
| Fleet-level kill switch | No | Yes |
| VIGIL threat detection | Observation only | 148 scenarios, scored |
| Shadow AI discovery | No | Yes |
| GDPR Article 22 | No | Yes |

Standalone mode needs no infrastructure. Connected to the Agentomy infrastructure layer, the same agent scores all six dimensions.

## Connect

- Infrastructure integration: [agentomy.com/integrations](https://agentomy.com/integrations)
- Enterprise deployment: governance@agentomy.com
- GitHub: [github.com/getagentomy](https://github.com/getagentomy)
