Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

roosted

roosted is the lightweight Python SDK for the Rooster agent API.

Install

pip install roosted
export ROOSTER_API_KEY="your-shared-api-key"

If you are working from this repository directly, the packaged client dependencies are also listed in rooster-sdk/requirements.txt.

The SDK defaults to the provider-hosted endpoint:

https://weirdpablo--rooster-api.modal.run

Override it with base_url=... or ROOSTER_BASE_URL if you are targeting another deployment.

60-Second Start

from roosted import RoosterClient

with RoosterClient() as client:
	result = client.invoke(
		"Give me a tight market update on BTC.",
		services=False,
		cache=False,
	)
	print(result["final_response"])

That works because:

  • the SDK defaults to https://weirdpablo--rooster-api.modal.run
  • the SDK reads ROOSTER_API_KEY automatically

Quick Start

import os
from roosted import RoosterClient

client = RoosterClient(api_key=os.environ["ROOSTER_API_KEY"])

response = client.invoke(
	"Give me a terse overview of crude oil today.",
	model_name="district/1984-m3-0317",
	services=False,
	cache=False,
)

print(response["final_response"])
client.close()

Streaming

import os
from roosted import RoosterClient

with RoosterClient(api_key=os.environ["ROOSTER_API_KEY"]) as client:
	for event in client.stream(
		"Research Nvidia's latest earnings and summarize the key points.",
		services=True,
		service_names=["search_web", "read"],
		cache=True,
		max_iterations=6,
	):
		print(event["type"], event["data"])

Health Check

from roosted import RoosterClient

with RoosterClient() as client:
	print(client.health())

health() does not require authentication.

The SDK yields parsed SSE payloads as dictionaries. Typical event types are:

  • accepted
  • run_started
  • model_start
  • model_delta
  • model_response
  • service_call
  • service_response
  • result
  • completed
  • error

Async Client

import asyncio
import os
from roosted import AsyncRoosterClient


async def main():
	async with AsyncRoosterClient(api_key=os.environ["ROOSTER_API_KEY"]) as client:
		response = await client.invoke(
			"Tell me whether gold is trending or ranging.",
			services=False,
			cache=False,
		)
		print(response["final_response"])


asyncio.run(main())

Payload Options

The SDK maps directly to the API request body. The most important options are:

  • task_input
  • model_name
  • services
  • service_names
  • cache
  • max_iterations
  • reasoning_effort
  • continuous
  • images
  • system_prompt

Unknown request keys can be passed through with extra={...} in build_payload(...).

What You Get Back

invoke() returns a dictionary like:

{
	"process_id": "...",
	"model_name": "district/1984-m3-0317",
	"final_response": "...",
	"usage": {...},
	"thinking": [...],
	"service_calls": [...],
	"service_responses": [...],
	"iterations": 2,
	"events": [...],
}

stream() yields one dictionary per SSE event, for example:

{
	"type": "model_response",
	"timestamp": "2026-04-03T00:00:00+00:00",
	"process_id": "...",
	"iteration": 1,
	"data": {
		"visible_response": "..."
	}
}

Authentication

Execution requests send the shared key in the X-API-Key header. The SDK reads it from:

  • the api_key= constructor argument
  • or the ROOSTER_API_KEY environment variable

health() does not require authentication, but invoke() and stream() do.

Overriding The Endpoint

Use a different deployment like this:

from roosted import RoosterClient

client = RoosterClient(
	base_url="https://your-other-deployment.modal.run",
	api_key="your-shared-api-key",
)

Metadata

Release files for roosted 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roosted 0.0.3
File Size Uploaded Provenance Actions
roosted-0.0.3.tar.gz 6.0 kB Without provenance Details for roosted-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for roosted 0.0.3
File Interpreter ABI Platform Actions
roosted-0.0.3-py3-none-any.whl Python 3 none any Details for roosted-0.0.3-py3-none-any.whl

Total release size: 10.7 kB

Release files / roosted-0.0.3.tar.gz

Download URL roosted-0.0.3.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b3407e244699b016b38257dd793decea28ec43b884f4c6d137a05cf0bc8e1d3a
BLAKE2b-256 checksum
How to use checksums
044debb6ad957e346f7b4ae5da8e0e0b5c4912383f965b5bcc54947557ca0623
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / roosted-0.0.3-py3-none-any.whl

Download URL roosted-0.0.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df4ff218ab8d2f06a35575b916b35a3b0159d79e46d2949eda96874ec68d6ea2
BLAKE2b-256 checksum
How to use checksums
e7d01dd976131cfb3cc0980d542bc7b7ac8acffd0dd64f357fa189ca33086a78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for roosted 0.0.3

Provenance

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page