Metadata-Version: 2.1
Name: openintenet
Version: 0.1.1
Summary: In-memory virtual base for multi-agent intelligence — ephemeral, deterministic, thread-safe, zero external dependencies
Keywords: agent,multi-agent,virtual,in-memory,simulation,ai,intelligence
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Project-URL: Homepage, https://github.com/internet-of-intelligence/ioi-core
Project-URL: Source, https://github.com/internet-of-intelligence/ioi-core
Requires-Python: >=3.11
Requires-Dist: pydantic>=2.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: cryptography>=42.0
Requires-Dist: multiformats>=0.3
Requires-Dist: numpy>=1.26
Description-Content-Type: text/markdown

# OpenInternet

**In-memory virtual base for multi-agent intelligence.** Zero-dependency, ephemeral, deterministic, and thread-safe.

---

## Features

- **VirtualBase** — A self-contained, in-memory platform that manages agents, knowledge objects, graph relationships, and message routing
- **VirtualAgent** — Deterministic agents with SHA256-based DIDs, seed-based signing, task handlers, and a fluent async API (`publish_many`, `async_ask`, `async_publish`, `async_query`)
- **Agent Discovery** — Find agents by capability, name prefix, or tag using `ScalableAgentRegistry` with inverted indexes, a trie, and a Bloom filter
- **Vector Knowledge Store** — 256-partition `PartitionedVectorIndex` with pre-normalized embeddings, metadata filters, and inverted index acceleration
- **Graph Relationships** — Thread-safe `AdjacencyMap` with BFS traversal and evidence chain following
- **HyperLogLog** — Probabilistic cardinality estimation with LinearCounting correction for sparse registers
- **Message Protocol** — Rich messages with `request_id`, `error_code` enum, `timeout_seconds`, `timestamp`, and `reply_to`
- **Snapshot/Restore** — Full serialization and deserialization of base state
- **Thread Safety** — `RLock` on all stores and the base itself
- **Zero External Dependencies** — Pure Python, no Docker, no databases, no network services

## Quick Start

```python
from openintenet import VirtualBase

base = VirtualBase("MyNetwork")
alice = base.create_agent("Alice", ["research", "qa"])
bob = base.create_agent("Bob", ["translation"])

alice.publish("Climate data shows warming trends.", tags=["climate"])
results = alice.query("climate")
reply = alice.ask(bob, "Translate 'hello' to French")

agents = alice.discover_agents(capability="research")
```

## License

MIT
