Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Managed Agents Python SDK

Generated preview 1.0.0a2, requires Python 3.11+. This is a breaking redesign. This version has not been published to PyPI; install this checkout with python -m pip install .. Package: umanaged-agents-py; import: umanaged_agents.

from umanaged_agents import Client

with Client() as client:  # MANAGED_AGENTS_API_URL / MANAGED_AGENTS_API_KEY
    models = client.models.list_models()
    print(models)

Every operation has generated, typed resources and request/response models under umanaged_agents.api / umanaged_agents.models. API methods use OpenAPI operation IDs in snake_case, for example client.sessions.create_session(request_session_create=...).

with Client() as client:
    turn = client.start_turn("session-id", "Hello", idempotency_key="unique-request-id")
    result = turn.wait(timeout=60)
    print(result.status, result.answer, result.pending_actions)
    # Explicit approval or function results only; the SDK does not execute/approve them.
    # turn.confirm("tool-use-id", "allow")
    # turn.submit_function_result("custom-tool-use-id", "result")

client.sessions.stream_events(id) returns an incremental typed SSE iterator. Use with to close it; event.actual_instance is the discriminated model. client.follow(id, reconnects=2) explicitly combines stream-first subscription with cursor-paged history; it deduplicates overlap and delivers processed_at updates. Exiting a generator early requires its .close() (or contextlib.closing). Client.close closes active streams. Malformed events fail immediately; only transport loss/EOF is eligible for bounded reconnection. Neither closing a stream nor a local wait timeout interrupts the remote Turn.

client.pages("listEvents", id="session-id", order="asc") follows contract pagination with loop detection. client.upload_file(path) sends SHA-256 checked parts; client.download_file(id, binary_destination) streams bytes to a file-like destination. No HTTP request is automatically replayed. Pass an idempotency key when retrying a supported write yourself. HTTP errors use umanaged_agents.exceptions.ApiException.

Only MANAGED_AGENTS_* variables are read. Set MANAGED_AGENTS_CA_FILE for a private CA; TLS verification stays enabled. Authentication is never forwarded through redirects. No token-level deltas or async client are advertised. See AGENTS.md and SOURCE-MANIFEST.json for the controlled generation policy.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages