semvec/pypi-packages huggingface dataset:
nightshift-sdk 0.3.1
Nightshift — autonomous agent orchestrator with Firecracker VMs
License: Apache-2.0
Requires Python: >=3.12
Keywords: agents, ai, claude, firecracker, microvm, orchestrator

# Nightshift

Autonomous agent orchestrator with Firecracker VM isolation.

Nightshift runs AI agents in isolated [Firecracker](https://firecracker-microvm.github.io/) microVMs on bare-metal infrastructure. Each agent gets its own VM with a dedicated filesystem, network, and resource limits — so agents can execute code, edit files, and make network calls without affecting the host or each other.

## Installation

```bash
uv add nightshift-sdk
```

or

```bash
pip install nightshift-sdk
```

## Quick Start

Define an agent with `NightshiftApp` and `AgentConfig`:

```python
from nightshift import NightshiftApp, AgentConfig
from claude_agent_sdk import query, ClaudeAgentOptions

app = NightshiftApp()

@app.agent(
    AgentConfig(
        workspace="./my-project",
        vcpu_count=2,
        mem_size_mib=2048,
        timeout_seconds=1800,
    )
)
async def code_reviewer(prompt: str):
    async for message in query(
        prompt=prompt,
        options=ClaudeAgentOptions(
            cwd="/workspace",
            allowed_tools=["Read", "Glob", "Grep"],
            model="claude-sonnet-4-6",
        ),
    ):
        yield message
```

Deploy to a Nightshift platform:

```bash
nightshift login --url https://api.nightshift.sh
nightshift deploy agent.py
nightshift run code_reviewer --prompt "Review the auth module for security issues"
```

Or run locally on a machine with Firecracker:

```bash
nightshift run code_reviewer agent.py --prompt "Review the auth module"
```

## AgentConfig

| Parameter | Default | Description |
|-----------|---------|-------------|
| `workspace` | `""` | Host directory to mount into the VM at `/workspace` |
| `vcpu_count` | `2` | Number of vCPUs allocated to the VM |
| `mem_size_mib` | `2048` | Memory in MiB allocated to the VM |
| `timeout_seconds` | `1800` | Maximum agent execution time (30 min default) |
| `forward_env` | `[]` | Environment variables to forward from host |
| `env` | `{}` | Static environment variables set in the VM |

## Documentation

Full documentation at [docs.nightshift.sh](https://docs.nightshift.sh).

## License

Apache 2.0 — see [LICENSE](LICENSE).