Registry / ai-ml / agentex-sdk

agentex-sdk

JSON →
library0.12.0pypypi✓ verified 84d ago

The official Python library for the Agentex API. Currently at version 0.12.0, with active development. Provides client classes for interacting with Agentex services, including agents, runs, and threads. Released under an MIT license.

pip install agentex-sdk
INSTALL
IMPORT
SIG · AGENTEX-SDK
A
agentex-sdk
ai-mlpythonv0.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Agentex
from agentex import Agentex
from agentex_sdk import Agentex
Package name 'agentex-sdk' maps to import 'agentex'.
Stream
from agentex import Stream
Stream class for streaming responses.

Initialize the client with an API key from environment variable, then create a run or stream.

import os from agentex import Agentex client = Agentex(api_key=os.environ.get('AGENTEX_API_KEY', '')) # Create a run run = client.runs.create( agent_id='agent-id', input='Hello, world!' ) print(run.id) # Stream a run stream = client.runs.create_stream( agent_id='agent-id', input='Tell me a story' ) for event in stream: print(event)
Debug
Known issues
breakingv0.12.0 changed the return type of runs.create_stream from a list to a generator. Code expecting a list will break.
fix
Iterate over the stream directly (e.g., for event in stream: ... ) instead of indexing.
affects: >=0.12.0
deprecatedThe 'agent_id' parameter in runs.create has been deprecated in favor of 'assistant_id' in newer versions (not yet released). Prepare to update.
fix
Use 'assistant_id' instead of 'agent_id' when available.
affects: >=0.11.0
gotchaThe client does not automatically retry on rate limits (HTTP 429). You must implement retry logic or handle the error.
fix
Wrap API calls in a retry decorator, e.g., using tenacity.
affects: <1.0.0
Errors
Common errors & fixes
ImportError: cannot import name 'Agentex' from 'agentex_sdk'
Wrong import path: package is 'agentex', not 'agentex_sdk'.
fix
Use: from agentex import Agentex
TypeError: 'Stream' object is not subscriptable
Trying to index into a Stream object, which is a generator in v0.12.0.
fix
Iterate over the stream: for event in client.runs.create_stream(...): print(event)
Upgrade
Version history
0.12.0latest on PyPI · released Jun 2, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
52 hits · last 30 days
node
47
OpenAI (training)
1
Resources
agentex-sdk — pip install agentex-sdk · libregistry