Catalog PyPI
PACKAGE EXPLORERView in registry

ai-layer-client

PyPI

Async Python client for the Nexus AI infrastructure API

Versions collected1
Direct dependencies2From release 0.2.0
Last observed21 Oct, 11:08 UTC

README

Version 0.2.0 documentation

nexus-client

Async Python client for the Nexus AI infrastructure API.

Install

pip install nexus-client

Quick start

import asyncio
from nexus_client import AILayerClient

async def main():
    client = AILayerClient(
        base_url="https://your-nexus-host/api",
        api_key="your-api-key",
    )

    agent = await client.create_agent(
        name="assistant",
        model="openai/gpt-4o-mini",
        system_prompt="You are a helpful assistant.",
    )
    thread = await client.create_thread(agent_id=agent["id"])

    async for event in client.stream_chat(
        agent_id=agent["id"],
        thread_id=thread["id"],
        message={"role": "user", "content": [{"type": "text", "text": "Hello!"}]},
    ):
        if event.type == "delta" and event.text:
            print(event.text, end="", flush=True)

asyncio.run(main())

See the full docs for all methods and stream event types.

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.2.07 May 20262

Package advisories

0
No matching advisories collected

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

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:08 UTC

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

Record identity

package:f854f194276beb88467f9f0aa4219b315664d1347090d08255c6c5fca501720b