> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grantex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Strands Agents SDK

> Scope-enforced tools for Strands Agents SDK in TypeScript and Python.

## TypeScript Install

```bash theme={null}
npm install @grantex/strands @grantex/sdk @strands-agents/sdk zod
```

## TypeScript Quick Start

```typescript theme={null}
import { Agent } from '@strands-agents/sdk';
import { createGrantexTool } from '@grantex/strands';
import { z } from 'zod';

const readCalendar = createGrantexTool({
  name: 'read_calendar',
  description: 'Read upcoming calendar events',
  inputSchema: z.object({
    date: z.string(),
  }),
  grantToken,
  requiredScope: 'calendar:read',
  callback: async ({ date }) => getCalendarEvents(date),
});

const agent = new Agent({
  tools: [readCalendar],
});
```

The TypeScript helper verifies the grant token against JWKS before each tool invocation and checks the verified `scp` claim. Set `online: true` with a Grantex client and `connector` to delegate enforcement to `client.enforce()`.

## Python Install

```bash theme={null}
pip install grantex-strands strands-agents
```

## Python Quick Start

```python theme={null}
from grantex_strands import create_grantex_tool

read_calendar = create_grantex_tool(
    name="read_calendar",
    description="Read upcoming calendar events",
    grant_token=grant_token,
    required_scope="calendar:read",
    func=get_calendar_events,
)
```

The Python helper verifies the grant token against JWKS and raises `PermissionError` if the required scope is missing.

## Requirements

* Node.js 18+ for `@grantex/strands`
* Python 3.11+ for `grantex-strands`
* Strands Agents SDK for the language you use
