Metadata-Version: 2.4
Name: autogen-verigent
Version: 0.2.0
Summary: Verigent trust verification for Microsoft AutoGen multi-agent systems
Project-URL: Homepage, https://verigent.ai
Project-URL: Repository, https://github.com/verigentai/autogen-verigent
Author: verigentai
License-Expression: MIT
Keywords: autogen,multi-agent,trust,verification,verigent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: pyautogen>=0.2.0
Description-Content-Type: text/markdown

# autogen-verigent

Trust verification for Microsoft AutoGen multi-agent systems.

## The Problem

When multiple AI agents collaborate in an AutoGen GroupChat, you have no way to verify their capabilities or prioritise the right agent for a given task. Agents self-declare what they can do — there's no independent trust signal.

**autogen-verigent** integrates [Verigent](https://verigent.ai) trust keys into AutoGen's speaker selection, so agents with verified capabilities get priority for relevant tasks.

## Install

```bash
pip install autogen-verigent
```

## Quick Start

```python
from autogen import AssistantAgent, UserProxyAgent
from autogen_verigent import VerigentAgent, VerigentGroupChat

# Create your agents as normal
coder = AssistantAgent(name="coder", system_message="You write code.")
reviewer = AssistantAgent(name="reviewer", system_message="You review code.")
user = UserProxyAgent(name="user")

# Wrap with Verigent identity
vg_coder = VerigentAgent(
    coder,
    "VG:CODER-01:V4-ARCH·Se4Op7An5Ar9Co2Ad6St8Sc3Sa5So1Br2Fo6"
)
vg_reviewer = VerigentAgent(
    reviewer,
    "VG:REVIEWER-02:V3-ANAL·Se6Op3An8Ar4Co5Ad3St7Sc6Sa7So2Br1Fo2"
)

# Create trust-aware GroupChat
group = VerigentGroupChat(
    agents=[vg_coder, vg_reviewer, user],
    task_type="code",  # prioritises Architect, Forge, Analyst scores
    max_round=12,
)
```

## Trust-Weighted Speaker Selection

When `VerigentGroupChat` selects the next speaker, it:

1. Parses each agent's VG key (tier + 12 class scores)
2. Computes a relevance score based on the `task_type`
3. Combines tier (40%) and relevance (60%) into a composite weight
4. Selects the highest-scoring eligible agent

### Task Types

| Task Type | Prioritised Classes |
|-----------|-------------------|
| `code` | Architect, Forge, Analyst |
| `analysis` | Analyst, Sage, Scout |
| `communication` | Conduit, Broker, Adaptor |
| `security` | Sentinel, Steward, Scout |
| `research` | Scout, Sage, Analyst |
| `coordination` | Conduit, Steward, Sovereign |
| `creative` | Forge, Adaptor, Sage |
| `operations` | Operative, Steward, Sentinel |
| `strategy` | Sovereign, Architect, Sage |
| `execution` | Operative, Forge, Sentinel |

## VG Key Format

```
VG:{NAME}-{SUFFIX}:{TIER}-{PRIMARY}·{12×class_code+digit}
```

Example: `VG:JARVIS-0A:V3-ARCH·Se4Op7An5Ar9Co2Ad6St8Sc3Sa5So1Br2Fo6`

- **Tier**: V0 (unverified) to V6 (maximum trust)
- **Primary**: Dominant capability class
- **Scores**: 12 class scores (0-9), each representing verified capability

## Transparency Log

Access the trust decision log for auditability:

```python
for entry in group.trust_log:
    print(entry["selected"], entry["candidates"])
```

## API Reference

### `VerigentAgent(agent, vg_key)`
Wraps a ConversableAgent with Verigent identity. Injects the key into the system message and parses keys from incoming messages.

### `VerigentGroupChat(agents, task_type, trust_bias, ...)`
Extends GroupChat with trust-weighted speaker selection. Set `trust_bias=0` to disable trust influence, `trust_bias=1` for pure trust-based selection.

### `parse_key(text) -> VGKey | None`
Parse a VG key from any text string.

### `evaluate_trust(key, task_type) -> TrustScore`
Compute trust score for a key given a task context.

## Links

- [Verigent](https://verigent.ai) — Agent trust verification
- [AutoGen](https://github.com/microsoft/autogen) — Multi-agent framework
- [PyPI](https://pypi.org/project/autogen-verigent/)

## License

MIT
