Metadata-Version: 2.4
Name: cracked-ai-crewai
Version: 0.1.0
Summary: CrewAI tools for Cracked, the agent tool router: discover/inspect/run/run_capability plus cracked_tools(query) that turns discover results into tools.
License: MIT
Project-URL: Documentation, https://cracked.ai/docs/sdks
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: cracked-ai>=0.1.0
Requires-Dist: crewai>=0.80
Requires-Dist: pydantic>=2

# Cracked for CrewAI

Give CrewAI agents 50,000+ tools through one API key.

Publishing to PyPI soon. Until then install from the repo path:

```bash
pip install ./sdk/python ./sdk/integrations/crewai crewai
# later: pip install cracked-ai-crewai
```

Set `CRACKED_API_KEY` (https://cracked.ai/app/keys, or `Cracked.register_agent()`).

## Use

```python
from crewai import Agent, Crew, Task
from cracked_ai_crewai import cracked_toolkit, cracked_tools

researcher = Agent(
    role="Researcher",
    goal="Answer with real data from external tools",
    backstory="You find the right tool with cracked_discover, read its schema with cracked_inspect, then cracked_run it.",
    tools=cracked_toolkit(),            # discover, inspect, run, run_capability
)
task = Task(description="What is the weather in Austin, TX right now?", expected_output="One sentence with the temperature.", agent=researcher)
print(Crew(agents=[researcher], tasks=[task]).kickoff())
```

Pre-resolved tools (one per endpoint, args from the provider's JSON Schema):

```python
tools = cracked_tools("instagram profile followers", limit=3)
Agent(..., tools=tools)
```

Classes: `CrackedDiscoverTool`, `CrackedInspectTool`, `CrackedRunTool`, `CrackedCapabilityTool`, `CrackedEndpointTool` (all `crewai.tools.BaseTool`). Pass `client=Cracked(api_key=..., base_url=...)` to any of them or to the factories.

Tool output is a status line (`runId`, `status`, `httpStatus`, `costUsd`) followed by JSON, truncated to `max_output_chars` (default 20,000). API errors are returned as JSON strings so the agent can recover.

`python example.py` calls the tools directly (no LLM) and, when `OPENAI_API_KEY` is set, runs a one-task crew.
