Skip to main content

Pilota

Pilota

Put agents inside Python. Keep Python in control.

PyPI Python versions License: MIT Documentation

Documentation · Tutorial · API reference


Pilota runs one bounded AI task as an ordinary typed expression. Your program owns the workflow. The agent receives only the context, authority, and budget you grant.

from dataclasses import dataclass

from pilota import agent
from pilota.providers.openrouter import OpenRouterModel


@dataclass
class Plan:
    steps: list[str]


with OpenRouterModel("openai/gpt-4.1-mini") as model:
    plan = agent(
        "Plan the requested change",
        model=model,
        context={"request": "Add response caching"},
        returns=Plan,
    )

for step in plan.steps:
    print(step)
  • Ordinary Python: loops, branches, retries, and tests stay in your code.
  • Typed contracts: request a dataclass, Pydantic model, or any TypeAdapter type.
  • Explicit authority: expose selected tools, read-only resources, and a policy-controlled workspace.
  • Bounded execution: limit model calls, tool calls, result retries, and wall time.
  • Inspectable outcomes: keep the typed result, usage, trace, and changed-file artifacts.
  • Deterministic tests: drive the full runtime with ScriptedModel, without network calls.

Installation

pip install 'pilota[openrouter]'

Python 3.11+. The core package (pip install pilota) has no HTTP client; the openrouter extra adds the OpenRouter provider.

Early development. Versions 0.0.x may contain breaking changes.

License

MIT

Metadata

Release files for pilota 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pilota 0.0.1
File Size Uploaded Provenance
pilota-0.0.1.tar.gz 56.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pilota 0.0.1
File Interpreter ABI Platform
pilota-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 81.1 kB

Release files / pilota-0.0.1.tar.gz

Download URL pilota-0.0.1.tar.gz
Size 56.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8037e868ce0ad5efb68d30dc65932a1dac7745a0f4c23e55b2f005f047d18e64
BLAKE2b-256 checksum
How to use checksums
db35d6e2751f26255553f8f319e8ffc1a032c456491f0b5d5209d9d4d8038def
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / pilota-0.0.1-py3-none-any.whl

Download URL pilota-0.0.1-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d82b60f75230635a94b0964e70e8bc4d3da1f97729c23c158d485a1ce357ca29
BLAKE2b-256 checksum
How to use checksums
f5167e3a4e29efaca8dca0080c25be56b2bac1a60489942da18a50aa4297df19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for pilota 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pilota-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page