Metadata-Version: 2.4
Name: giga-sdk
Version: 1.1.0
Summary: Giga SDK and CLI — agent building framework with command-line tools
Project-URL: Homepage, https://giga.ai
Project-URL: Documentation, https://docs.giga.ai
Project-URL: Repository, https://github.com/Giga-customers/giga-sdk
Author-email: Giga Team <support@gigaml.com>
License: MIT
Keywords: agents,ai,cli,framework,llm
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.12
Requires-Dist: click<9,>=8.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: keyring>=25.0
Requires-Dist: packaging>=21.0
Requires-Dist: phonenumbers<9,>=8.13
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: typer<0.26,>=0.12.0
Provides-Extra: dev
Requires-Dist: pytest-mock; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Description-Content-Type: text/markdown

# Giga SDK

Agent building framework and CLI for the Giga platform.

## Installation

```bash
pip install giga-sdk
```

## Requirements

- Python >= 3.12

## CLI

After installation, the `giga` CLI is available:

```bash
giga --help
giga login
giga validate
giga whoami
```

Note: the `giga` CLI is currently only supported inside a Giga repository with a valid `giga.config.json`.

## SDK

Create an agent, give it a typed variable store, and register hooks and code blocks
with decorators:

```python
from pydantic import BaseModel
from giga import Agent, CodeBlockResult

class Variables(BaseModel):
    guest_name: str | None = None

agent = Agent(name="my-agent", store=Variables)

@agent.initialization
def init(initialization_values, store):
    return {"guest_name": "Unknown"}

@agent.code_block(description="Greet the user")
def greet(name: str, store) -> CodeBlockResult:
    return CodeBlockResult(
        message=f"Hello {name}!",
        store_updates={"guest_name": name},
    )
```

You can also define API actions and post-conversation hooks:

```python
from giga import api
from giga.types import ResolutionResult, Analysis

get_user = api(
    name="get_user",
    description="Get user info",
    method="GET",
    url="https://api.example.com/users/{id}",
)

@agent.post_conversation
def post_conversation(resolution_result: ResolutionResult, analysis: Analysis):
    if resolution_result.resolution_status == "resolved":
        print(f"Resolved: {analysis.summary}")
```
