# Jinn

Jinn runs agent work as a call. You send a prompt and a folder. An agent works on it in its own Linux machine. You get back the files you asked for.

You define the work once, as a **function**. Then you **run** it as often as you like, from the CLI, the API, the SDKs or the console.

## Quickstart

1. Sign in at [app.usejinn.com](https://app.usejinn.com). Jinn is invitation-only: an account owner invites your email.
2. Add a **provider**: your model vendor's API key and the model to use. Open **Providers** in the console.
3. Install the CLI and sign it in:

```sh
curl -fsSL https://docs.usejinn.com/install.sh | sh
jinn login
```

4. Write `function.json`. Put your provider's id in `provider` (the console shows it).

```json
{
  "name": "summarise",
  "base": "debian-12-20260801-72c15f01",
  "setup": [],
  "provider": "prv_8c1f04d2a7b93e650f1a2c47@latest",
  "system_prompt": "Read every file in /workspace/in. Write a one-page summary to /workspace/out/summary.md. Then call submit_result.",
  "tools": ["bash", "read", "write"],
  "custom_tools": [],
  "input_manifest": [],
  "output_manifest": [{ "path": "summary.md", "description": "The summary", "max_bytes": 100000 }],
  "environment": [],
  "size": "s",
  "timeout_minutes": 15
}
```

5. Publish it and run it:

```sh
jinn publish function.json
jinn run summarise --prompt "Summarise these notes for a new team member." --in ./notes --out ./result
```

The CLI prints what the agent does. When the run ends, `./result/summary.md` holds the summary.

## What to read next

- [Functions](/functions): every field of a definition, bases and setup, providers, tools and secrets.
- [Runs](/runs): states, failures, input and output folders, logs and limits.
- [API](/api): keys and every route. The [OpenAPI document](/openapi.json) describes the same routes.
- [Webhooks](/webhooks): get the result posted to you, and check its signature.
- [CLI](/cli), [SDKs](/sdk) and [Console](/console).
- [Examples](/examples): functions for common work.

Every page is also Markdown: add `.md` to its address, or use the switch at the top. [llms.txt](/llms.txt) lists every page for agents.
