Synth SDK for Index, Swarms, account access, and hosted MCP
pip install synth-ai==0.23.7 Copy PIP instructions
A typed Python client for Synth Index search with citations, Swarms research runs, account access, and hosted or local MCP. Python 3.11 or newer is required.
Swarms requires organization admission. An unavailable operation raises UnsupportedOperationError with code operation_unavailable. Inspect client.account.entitlements() for your organization's access conditions.
pip install synth-ai pip install 'synth-ai[mcp]' synth-ai login Use browser login or set SYNTH_API_KEY. Stored login credentials are reloaded on every authenticated call. SYNTH_API_URL overrides the default API origin, https://api.usesynth.ai. Anonymous Index search needs no login or API key.
from synth_ai import SynthClient from synth_ai.sdk.index import PublicSearchOptions with SynthClient.anonymous() as client: result = client.index.search("reproducible retrieval", options=PublicSearchOptions()) print(result.response) Authenticated search has an explicit maximum charge:
Catch SynthError for API and transport failures. Common types are AuthenticationError, RateLimitError, BudgetExceededError, RequestTimeoutError, and OutcomeUncertainError.
After OutcomeUncertainError, resolve the retained identity before deciding whether to submit new work: client.resolve_mutation(error.identity). MutationCancelledError derives from asyncio.CancelledError and also retains its mutation identity. A local timeout or closing a client does not cancel a run.
Requests have total deadlines. Reads retry transient failures with bounded jitter and honor Retry-After. Mutations are never automatically replayed. Call run.cancel(), run.pause(), or run.resume() for remote controls. Use a stable MutationOptions(idempotency_key=...) for recoverable writes.
Errors carry operation and request identifiers. Responses accept additive fields; unknown enum values remain visible. ClientOptions(strict_contract=True) requires exact schema hashes. Client options can borrow caller-owned HTTPX clients; closing the SDK leaves a borrowed client open. File-based login requires POSIX ownership and permissions; explicit API keys work on other platforms.
The source candidate extends the existing synth-ai CLI with read-only cloud account commands. Its version follows the SDK and MCP package:
synth-ai --version synth-ai login synth-ai auth status --json synth-ai account context --json synth-ai account plan synth-ai account balance synth-ai account alerts synth-ai account usage --days 7 --json synth-ai account logs --days 7 --limit 50 --json synth-ai account billing synth-ai account keys synth-ai account apps Billing, API-key lifecycle and connected-app management open the dashboard; these commands never purchase, change subscriptions or run workloads. Use --no-browser for a URL. Set SYNTH_DASHBOARD_URL to the dashboard origin when using a custom API origin. API-key setup also supports the existing synth-ai login --with-token stdin flow. Private-file storage and canonical SYNTH_API_KEY / SYNTH_API_URL precedence remain unchanged.
The new account reads require a backend serving account.v1 and explicit account scopes for financial data. Self-identity/context inspection is available to every valid customer credential, without workload capability discovery. account:read permits limits together with billing-read; account:billing:read permits plan/balance/alert settings, and usage/logs require both usage-read and billing-read. Existing credentials do not gain these grants automatically. Fresh OAuth consent names the account permissions. The existing account limits discovery command keeps its negotiated product-policy contract.
SDK sync/async clients expose account.context(), plan(), balance(), alerts(), limits(), usage(start, end) and events(start, end). Event reads return one bounded page and an explicit cursor. Dates must be timezone-aware; windows are bounded to 366 days. The CLI also accepts matching --from / --to timestamps and an optional --product filter for usage/logs.
JSON retains exact money coefficients/scales, original event IDs and string sequence numbers, pending/unknown values, source coverage and observation times. Successful reads exit 0, including explicitly partial observations; refused or unavailable operations exit 1, and invalid command/input exits 2. Account reads use their own observational protocol and do not claim Index/Swarms execution manifest qualification. Native issuer, installed-package and deployed-cohort acceptance remain required before release.
Forge workspaces organize scientific work independently of executable Swarms projects. The selected backend must admit these operations and the credential must carry explicit forge:read/forge:write scopes.
The MCP catalogue includes forge_project_get, forge_project_create, forge_project_update, forge_project_archive and forge_project_members. Scientific tools are forge_record_get, forge_record_write and forge_receipt_get; sync and async clients expose client.forge.records.get, client.forge.records.write and client.forge.receipts.get. Writes accept typed canonical records with an expected revision and stable mutation key. Recover the original receipt after response loss or admission expiry before another attempt. Manual results retain unverified status. Typed inputs are available from synth_ai.sdk.forge, including Protocol, Experiment, Trial, Review, and protocol/input observation types. Register a trial before execution; v2 state observations append immutable revisions with the registered parameters fixed. A rerun uses a new trial and exact parent_trial. Legacy records keep their original versions; native records carry explicit v2 envelopes, and execution-bound input claims need their owning verifier. Connections with admitted Forge tools can discover the packaged forge-research skill as a content-addressed MCP resource. Research runs pin that skill together with their admitted scientific tools and method/program versions. Workspace operations alone do not qualify a complete scientific Swarm or evaluator path.
Private Index handoff uses client.forge.index_drafts.create(project_id, export_revision, mutation=...) to allocate custody for an exact frozen export. Retain the original draft operation ID. Then call client.forge.index_drafts.upload(project_id, draft_operation_id, descriptor, mutation=...), or the forge_index_draft_upload MCP tool. The author supplies research metadata and an asset ID/role/path layout; the backend resolves frozen native Artifact bytes, digests, licenses and full credit. Current forge:read, index:intake and private Artifact grants are required. Transfer credentials stay inside the native upload service.
Preserve each mutation key on retry. Recover allocation with index_drafts.get and upload custody with index_drafts.upload_get(project_id, draft_operation_id, upload_operation_id). MCP exposes matching create/get and upload/upload_get tools. prepared, received and finalized distinguish reservation, received bytes and an exact native package reference. Finalized packaging leaves the Contribution private and in draft state; validation, scientific qualification, rights attestation and publication remain separate.
Explicit MCP validation can use index_contribution_submit with the finalized Contribution/revision IDs and its own retained mutation key. It calls the same existing Index submission operation as client.index.contributions.submit; new Forge workspace-source validation retains original source policy. Recover an uncertain submission by retrying its exact revision/key. Inspect current private owner state with index_contribution_owner_get, equivalent to client.index.contributions.get_owner. These tools require index:intake; current native ownership and source policy still apply. Submission, scientific qualification, rights attestation and publication remain separate operations.
Read private source corrections with client.forge.index_drafts.notices or forge_index_draft_notices, using the original project and draft operation IDs. Retain the exact Index release reference and scanned next_cursor; page with bounded after and limit. Current Forge read and Index intake/owner access remain required. Correct a frozen export under a new identity and record its exact typed source notice through admitted scientific authoring. The original sealed package bytes, Index qualification and public notice consent remain under their existing owners. Packaged research skill revision8 covers this path.
All 1 file in this release has provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
All 1 file in this release has been uploaded with provenance metadata.
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.
Jul 21, 2026 2 release files Loss of provenance
Jul 17, 2026 2 release files Loss of provenance
Jun 28, 2026 2 release files Loss of provenance
Jun 25, 2026 2 release files Loss of provenance
Jun 24, 2026 2 release files Loss of provenance
Apr 14, 2026 2 release files Loss of provenance
Mar 12, 2026 4 release files Incomplete provenance
Mar 5, 2026 2 release files Loss of provenance
Mar 3, 2026 2 release files Loss of provenance
Feb 24, 2026 2 release files Loss of provenance
Feb 3, 2026 2 release files Loss of provenance
Feb 1, 2026 2 release files Loss of provenance
Jan 31, 2026 4 release files Loss of provenance
Jan 30, 2026 1 release file Loss of provenance
Jan 27, 2026 2 release files Loss of provenance
Jan 24, 2026 2 release files Loss of provenance
Jan 23, 2026 2 release files Loss of provenance




