Python native client
Install from authorized private Argand source. These SDKs are not published on external package registries.
Hosted MCP endpoint
Streamable HTTPhttps://beta.argand.org/api/mcp No local install needed. Configure your own instance URL to self-host.
Run the checked-in example
Use a reviewed signed checkout. The SDK paths below are part of that checkout; you need private Forgejo access. Dependencies may be obtained from their normal sources, but no Argand package is uploaded by these commands.
# From an authorized private checkout
python -m pip install ./sdk/python
python sdk/python/examples/native_search.py rust Keep the actual evidence
This is the current checked-in native Search example. Set ARGAND_API_BASE for a different instance. Titles can be absent; source evidence and serving collection remain available.
"""Query the actual serving collection using both public Python clients."""
from __future__ import annotations
import asyncio
import json
import os
import sys
from argand import ArgandClient, AsyncArgandClient, SearchResponse
def summary(response: SearchResponse) -> dict:
if not response.collection_id or not response.results:
raise RuntimeError("Live retrieval did not provide a collection and source results")
return {
"collection_id": response.collection_id,
"page": response.page,
"has_more": response.has_more,
"sources": [
{"doc_id": hit.doc_id, "url": hit.url, "title": hit.title, "provenance": hit.provenance}
for hit in response.results
],
}
async def main() -> None:
query = sys.argv[1] if len(sys.argv) > 1 else "rust"
base = os.environ.get("ARGAND_API_BASE", "https://beta.argand.org")
with ArgandClient(base_url=base) as client:
sync = summary(client.search(query))
async with AsyncArgandClient(base_url=base) as client:
asynchronous = summary(await client.search(query))
print(json.dumps({"sync": sync, "async": asynchronous}, indent=2))
if __name__ == "__main__":
asyncio.run(main())
Error and precision contracts
Responses are bounded to two MiB decoded data. The SDKs validate required native evidence and refuse unsupported operations; they do not fabricate successful results after failures. Python and Rust retain integer coordinates. TypeScript retains large integers as BigInt where native JSON token context is available, or refuses unsafe values. Its decimal-string JSON export preserves their digits.
HTTP client or MCP client?
These SDKs read native Search HTTP responses. Use a standards-compatible MCP client when you need tools/call or resources/read. Captured-source fetch and citation are MCP contracts, not implemented SDK REST methods.