Hey everyone!

I've been working on an open-source project in Rust called Drifti, and I wanted to share the first release and get some technical feedback.

The problem I'm exploring is capability drift in AI agents.

Agents often run with fairly broad access to the filesystem, processes, and network, but there's usually no explicit, versioned contract describing which capabilities they actually need.

Drifti tries to make that behavior observable and reviewable.

How it works

The workflow is:

observe → learn → generate → human review → verify

During observation, Drifti collects evidence of the capabilities exercised by a command.

It then builds a capability profile and proposes a drifti.yaml contract.

After a developer reviews and accepts that contract, subsequent executions can be checked against it.

A few implementation details:

  • Written in Rust, organized into separate crates for core policy logic, observation, Linux integration, storage, and CLI.

  • Uses ptrace for Linux process observation.

  • Stores execution evidence locally using SQLite.

  • Uses deterministic policy evaluation with explicit allow/deny rules.

  • Keeps LLMs out of the trusted verification path.

One architectural decision was to distinguish between an explicit capability violation and incomplete observation coverage.

A violation returns exit code 121.

Incomplete coverage returns 122 rather than incorrectly reporting that everything was allowed.

Current limitations

This is an early v0.1 release.

Observation and verification currently target Linux. The ptrace backend can report incomplete coverage, and Drifti does not attempt to provide process isolation.

It's a verification tool, not a sandbox.

What I'd love feedback on

I'm particularly interested in opinions on:

  1. The trade-offs of using ptrace for this type of observation.

  2. Approaches to improving coverage without introducing too much complexity.

  3. How to keep capability matching deterministic while supporting more expressive policies.

The project is open source (MIT/Apache-2.0), and contributions are welcome.

GitHub: GitHub - lucabecci/drifti: Capability contracts and drift detection for AI agents. · GitHub

Thanks for taking a look. I'd really appreciate technical criticism, especially around the observation model and policy evaluation.

1 post - 1 participant

Read full topic