Skip to main content

AIP identity and delegation for AI agent frameworks

Project description

aip-agents

AIP identity and delegation for AI agent frameworks. Add cryptographic identity, scoped delegation chains, and audit-ready token flows to your agents in 5 lines of code.

Supports CrewAI, Google ADK, and LangChain.

Install

pip install aip-agents[crewai]    # CrewAI
pip install aip-agents[adk]       # Google ADK
pip install aip-agents[langchain] # LangChain
pip install aip-agents[all]       # All frameworks

Quick Start: CrewAI

from crewai import Crew, Agent, Task
from aip_agents.adapters.crewai import AIPCrewPlugin

plugin = AIPCrewPlugin()

researcher = Agent(role="researcher", ...)
writer = Agent(role="writer", ...)
crew = Crew(agents=[researcher, writer], tasks=[...])

plugin.register(crew)  # Each agent gets an AIP identity + delegation token
crew.kickoff()

Quick Start: Google ADK

from google.adk import Agent, Runner
from aip_agents.adapters.adk import AIPAdkPlugin

plugin = AIPAdkPlugin()

agent = Agent(name="coordinator", sub_agents=[worker1, worker2], ...)
runner = Runner(agent=agent)

plugin.register(runner)  # Walks agent tree, creates delegation chains
runner.run("task")

Quick Start: LangChain

from langchain.agents import AgentExecutor, create_tool_calling_agent
from aip_agents.adapters.langchain import AIPLangChainPlugin

plugin = AIPLangChainPlugin()

# Register single agent
plugin.register(agent_executor, name="researcher")

# Or register multiple agents (supervisor pattern)
plugin.register_agents({
    "researcher": researcher_executor,
    "writer": writer_executor,
})

# Get headers for tool calls
headers = plugin.get_tool_call_headers("researcher")
# {"X-AIP-Token": "eyJ..."}

What You Get

When you register a plugin, every agent gets:

  1. Cryptographic identity - An Ed25519 keypair and AIP identifier (aip:key:ed25519:z...)
  2. Delegation chain - When a parent agent delegates to a sub-agent, a Biscuit token chain records the delegation with attenuated scope
  3. Tool call headers - X-AIP-Token headers ready to attach to outgoing tool/MCP calls

Enable logging to see it in action:

from aip_agents import AIPConfig

plugin = AIPCrewPlugin(AIPConfig(log_tokens=True))

Output:

[AIP] Identity created: researcher -> aip:key:ed25519:z6Fk3...
[AIP] Delegation: manager -> researcher [scope: web_search] [chain depth: 2]
[AIP] Tool call: researcher -> web_search [chain depth: 3, verified]

Configuration

AIPConfig(
    app_name="my-app",          # Root identity label
    auto_identity=True,          # Auto-assign identity to every agent
    auto_delegation=True,        # Auto-create delegation chains
    persist_keys=False,          # Save keys to ~/.aip/keys/
    log_tokens=False,            # Log token operations
    default_scope=None,          # Default scope for root token
)

How It Works

  • Identity: Each agent gets an Ed25519 keypair. The public key becomes the agent's AIP identifier.
  • Tokens: Authority tokens use Biscuit - an append-only cryptographic token that enforces scope can only narrow, never widen.
  • Delegation: When Agent A delegates to Agent B, a new block is appended to A's token with B's identity and attenuated scope. The chain is cryptographically verifiable.
  • Tool calls: Tokens are attached via X-AIP-Token header, compatible with AIP MCP middleware for end-to-end verification.

Links

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

aip_agents-0.2.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

aip_agents-0.2.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file aip_agents-0.2.0.tar.gz.

File metadata

  • Download URL: aip_agents-0.2.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aip_agents-0.2.0.tar.gz
Algorithm Hash digest
SHA256 289664551d996388d6288b3376b1653e1880db499bcd6a0a199984308d61e180
MD5 491dad42d1659e1dc01b0f6d372286a0
BLAKE2b-256 687fdcf08943a5a1bc4b5ec912efa0b763b9ddd1f03a3863814d58701379a8cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for aip_agents-0.2.0.tar.gz:

Publisher: publish-aip-agents.yml on sunilp/aip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aip_agents-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aip_agents-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aip_agents-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9118a9ec69a4af119bde5923b756b84f82330a097f0c132bdc96af2886426e16
MD5 335c99b00214ab14aa4adcc5d69f004b
BLAKE2b-256 7899a069e75f68bf03e547abe41389a33df622a38462dd10af721f3101bc7d50

See more details on using hashes here.

Provenance

The following attestation bundles were made for aip_agents-0.2.0-py3-none-any.whl:

Publisher: publish-aip-agents.yml on sunilp/aip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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