Skip to main content

Trust infrastructure for AI agents - AI should do what it says, we make sure it does

Project description

AgentIntent

AI Should Do What It Says. We Make Sure It Does.

AgentIntent is the trust infrastructure for AI agents. Register your agents, declare their intent, and monitor their behavior to build trust.

Installation

pip install agentintent

With LangChain support:

pip install agentintent[langchain]

Quick Start

LangChain (2 lines of code)

from langchain.agents import AgentExecutor
from agentintent import AgentIntentCallback

# Just add our callback - that's it!
agent = AgentExecutor(
    agent=my_agent,
    tools=my_tools,
    callbacks=[AgentIntentCallback("ai_xxxxx")]  # ← Add this line
)

# Use your agent as normal
result = agent.invoke({"input": "Do something"})

With Intent Manifest (recommended)

Define what your agent should do, and we'll make sure it does:

from agentintent import AgentIntent, IntentManifest

# Define what your agent is supposed to do
manifest = IntentManifest(
    name="ExpenseBot",
    description="Processes expense reports",
    
    # Tools this agent is allowed to use
    allowed_tools=["email_read", "ocr", "form_submit"],
    
    # Tools this agent must NEVER use
    forbidden_tools=["code_execute", "file_delete", "send_email"],
    
    # Block violations instead of just warning
    enforcement_mode="block"
)

# Initialize AgentIntent
ai = AgentIntent(api_key="ai_xxxxx", manifest=manifest)

# Get the callback for LangChain
callback = ai.langchain_callback()

# Use with your agent
agent = AgentExecutor(
    agent=my_agent,
    tools=my_tools,
    callbacks=[callback]
)

# If agent tries to use a forbidden tool, it will be blocked
result = agent.invoke({"input": "Process this expense report"})

Universal Wrapper (any framework)

from agentintent import monitor

# Wrap any agent or function
monitored_agent = monitor(your_agent, api_key="ai_xxxxx")

# Or use as a decorator
@monitor(api_key="ai_xxxxx")
def my_agent_function(input):
    # Your agent logic
    return result

Features

🛡️ Intent Declaration

Tell us what your agent should do:

manifest = IntentManifest(
    name="CustomerServiceBot",
    allowed_tools=["search_kb", "send_response"],
    forbidden_tools=["access_billing", "modify_account"],
    allowed_api_patterns=["api.company.com/*"],
    forbidden_api_patterns=["*.stripe.com/*"],
)

📊 Automatic Monitoring

Every action is tracked:

  • LLM calls (model, tokens, duration)
  • Tool usage (which tools, inputs/outputs)
  • API calls (endpoints, patterns)
  • Agent decisions (reasoning, tool selection)

⚡ Real-Time Enforcement

Block bad behavior before it happens:

# enforcement_mode options:
# - "block": Raise exception on violation
# - "warn": Log warning but allow
# - "log": Just log, no warnings

manifest = IntentManifest(
    name="SecureBot",
    forbidden_tools=["dangerous_tool"],
    enforcement_mode="block"  # Will raise EnforcementError
)

🏆 Trust Score

Build reputation over time:

# Get your agent's trust score
score = ai.get_trust_score()
# {
#     "score": 94,
#     "tier": "TRUSTED",
#     "breakdown": {
#         "intent_alignment": 98,
#         "behavioral_consistency": 96,
#         "developer_reputation": 91,
#         "security_posture": 89
#     }
# }

Supported Frameworks

Framework Status Integration
LangChain ✅ Ready Callback handler
CrewAI 🚧 Coming Agent wrapper
AutoGen 🚧 Coming Message interceptor
LlamaIndex 🚧 Coming Event handler
Custom Python ✅ Ready Decorator/wrapper

Performance

AgentIntent is designed for zero-impact monitoring:

  • < 1ms overhead per action (local enforcement)
  • Async logging (never blocks your agent)
  • Batched uploads (efficient network usage)
  • Fail-safe (if our cloud is down, your agent keeps running)

Configuration

Environment Variables

export AGENTINTENT_API_KEY="ai_xxxxx"
export AGENTINTENT_BASE_URL="https://api.agentintent.ai/v1"  # optional

Manifest from File

# manifest.yaml
manifest = IntentManifest.from_file("manifest.yaml")
# manifest.yaml
name: MyAgent
version: "1.0.0"
description: Does useful things

allowed_tools:
  - search
  - calculator

forbidden_tools:
  - code_execute
  - file_delete

limits:
  max_llm_calls_per_minute: 60
  max_tool_calls_per_minute: 120

enforcement_mode: warn

API Reference

AgentIntent

ai = AgentIntent(
    api_key="ai_xxxxx",
    manifest=manifest,           # Optional: IntentManifest
    enforcement_mode="warn",     # Optional: override manifest
    cloud_enabled=True,          # Optional: disable cloud logging
)

# Get callbacks/wrappers
callback = ai.langchain_callback()

# Manual logging
ai.log_action("tool_call", {"tool": "search", "query": "..."})

# Check enforcement
result = ai.check_tool("dangerous_tool")
if result.blocked:
    print(f"Blocked: {result.reason}")

# Get metrics
metrics = ai.get_metrics()

# Cleanup
ai.close()

IntentManifest

manifest = IntentManifest(
    name="MyAgent",
    version="1.0.0",
    description="What this agent does",
    
    # Tool permissions
    allowed_tools=["tool1", "tool2"],
    forbidden_tools=["bad_tool"],
    
    # API permissions (regex patterns)
    allowed_api_patterns=["api.safe.com/*"],
    forbidden_api_patterns=["*.dangerous.com/*"],
    
    # Data permissions
    allowed_data_sources=["public_db"],
    forbidden_data_sources=["private_db", "credentials"],
    
    # Rate limits
    limits={
        "max_llm_calls_per_minute": 60,
        "max_tool_calls_per_minute": 120,
    },
    
    # Enforcement
    enforcement_mode="block",  # or "warn" or "log"
)

License

MIT License - see the LICENSE file in the repository.

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

agentintent-0.1.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

agentintent-0.1.1-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file agentintent-0.1.1.tar.gz.

File metadata

  • Download URL: agentintent-0.1.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for agentintent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e7f23acd12b3a760c2efe1e7623f5bb053d47830b9628f61d5c116231869fbb0
MD5 969ecd2bbd5a761719ec918f83bd3c5e
BLAKE2b-256 c36e15deb135342887295792fe0916385246da3a8488d16196e936a0e17c0d71

See more details on using hashes here.

File details

Details for the file agentintent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: agentintent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for agentintent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd6380d94dbe723add5cd6e6d9c25ca770fb49b5bcef0dc7e5e32b0bb467dcf2
MD5 5acd9979a274f3b8ec124a1cf0b2474b
BLAKE2b-256 8bd440823b1c15d862133744de2b38904e92c2d4bfff1317e8de6336bac52a59

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