> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
last_verified: 2026-10-09
title: Getting started
description: Create a Python AGNT5 project, run it locally with agnt5 dev, and deploy it
category: SDK
hideRightSidebar: true
---

This page takes you from an empty directory to a running Python function. You need Python 3.11 or later, [uv](https://docs.astral.sh/uv/), and the [AGNT5 CLI](/docs/cli/install.md), signed in with `agnt5 auth login`.

## Create a project

```bash
agnt5 create my-agent --language python
cd my-agent
uv sync
```

`agnt5 create` scaffolds the Python quickstart and links the directory to a new AGNT5 project. The project contains:

| File | Contents |
|---|---|
| `app.py` | The worker entry point |
| `src/<project>/functions.py` | Example functions |
| `tests/` | Tests for the functions |
| `agnt5.yaml` | The project manifest |
| `pyproject.toml` | Dependencies, including `agnt5` |

## The worker

`app.py` imports the module that defines the functions, then starts a worker:

```python
import asyncio
import os

from agnt5 import Worker

import my_agent.functions  # noqa: F401  (importing registers the functions)


async def main() -> None:
    worker = Worker(
        service_name="my-agent",
        service_version="1.0.0",
        coordinator_endpoint=os.getenv("AGNT5_COORDINATOR_ENDPOINT"),
        auto_register=True,
    )
    await worker.run()


if __name__ == "__main__":
    asyncio.run(main())
```

A function's parameters after `ctx` are filled from the run's JSON input by name:

```python
from agnt5 import FunctionContext, function


@function(name="process_task")
async def process_task(ctx: FunctionContext, task_id: str, task_data: dict) -> dict:
    return {"task_id": task_id, "status": "completed", "run_id": ctx.run_id}
```

## Run it locally

```bash
agnt5 dev
```

In another terminal, list what the worker registered and run a function:

```bash
agnt5 components --dev
agnt5 run process_task --input '{"task_id": "t1", "task_data": {"a": 1}}'
```

```json
{
  "run_id": "01a1...",
  "status": "completed",
  "task_id": "t1"
}
```

Open the `studio` link that `agnt5 dev` prints to see the run's trace. See [Local development](/docs/build/local-development.md) for hot reload, background mode, and the API.

## Deploy

```bash
agnt5 deploy
agnt5 run process_task --input '{"task_id": "t1", "task_data": {}}' --env preview
```

Add secrets such as `OPENAI_API_KEY` with `agnt5 secrets set` before you deploy code that calls a model. See [Deploying](/docs/run/deploying.md).

## Next steps

* [Functions](/sdk/python/functions.md) and [Workflows](/sdk/python/workflows.md): define your own steps and checkpoints.
* [Agents](/sdk/python/agents.md): run a model with tools inside a workflow.
