Catalog PyPI
PACKAGE EXPLORERView in registry

ainative-agent

PyPI

Python SDK for AINative Agent APIs - agents, swarm, memory, graph, vectors, chat, files, tables, threads, events

agent-cloudagent-sdkagentic-aiai-agentsainativeautonomous-agentsgraphragmcpopenclawpythonswarmx402zerodbzeromemory
Versions collected1
Direct dependencies11From release 0.1.0
Last observed21 Oct, 11:26 UTC

README

Version 0.1.0 documentation

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

ModuleDescription
client.agentsAgent registration, keys, and audit (AAP)
client.tasksSwarm task submission and polling
client.memoryZeroMemory: remember, recall, forget, reflect
client.graphContext graph: entities, edges, GraphRAG, ontology
client.vectorsVector embeddings: upsert, search, delete
client.filesFile storage: upload, download, presigned URLs
client.tablesNoSQL tables: create, query, insert, update
client.chatChat completions with streaming
client.threadsConversation threads
client.eventsReal-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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.020 Apr 202611

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ainative-studio/core

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d7e66dd918c85f9fe0aa042d8800c6daa87985b4a324f82712250d121d760b64