Skip to main content

Python SDK for agenttool.dev — memory and tools for AI agents

Project description

agenttool-sdk · Python

Persistent memory, verified actions, and tool access for AI agents — one API key.

PyPI Python License: MIT API Status

pip install agenttool-sdk

What is this?

AgentTool gives AI agents the infrastructure they need to operate reliably:

Service What it does
agent-memory Persistent semantic memory — store facts, retrieve by similarity
agent-tools Web search, page scraping, code execution
agent-verify SHA-256 proof-of-work attestations with timestamps
agent-economy Wallets, credits, agent-to-agent billing

All four services, one API key, one SDK.

Quick start (60 seconds)

1. Get your API key — create a free project at app.agenttool.dev

2. Set your key:

export AT_API_KEY=at_your_key_here

3. Store and retrieve a memory:

from agenttool import AgentTool

at = AgentTool()  # reads AT_API_KEY from env

# Store a memory
memory = at.memory.store(
    content="The user prefers dark mode and concise responses",
    agent_id="my-assistant",
    tags=["preference", "ui"]
)

# Retrieve it later (semantic search)
results = at.memory.search("what does the user prefer?", limit=5)
for r in results:
    print(f"{r.score:.2f}  {r.content}")

Usage

Memory

from agenttool import AgentTool

at = AgentTool(api_key="at_...")  # or use AT_API_KEY env var

# Store
mem = at.memory.store("User is based in London, timezone Europe/London")

# Search (semantic)
results = at.memory.search("where is the user?")

# Retrieve by ID
mem = at.memory.get(memory_id="mem_...")

# Delete
at.memory.delete(memory_id="mem_...")

Tools

# Web search
results = at.tools.search("latest papers on RAG", num_results=5)
for r in results:
    print(r.title, r.url)

# Scrape a page
page = at.tools.scrape("https://example.com")
print(page.text)

# Execute code
output = at.tools.execute("import math; print(math.pi)")
print(output.stdout)

Verify

# Create an attestation
proof = at.verify.create(
    action="task_completed",
    agent_id="my-agent",
    payload={"task": "data_analysis", "rows_processed": 1500}
)
print(proof.attestation_id, proof.hash)

# Verify an attestation
result = at.verify.check(attestation_id="att_...")
print(result.valid)  # True

Economy

# Create a wallet
wallet = at.economy.create_wallet(name="agent-wallet")

# Check balance
balance = at.economy.get_balance(wallet_id=wallet.id)

# Transfer credits to another agent
at.economy.transfer(
    from_wallet=wallet.id,
    to_wallet="wlt_...",
    amount=10,
    memo="payment for search service"
)

Integration example — LangChain

from langchain.tools import tool
from agenttool import AgentTool

at = AgentTool()

@tool
def remember(content: str) -> str:
    """Store a memory for later retrieval."""
    mem = at.memory.store(content, agent_id="langchain-agent")
    return f"Stored memory: {mem.id}"

@tool
def recall(query: str) -> str:
    """Search past memories by semantic similarity."""
    results = at.memory.search(query, limit=3)
    return "\n".join(r.content for r in results)

Integration example — any agent loop

from agenttool import AgentTool

at = AgentTool()

def agent_loop(user_message: str) -> str:
    # Recall relevant memories
    memories = at.memory.search(user_message, limit=5)
    context = "\n".join(m.content for m in memories)

    # Call your LLM with context
    response = your_llm(f"Context:\n{context}\n\nUser: {user_message}")

    # Store the exchange
    at.memory.store(f"User said: {user_message}\nAgent replied: {response}")

    return response

Free tier

Resource Free Seed ($29/mo) Grow ($99/mo)
Memory ops/day 100 10,000 100,000
Tool calls/day 10 500 5,000
Verifications/day 5 100 1,000

Upgrade at app.agenttool.dev/billing

Configuration

from agenttool import AgentTool

at = AgentTool(
    api_key="at_...",          # default: AT_API_KEY env var
    base_url="https://api.agenttool.dev",  # default
    timeout=30,                # seconds
)

Links

License

MIT

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

agenttool_sdk-0.2.4.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

agenttool_sdk-0.2.4-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file agenttool_sdk-0.2.4.tar.gz.

File metadata

  • Download URL: agenttool_sdk-0.2.4.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for agenttool_sdk-0.2.4.tar.gz
Algorithm Hash digest
SHA256 99a514c0db0e22e6a2e731860e32bc8fd28e98a42d40568340a94203ba4ed24d
MD5 3165c25b19ebeeec170d76d19d76d72e
BLAKE2b-256 2ef94622a868091049a57847204b96a6f9c93e9f8b7e1f48fa52b42a80e0ab43

See more details on using hashes here.

File details

Details for the file agenttool_sdk-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: agenttool_sdk-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for agenttool_sdk-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b59c04127e3e5a8edbde1a410aad494e1fe391cdfb225da8bad5f3570c2d53e
MD5 cd12d408ddf2322848159bbdc4fed7d9
BLAKE2b-256 e764cc3e17ff4237481b1db31c23c5077198ac8716c3105d93dfe7592f9978b0

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