ainative-agent
Python SDK for all AINative Agent APIs -- agents, swarm tasks, memory, graph, vectors, chat, files, tables, threads, and real-time events.
Install
pip install ainative-agent
Quick Start
import asyncio
from ainative_agent import AINativeClient
async def main():
async with AINativeClient(api_key="sk-your-key") as client:
# Register an agent
agent = await client.agents.register(
"my-agent", "worker", ["read", "write"]
)
# Store a memory
memory = await client.memory.remember(
"User prefers dark mode",
entity_id="user-123",
importance=0.8,
)
# Recall memories
results = await client.memory.recall("user preferences", entity_id="user-123")
# Submit a swarm task
task = await client.tasks.submit(
"Analyze error logs from last 24h",
agent_types=["analyst"],
)
# Poll until complete
async for update in client.tasks.poll(task.task_id):
print(f"Status: {update.status}")
asyncio.run(main())
Modules
| Module | Description |
|---|---|
client.agents |
Agent registration, keys, and audit (AAP) |
client.tasks |
Swarm task submission and polling |
client.memory |
ZeroMemory: remember, recall, forget, reflect |
client.graph |
Context graph: entities, edges, GraphRAG, ontology |
client.vectors |
Vector embeddings: upsert, search, delete |
client.files |
File storage: upload, download, presigned URLs |
client.tables |
NoSQL tables: create, query, insert, update |
client.chat |
Chat completions with streaming |
client.threads |
Conversation threads |
client.events |
Real-time WebSocket events |
Authentication
The SDK supports two authentication methods:
# API Key (recommended for server-side)
client = AINativeClient(api_key="sk-your-key")
# JWT Token (for user-scoped access)
client = AINativeClient(token="eyJ...")
Error Handling
from ainative_agent import AINativeClient, AuthenticationError, RateLimitError, APIError
async with AINativeClient(api_key="sk-key") as client:
try:
agent = await client.agents.get("nonexistent")
except AuthenticationError:
print("Invalid credentials")
except RateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
except APIError as e:
print(f"API error {e.status_code}: {e.message}")
Retry Behavior
The SDK automatically retries requests on transient errors (429, 5xx) with exponential backoff, up to 3 attempts.
License
Apache-2.0
Metadata
Release files for ainative-agent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ainative_agent-0.1.0.tar.gz | 25.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ainative_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.4 kB
Release files / ainative_agent-0.1.0.tar.gz
| Download URL | ainative_agent-0.1.0.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f885233ce34ad1bfe81f101f7b0f2051834f664451229d421e8891147cf24a5a
|
|
BLAKE2b-256 checksum How to use checksums |
07146198dcefa9c77975281d0737e82e096ac6bc43a3d35d904042372fe68d04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / ainative_agent-0.1.0-py3-none-any.whl
| Download URL | ainative_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0c63fc69453265f8f42d7f16c2a369f3a33328f54008e64d976ea5b5207c003
|
|
BLAKE2b-256 checksum How to use checksums |
7d99f7ec292dacda079c41ebb17f1acfd26368db701f086f1538afaf8a527f8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for ainative-agent 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.