Metadata-Version: 2.4
Name: deploypod
Version: 0.1.0
Summary: Python client for the Deploypod API: run AI agents, manage their tools and knowledge bases.
Author: Deploypod
License-Expression: MIT
Project-URL: Homepage, https://deploypod.ai
Project-URL: Documentation, https://docs.deploypod.ai/en/gelistirici/sdk-ve-widget/
Keywords: deploypod,ai,agents,llm,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.25.0
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-httpx>=0.30.0; extra == "dev"
Dynamic: license-file

# Deploypod Python SDK

The Python client for the [Deploypod](https://deploypod.ai) API. Run your AI
agents from code, and manage their instructions, tools and knowledge bases.

```bash
pip install deploypod
```

Python 3.9 or newer.

## Sign in

Ask your Deploypod administrator for an application (`app_id`, `app_secret`)
and your organization's number. The client gets the access token itself and
renews it before it expires.

```python
from deploypod import DeploypodClient

client = DeploypodClient(
    org_id="42",
    app_id="YOUR_APP_ID",
    app_secret="YOUR_APP_SECRET",
)
```

Keep `app_secret` out of your code: read it from the environment.

```bash
export DEPLOYPOD_ORG_ID=42
export DEPLOYPOD_APP_ID=...
export DEPLOYPOD_APP_SECRET=...
```

```python
from deploypod import get_client_from_env

client = get_client_from_env()
```

Already have an access token? Pass `token="..."` instead of the app
credentials. For an on-premises installation, pass
`base_url="https://your-host/api"`.

## Run an agent

```python
for agent in client.agents.list():
    print(agent.uuid, agent.name)

result = client.agents.run(
    "AGENT_UUID",
    "How many days of annual leave do I have?",
    run_exploration=True,
    timeout=300,
)
print(result["result_summary"])
```

`run` waits for the answer. Other request fields go in as keyword arguments,
for example `output_schema={...}` to get the answer as JSON in
`result["final_emit"]`. Requests through `deploypod.ai` are cut after 100
seconds; for longer work (web research, presentations) use the WebSocket API.

## Errors

Every error is a `deploypod.DeploypodError` with `status_code` and `detail`.
Subclasses: `AuthenticationError` (401/403), `NotFoundError`,
`ValidationError`, `ConflictError`, `LicenseError`, `ServerError`.

## Documentation

Full guides, the REST and WebSocket APIs, and the chat widget:
<https://docs.deploypod.ai/en/>

## License

MIT
