Metadata-Version: 2.5
Name: idiotproof
Version: 0.5.5
Summary: Software for agents that create and edit video.
Project-URL: Repository, https://github.com/4014-Labs/idiotproof
Project-URL: Issues, https://github.com/4014-Labs/idiotproof/issues
Author: 4014 Labs
License: Proprietary
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27
Description-Content-Type: text/markdown

# idiotproof sandbox

GPU video editing for agents.

[Instinct / Grokbot](src/idiotproof/docs/instinct-grokbot/README.md) ·
[Codex / Claude Code](src/idiotproof/docs/codex-claude-code/README.md) ·
[Python server](src/idiotproof/docs/custom-server/README.md)

## Start

[Sign up and get a key](src/idiotproof/docs/api-keys.md) ·
[Estimate costs](src/idiotproof/docs/costs.md)

```bash
pip install idiotproof
export IDEA_SECRET_KEY=your_key
```

Install FFmpeg and ffprobe for video inspection, splitting, and concatenation.
Interfaces and tool schemas may change.
The default API is `https://dev.67idea.com/v1`; override it with
`IDEA_API_BASE_URL` or `Idea(base_url=...)`. Use a key for that environment.
Never print your key or upload tokens.

Discover tools before uploading or rendering:

```python
import asyncio
from idiotproof import Idea

async def main():
    async with Idea() as idea:
        tools = await idea.get_tools()
        print([tool["id"] for tool in tools])
        # Inspect the chosen tool's current docstring and schema before calling it.
        # Example, if present: print(tools.submit_bobbie_job.__doc__)

asyncio.run(main())
```

## Run a workflow

1. Create a workspace: `chat_id = await idea.create_chat()`. Reuse this ID.
2. Upload: `upload = await idea.upload_file(chat_id, "clip.mp4")`.
   Up to 600 frames returns `workspace_uri`; longer videos split automatically
   and return ordered `parts` and `workspace_uris`. Images are also supported.
3. Call a discovered tool using its current schema. Start with a representative
   preview: submit, read feedback, revise, and inspect before scaling out.
   Tool calls are not automatically retried.
4. Publish the resulting workspace path:
   `published = await idea.media_publish(chat_id, output_path)`.
5. Preview through your environment: localhost HTML for local coding agents,
   the host's media channel for Instinct/Grokbot, or your authenticated app UI
   for a custom server. Follow the matching guide above. Treat signed URLs as
   transient credentials; keep them out of logs and ordinary chat.
6. Save wanted results with
   `await idea.download_media(chat_id, output_path, "final.mp4")`,
   or `download_and_concat()` for ordered parts. Server media expires.

For multiple assets, use `upload_batch()`; its nested results retain asset/part
order. For errors, inspect `IdeaError.code`, `status_code`, and `request_id`.
A 403 requires checking key permissions and environment before retrying.

## Read locally when needed

- [API reference](src/idiotproof/docs/api.md): calls, return shapes, concurrency,
  downloads, and concatenation.
- [Media guide](src/idiotproof/docs/media.md): preview strategy, Bobbie pipelines,
  VLM grounding, and constraints. Read before processing media.
- [Why idiotproof](src/idiotproof/docs/README.md): motivation and use cases.

These files ship inside the package. Locate them with:

```python
from pathlib import Path
import idiotproof

docs = Path(idiotproof.__file__).parent / "docs"
```
