Skip to main content

FortSignal-secured Deep Agents — cryptographically safe coding agent

Project description

FortSignal Deep Agents

Run any Deep Agent with cryptographic tool‑call protection powered by FortSignal. Every risky operation (write file, edit file, execute, sub‑task) is intercepted and routed through FortSignal's challenge/verify flow — only signed, cryptographically verified intents reach your machine.

pip install fortsignal-deepagents
export FORTSIGNAL_API_KEY="fs_live_..."
fortsignal-deepagents

Why?

Deep Agents are trusted with powerful tools — file writes, shell commands, sub‑agent spawning. FortSignal adds a signing layer so every destructive action requires a signed challenge. This prevents prompt‑injection attacks from escalating into real damage.


Setup

You need a FortSignal API key and either an agent registration or a user registration on FortSignal.

1. Get credentials

Sign up at fortsignal.com and get your API key.

2. Set environment variables

export FORTSIGNAL_API_KEY="fs_live_..."

Usage

Two modes depending on your workflow.

Agent mode (autonomous)

For automated agents that sign challenges with an Ed25519 key.

  1. Register your agent on the FortSignal dashboard and download its key file
  2. Run:
export FORTSIGNAL_AGENT_ID="my-agent-id"
export FORTSIGNAL_AGENT_KEY="/path/to/agent-key.json"
fortsignal-deepagents --model "openai:gpt-4o"

Risky tool calls are automatically signed — no user interruption.

Passkey mode (human-in-the-loop)

For interactive use where a human signs each challenge with WebAuthn.

export FORTSIGNAL_USER_ID="my-user-id"
fortsignal-deepagents --model "openai:gpt-4o"

When the agent calls a risky tool, the CLI returns WebAuthn options. Sign in your browser, paste the assertion back, and the tool executes if verified.

One-shot prompt

fortsignal-deepagents --model "openai:gpt-4o" --message "write hello.py"

Python API

import os
from deepagents import create_deep_agent
from fortsignal_deepagents import FortSignalMiddleware

os.environ["FORTSIGNAL_API_KEY"] = "fs_live_..."

agent = create_deep_agent(
    model="openai:gpt-4o",
    middleware=[FortSignalMiddleware(
        agent_id="my-agent-id",
        agent_key_path="/path/to/agent-key.json",
    )],
)

Or use the convenience helper:

from fortsignal_deepagents import create_fortsignal_deep_agent

agent = create_fortsignal_deep_agent(
    model="openai:gpt-4o",
    agent_id="my-agent-id",
    agent_key_path="/path/to/agent-key.json",
)

How it works

Agent calls "write_file" → FortSignalMiddleware catches it
                         → POST /challenge/start to FortSignal API
                         → Ed25519 signs challenge (agent mode)
                           or returns WebAuthn options (passkey mode)
                         → POST /challenge/verify
                         → Allow → tool executes
                         → Deny  → tool blocked with error

Safe (read-only) tools (ls, read_file, glob, grep, fetch_url) pass through without any FortSignal check.


Configuration

Environment Variable Default Description
FORTSIGNAL_API_KEY Required. Your FortSignal API key
FORTSIGNAL_AGENT_ID Agent ID for autonomous signing mode
FORTSIGNAL_AGENT_KEY Path to Ed25519 agent key JSON file
FORTSIGNAL_USER_ID User ID for passkey (WebAuthn) mode
FORTSIGNAL_BASE_URL https://api.fortsignal.com FortSignal API base URL
FORTSIGNAL_MODEL Default model for --model

Development

git clone https://github.com/fortsignal/fortsignal-deepagents
cd fortsignal-deepagents
uv sync
uv run pytest tests/

Tests

63 tests covering configuration, safe-tool passthrough, risky-tool interception, challenge/verify flow (agent + passkey modes), retry logic, API error handling, and middleware injection.

uv run pytest tests/ -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fortsignal_deepagents-0.1.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fortsignal_deepagents-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file fortsignal_deepagents-0.1.0.tar.gz.

File metadata

  • Download URL: fortsignal_deepagents-0.1.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fortsignal_deepagents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d835344e02dc948659cd1bc34e27a3101601a091f4bb4516357859b271226ffb
MD5 88d7aa74c8eb51445e877b2652e598e7
BLAKE2b-256 1b66cffa0b1e1c25f1bf003a803f6034bbe792611e906bb05b3514362b6a4ff5

See more details on using hashes here.

File details

Details for the file fortsignal_deepagents-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fortsignal_deepagents-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fortsignal_deepagents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29ca27c39b55121a50226baaff98c649c5bfe7a8932ec1139ee61a72cee2f8bb
MD5 6f3219b9d3aef1c873348066027b3432
BLAKE2b-256 8fff4e48becb8c8a7096527cd6434edb102ac771305c3233defdcd6a23e7d102

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page