Metadata-Version: 2.4
Name: asteroid-odyssey
Version: 1.8.141
Summary: Python SDK for the Asteroid Agents API
Author-email: Asteroid <founders@asteroid.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/asteroidai/agents
Project-URL: Homepage, https://asteroid.ai
Project-URL: Documentation, https://docs.asteroid.ai
Keywords: OpenAPI,Asteroid Agents API,browser automation,AI agents
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.2.1; extra == "dev"
Requires-Dist: pytest-cov>=2.8.1; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: mypy>=1.5; extra == "dev"

# Asteroid Odyssey Python SDK

Python SDK for the Asteroid API.

## Installation

```bash
pip install asteroid-odyssey
```

## Usage

```python
from asteroid_odyssey import ApiClient, Configuration, ExecutionApi, WorkflowsApi

config = Configuration(
    host="https://odyssey.asteroid.ai/agents/v2",
    api_key={"ApiKeyAuth": "your-api-key"}
)

client = ApiClient(config)
workflows_api = WorkflowsApi(client)
execution_api = ExecutionApi(client)

response = workflows_api.workflow_execute_post(
    workflow_id="your-workflow-id",
    workflows_workflow_execute_request={"inputs": {"input": "value"}}
)
print(f"Execution ID: {response.execution_id}")

execution = execution_api.execution_get(execution_id=response.execution_id)
print(f"Status: {execution.status}")
```

## Migrating from the agent functions

A workflow is what you build and run. It used to be called an agent. A version is one immutable snapshot of a workflow. It used to be called a workflow. An agent is now the AI node inside a workflow.

The old methods still work and call the old `/agents` routes. They are marked deprecated and will be removed in a future major release. Move to the new methods:

| Old | New |
|---|---|
| `AgentsApi.agent_list` | `WorkflowsApi.workflow_list` |
| `AgentsApi.agent_create` | `WorkflowsApi.workflow_create` |
| `AgentsApi.available_tools_list` | `WorkflowsApi.workflow_available_tools_list` |
| `AgentsApi.agent_by_id_update` | `WorkflowsApi.workflow_by_id_update` |
| `AgentsApi.agent_by_id_delete` | `WorkflowsApi.workflow_by_id_delete` |
| `AgentsApi.agent_execute_post` | `WorkflowsApi.workflow_execute_post` |
| `AgentsApi.agent_execute_sync_post` | `WorkflowsApi.workflow_execute_sync_post` |
| `FilesApi.agent_workflow_head_get_files` | `FilesApi.workflow_head_get_files` |
| `FilesApi.agent_workflow_head_patch_files` | `FilesApi.workflow_head_patch_files` |
| `FilesApi.agent_workflow_head_publish_head` | `FilesApi.workflow_head_publish` |
| `WorkflowsApi.agent_workflows_list` | `WorkflowVersionsApi.workflow_versions_list` |
| `WorkflowsApi.agent_workflows_create` | `WorkflowVersionsApi.workflow_versions_create` |
| `WorkflowsApi.agent_workflows_validate` | `WorkflowVersionsApi.workflow_versions_validate` |
| `WorkflowsApi.agent_workflows_get` | `WorkflowVersionsApi.workflow_versions_get` |
| `WorkflowsApi.agent_workflows_delete_workflow` | `WorkflowVersionsApi.workflow_versions_delete` |
| `WorkflowsApi.agent_workflows_execute` | `WorkflowVersionsApi.workflow_versions_execute` |
| `WorkflowsApi.agent_workflows_get_files_by_version` | `WorkflowVersionsApi.workflow_versions_get_files` |
| `WorkflowsApi.agent_workflows_get_inputs` | `WorkflowVersionsApi.workflow_versions_get_inputs` |
| `WorkflowsApi.agent_workflows_get_output_schemas` | `WorkflowVersionsApi.workflow_versions_get_output_schemas` |
| `WorkflowsApi.agent_workflows_publish` | `WorkflowVersionsApi.workflow_versions_publish` |

Field names follow the same rule:

| Where | Old | New |
|---|---|---|
| New `/workflows` routes | `agent_id` | `workflow_id` |
| New `/workflows` routes | version `workflow_id` | `version_id` |
| Workflow detail | `agent`, `workflow`, `versions_metadata` | `workflow`, `version`, `versions` |
| File tree | `workflow_id`, `agent_name` | `version_id`, `workflow_name` |
| Execution, scheduled execution and batch responses | `agent_id`, `agent_name` | `workflow_id`, `workflow_name` |
| Execution, scheduled execution and batch responses | `workflow_id` (the version) | `workflow_version_id` |

On execution, scheduled execution and batch responses, `workflow_id` now holds the workflow ID, not the version ID. Read `workflow_version_id` for the version.

## Documentation

See [docs.asteroid.ai](https://docs.asteroid.ai) for full documentation.
