Skip to content
/ atip Public

Lightweight protocol for introspecting local CLI tools so AI agents can understand capabilities, side effects, and safety without MCP servers.

License

Notifications You must be signed in to change notification settings

lenulus/atip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ATIP (Agent Tool Introspection Protocol)

A lightweight, CLI-first protocol that allows AI agents to safely introspect and cryptographically verify local tools via a simple --agent contract, without requiring MCP servers or additional infrastructure.

Version License


What is ATIP?

ATIP defines a simple convention for CLI tools to expose their capabilities to AI agents:

$ gh --agent
{
  "atip": {"version": "0.6"},
  "name": "gh",
  "description": "GitHub CLI",
  "commands": {
    "pr": {
      "list": {...},
      "create": {...}
    }
  },
  "effects": {
    "network": true,
    "destructive": false
  }
}

No servers. No JSON-RPC. No handshakes. Just a --agent flag that outputs structured JSON.


Why ATIP?

The Problem

AI agents need to know:

  • What tools are available? (discovery)
  • How do I use this tool? (parameters, types)
  • What are the side effects? (destructive? network? cost?)
  • Is it safe to retry? (idempotent? reversible?)
  • Can I trust this binary? (signatures, provenance, supply chain)

Current solutions fall short:

  • Parsing --help β€” Inconsistent, unreliable
  • Hardcoded knowledge β€” Doesn't scale to custom tools
  • MCP servers β€” Overkill for simple CLI tools that execute and exit

The Solution

ATIP separates introspection from executionβ€”with cryptographic trust:

Concern Solution
Discovery tool --agent outputs metadata (ATIP)
Trust Sigstore signatures + SLSA attestations
Execution Direct subprocess invocation
Stateful tools MCP (when genuinely needed)

For 95% of CLI tools (git, kubectl, terraform, gh), ATIP provides everything agents needβ€”including enterprise-grade supply chain securityβ€”without infrastructure overhead.


Quick Start

For Tool Authors

Add ATIP support to your CLI tool in 30 minutes:

import json, sys

ATIP_METADATA = {
    "atip": {"version": "0.6"},
    "name": "mytool",
    "version": "1.0.0",
    "description": "Does something useful",
    "commands": {
        "run": {
            "description": "Execute main function",
            "options": [
                {
                    "name": "verbose",
                    "flags": ["-v", "--verbose"],
                    "type": "boolean",
                    "description": "Enable verbose output"
                }
            ],
            "effects": {
                "filesystem": {"write": true},
                "network": false,
                "idempotent": false
            }
        }
    }
}

if "--agent" in sys.argv:
    print(json.dumps(ATIP_METADATA))
    sys.exit(0)

# ... rest of your tool logic

See docs/adoption-guide.md for full details.

For Legacy Tools

For tools that don't natively support --agent, you can create shim files:

# ~/.local/share/agent-tools/shims/curl.json
{
  "atip": {"version": "0.6"},
  "name": "curl",
  "version": "8.4.0",
  "description": "Transfer data from or to a server",
  "commands": {
    "": {
      "description": "Make HTTP request",
      "options": [...],
      "effects": {"network": true, "idempotent": false}
    }
  }
}

Or use atip-gen to auto-generate metadata from --help output:

atip-gen curl -o shims/curl.json

For Agent Developers

Integrate ATIP into your AI agent:

from atip_bridge import discover_tools, compile_to_openai, execute_tool

# 1. Discovery
tools = discover_tools()  # Scans PATH and shims

# 2. Compile to provider format
openai_tools = [compile_to_openai(t) for t in tools]

# 3. Send to LLM
response = client.chat.completions.create(
    model="gpt-4",
    messages=messages,
    tools=openai_tools
)

# 4. Execute directly
for call in response.choices[0].message.tool_calls:
    result = execute_tool(call.function.name, call.function.arguments)

See docs/agent-integration.md for integration patterns.


Key Features

🎯 Zero Infrastructure

No servers, daemons, or sockets. Works on a fresh system with only the tool binary.

πŸ”’ Safety Metadata

Tools declare effects (destructive, idempotent, reversible, cost) so agents can make informed decisions:

{
  "effects": {
    "destructive": true,
    "reversible": false,
    "cost": {"billable": true}
  }
}

πŸ›‘οΈ Trust & Supply Chain Security

Cryptographically verify tool binaries and control what capabilities agents can useβ€”down to the parameter level:

{
  "trust": {
    "source": "native",
    "verified": true,
    "integrity": {
      "checksum": "sha256:e3b0c44298fc1c14...",
      "signature": {
        "type": "cosign",
        "identity": "https://github.com/cli/cli/.github/workflows/release.yml@refs/tags/v2.45.0",
        "issuer": "https://token.actions.githubusercontent.com"
      }
    },
    "provenance": {
      "url": "https://github.com/cli/cli/attestations/...",
      "format": "slsa-provenance-v1",
      "slsaLevel": 3
    }
  }
}

Enterprise-grade controls:

  • Binary verification β€” SHA-256 hash + Sigstore/Cosign signatures
  • Supply chain attestation β€” SLSA provenance verification
  • Trust levels β€” COMPROMISED β†’ UNSIGNED β†’ UNVERIFIED β†’ VERIFIED
  • Policy enforcement β€” Allowlist signers, builders, minimum trust levels
  • Capability gating β€” Restrict destructive operations to verified tools only

πŸ“¦ Partial Discovery

Large tools (kubectl, aws-cli) support filtered discovery to avoid context bloat:

$ kubectl --agent --commands=pods,deployments --depth=1

πŸ”„ Interactive Tool Handling

Metadata includes stdin/TTY requirements so agents know when tools need special handling:

{
  "interactive": {
    "stdin": "required",
    "prompts": true,
    "tty": false
  }
}

🌐 Universal Translation

ATIP compiles to native function calling formats for OpenAI, Gemini, and Anthropic with safety information preserved.

🀝 MCP Compatible

ATIP complements MCPβ€”use ATIP for discovery, MCP for stateful execution when needed.


Architecture

How ATIP tools work together to enable AI agents to safely use CLI tools:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           ATIP Toolchain                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚atip-discover β”‚ β†’  β”‚ atip-bridge β”‚ β†’  β”‚ LLM β”‚ β†’  β”‚ atip-execute β”‚        β”‚
β”‚  β”‚              β”‚    β”‚             β”‚    β”‚     β”‚    β”‚              β”‚        β”‚
β”‚  β”‚ Find tools   β”‚    β”‚ Compile to  β”‚    β”‚     β”‚    β”‚ Run safely   β”‚        β”‚
β”‚  β”‚ with --agent β”‚    β”‚ OpenAI/etc  β”‚    β”‚     β”‚    β”‚ with checks  β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚         ↑                                                  β”‚               β”‚
β”‚         β”‚            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                      ↓               β”‚
β”‚         β”‚            β”‚atip-registry β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚         └────────────│              β”‚              β”‚   CLI Tool   β”‚        β”‚
β”‚                      β”‚ Shim hosting β”‚              β”‚              β”‚        β”‚
β”‚                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚ gh, kubectl, β”‚        β”‚
β”‚                                                    β”‚ terraform... β”‚        β”‚
β”‚  Supporting: atip-validate, atip-gen,              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚              atip-lint, atip-diff                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

See reference/README.md for detailed tool documentation.


Repository Structure

atip/
β”œβ”€β”€ spec/rfc.md              # Full specification (v0.6.0)
β”œβ”€β”€ schema/0.6.json          # JSON Schema for validation
β”œβ”€β”€ examples/                # Example ATIP metadata
β”‚   β”œβ”€β”€ gh.json              # Full example (GitHub CLI)
β”‚   β”œβ”€β”€ minimal.json         # Minimal valid ATIP
β”‚   └── tools/               # Example tools implementing --agent
β”‚       β”œβ”€β”€ hello-atip       # Minimal bash example
β”‚       └── atip-echo        # Effects metadata example
β”œβ”€β”€ reference/               # Reference implementations
β”‚   β”œβ”€β”€ atip-bridge/         # TypeScript compiler library
β”‚   β”œβ”€β”€ atip-discover/       # Discovery CLI (TypeScript)
β”‚   β”œβ”€β”€ atip-discover-go/    # Discovery CLI (Go)
β”‚   β”œβ”€β”€ atip-validate/       # Schema validator
β”‚   └── atip-gen/            # Auto-generate from --help
└── docs/                    # Additional documentation
    β”œβ”€β”€ adoption-guide.md
    β”œβ”€β”€ agent-integration.md
    └── why-not-mcp.md

Documentation

Reference Tools

  • atip-discover β€” Scan PATH for ATIP-compatible tools
  • atip-validate β€” Validate ATIP metadata against schema
  • atip-gen β€” Generate ATIP metadata from --help output
  • atip-bridge β€” TypeScript library for compiling ATIP to provider formats

Examples

Minimal ATIP

{
  "atip": {"version": "0.6"},
  "name": "hello",
  "version": "1.0.0",
  "description": "Print a greeting",
  "commands": {
    "": {
      "description": "Say hello",
      "arguments": [
        {"name": "name", "type": "string", "required": true}
      ],
      "effects": {"filesystem": {}, "network": false}
    }
  }
}

Full Example

See examples/gh.json for a complete GitHub CLI example with:

  • Nested subcommands
  • Authentication requirements
  • Effect declarations
  • Usage patterns

Example Tools

See examples/tools/ for working CLI tools that implement --agent:

  • hello-atip β€” Minimal bash example
  • atip-echo β€” Demonstrates various effects metadata

Comparison to MCP

Aspect ATIP MCP
Purpose Tool introspection Stateful execution
Infrastructure None Server process
Typical tools gh, kubectl, terraform Playwright, databases
Use together? Yes β€” ATIP for discovery, MCP for execution

ATIP and MCP solve different problems. See docs/why-not-mcp.md for detailed comparison.


Status

Current Version: 0.6.0 (Draft)

This specification is open for community feedback and contributions.

Roadmap

  • v0.1.0 β€” Core protocol and schema
  • v0.2.0 β€” Partial discovery
  • v0.3.0 β€” Interactive effects
  • v0.4.0 β€” Trust and provenance
  • v0.5.0 β€” Cryptographic verification (SLSA/Sigstore)
  • v0.6.0 β€” Content-addressable registry
  • v1.0.0 β€” Stable release

Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • Proposing spec changes
  • Contributing shims
  • Reporting issues
  • Submitting implementations

License

This specification and reference implementations are released under the MIT License.


Links


Built for the agent-native future.

About

Lightweight protocol for introspecting local CLI tools so AI agents can understand capabilities, side effects, and safety without MCP servers.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •