Skip to main content

crow-client

A client for interacting with endpoints of the FutureHouse crow service.

Installation

uv pip install crow-client

Usage

The CrowClient provides simple functions to deploy and monitor your crow.

In the case of environments the deployment looks like this

from pathlib import Path
from crow_client import CrowClient
from crow_client.models import CrowDeploymentConfig

client = CrowClient()

crow = CrowDeploymentConfig(
    path=Path("../envs/dummy_env"),
    environment="dummy_env.env.DummyEnv",
    requires_aviary_internal=False,
    environment_variables={"SAMPLE_ENV_VAR": "sample_val"},
    agent="ldp.agent.SimpleAgent",
)

client.create_crow(crow)

# checks the status
client.get_build_status()

For functional environments we don't need to pass the file path and can pass the environment builder instead

from aviary.core import fenv
import numpy as np


def function_to_use_here(inpste: str):
    a = np.array(np.asmatrix("1 2; 3 4"))
    return inpste


@fenv.start()
def my_env(topic: str):
    """
    Here is the doc string describing the task.
    """
    a = np.array(np.asmatrix("1 2; 3 4"))
    return f"Write a sad story about {topic}", {"chosen_topic": topic}


@my_env.tool()
def print_story(story: str, state) -> None:
    """Print the story and complete the task"""
    print(story)
    print(function_to_use_here(story))
    state.reward = 1
    state.done = True


from crow_client import CrowClient
from crow_client.models import CrowDeploymentConfig, Stage
from crow_client.clients.rest_client import generate_requirements

client = CrowClient(stage=Stage.LOCAL)

crow = CrowDeploymentConfig(
    functional_environment=my_env,
    environment="my_env",
    requires_aviary_internal=False,
    environment_variables={"SAMPLE_ENV_VAR": "sample_val"},
    agent="ldp.agent.SimpleAgent",
    requirements=generate_requirements(my_env, globals()),
)

client.create_crow(crow)

This client also provides functions that let you send tasks to an existing crow:

from crow_client import CrowJob

client = CrowClient()

job_data = {"name": "your-job-name", "query": "your task"}
client.create_job(job_data)

# checks the status
client.get_job()

The CrowJobClient provides an interface for managing environment states and agent interactions in the FutureHouse crow service.

from crow_client import CrowJobClient
from crow_client.models.app import Stage

client = CrowJobClient(
    environment="your_environment_name",
    agent="your_agent_id",
    auth_token="your_auth_token",
    base_uri=Stage.DEV,
    trajectory_id=None,
)

Metadata

Release files for crow-client 0.3.14

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

Source distribution (sdist)

Source distribution for crow-client 0.3.14
File Size Uploaded Provenance Actions
crow_client-0.3.14.tar.gz 131.0 kB Without provenance Details for crow_client-0.3.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crow-client 0.3.14
File Interpreter ABI Platform Actions
crow_client-0.3.14-py3-none-any.whl Python 3 none any Details for crow_client-0.3.14-py3-none-any.whl

Total release size: 152.5 kB

Release files / crow_client-0.3.14.tar.gz

Download URL crow_client-0.3.14.tar.gz
Size 131.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d949acfd57749a579ef76325920e529cd8541dbe55c88d7b4ee1d4162dc2a70b
BLAKE2b-256 checksum
How to use checksums
1b7055d2b76cca46bf7d3c27c4df822806e82b4f9ff3e38611d5ad0b84ac3d76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / crow_client-0.3.14-py3-none-any.whl

Download URL crow_client-0.3.14-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ac65740207287f012e820f0592615b7e44b6b023386a8c893fd40deaec5a4b7
BLAKE2b-256 checksum
How to use checksums
f8e9aa316a7b02817e6a2b841ae763034a40cf7180cb51d226bb8ad0e2b41eb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for crow-client 0.3.14

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.

Release history Release notifications | RSS feed

This release

0.3.14 This release

2 release files No provenance

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