How to Add ATXP to CrewAI

CrewAI makes it easy to build multi-agent workflows where each agent has a specialized role. ATXP gives each agent real-world capabilities — web access, email, payments, image generation — so the crew can execute tasks beyond text generation.


CrewAI three-agent crew with ATXP tool badges on each agent role card

The short answer

from crewai import Agent, Task, Crew
from atxp import AtxpToolkit

tools = AtxpToolkit.from_env().get_tools()

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

AtxpToolkit.from_env().get_tools() returns all ATXP tools as CrewAI-compatible tools. Pass the full list or a subset to each agent based on its role.


Prerequisites

pip install crewai atxp langchain-anthropic

npx atxp  # Provisions agent account
export ATXP_API_KEY="your-key-from-npx-atxp"

Complete setup: three-agent research crew

from crewai import Agent, Task, Crew, Process
from langchain_anthropic import ChatAnthropic
from atxp import AtxpToolkit

llm = ChatAnthropic(model="claude-3-7-sonnet-latest")
toolkit = AtxpToolkit.from_env()

# Researcher: web access only
researcher = Agent(
    role="Market Researcher",
    goal="Find accurate, current information on AI agent frameworks",
    backstory="Expert at navigating web sources and synthesizing research",
    llm=llm,
    tools=toolkit.get_tools(["web_search", "web_browse"])
)

# Writer: generation and storage
writer = Agent(
    role="Technical Writer",
    goal="Produce clear, accurate technical comparisons",
    backstory="Translates complex technical findings into readable reports",
    llm=llm,
    tools=toolkit.get_tools(["image_generate", "file_store"])
)

# Publisher: communication
publisher = Agent(
    role="Publisher",
    goal="Deliver the completed report to the right recipients",
    backstory="Handles final delivery and archival of research outputs",
    llm=llm,
    tools=toolkit.get_tools(["email_send", "file_store"])
)

# Tasks
research_task = Task(
    description="Research the top 5 AI agent frameworks released in Q1 2026. Find their key capabilities, pricing, and ecosystem support.",
    agent=researcher,
    expected_output="Structured comparison of 5 frameworks with capabilities, pricing, and ecosystem notes"
)

write_task = Task(
    description="Write a technical comparison report based on the research. Generate a summary diagram.",
    agent=writer,
    expected_output="Written report + architecture diagram image URL",
    context=[research_task]
)

publish_task = Task(
    description="Email the completed report to team@company.com and archive to file storage.",
    agent=publisher,
    expected_output="Email confirmation and file storage path",
    context=[write_task]
)

crew = Crew(
    agents=[researcher, writer, publisher],
    tasks=[research_task, write_task, publish_task],
    process=Process.sequential
)

result = crew.kickoff()

Tool allocation by role

Definition — Multi-Agent Tool Isolation
Multi-agent tool isolation is the practice of giving each agent in a crew only the specific tools required for its role — a researcher gets web search and browsing, a publisher gets email and file storage, a buyer gets payment tools only. This limits blast radius per agent, keeps each agent's behavior focused on its designated task, and ensures one agent's misbehavior cannot leverage another role's permissions.
— ATXP

Giving each agent only the tools it needs limits blast radius and keeps each agent focused:

RoleRecommended toolsWhy
Researcherweb_search, web_browseInformation gathering only
Analystweb_search, code_execute, file_storeComputation and storage
Writerimage_generate, file_storeContent creation
Publisheremail_send, file_storeDelivery and archival
Buyerweb_browse, payment_makeCommerce only
OrchestratorFull toolkitCoordinates, delegates
# Get specific tools by name
researcher_tools = toolkit.get_tools(["web_search", "web_browse"])
buyer_tools = toolkit.get_tools(["web_browse", "payment_make"])
full_tools = toolkit.get_tools()  # All tools

Per-agent spending isolation

For multi-crew setups where you want per-agent cost tracking:

# Create named agent accounts
npx atxp --agent "researcher"
npx atxp --agent "writer"
npx atxp --agent "publisher"

# Fund each separately
npx atxp fund --agent "researcher" --amount 20
npx atxp fund --agent "writer" --amount 30

Then load each agent’s account via environment variable:

import os

os.environ["ATXP_API_KEY"] = os.environ["ATXP_RESEARCHER_KEY"]
researcher_tools = AtxpToolkit.from_env().get_tools(["web_search", "web_browse"])

os.environ["ATXP_API_KEY"] = os.environ["ATXP_WRITER_KEY"]
writer_tools = AtxpToolkit.from_env().get_tools(["image_generate", "file_store"])

Each agent’s tool calls draw from its own IOU balance and appear in its own audit log.


pip install crewai atxp && npx atxp

10 free IOU tokens on registration. Full docs →

For other frameworks: LangChain → · OpenAI Agents SDK → · Claude Code →


Frequently asked questions

How do I add ATXP to CrewAI?

tools=AtxpToolkit.from_env().get_tools() in your Agent definition. Use get_tools(["tool1", "tool2"]) for a subset.

What does ATXP add to CrewAI?

14+ tools as native CrewAI tools — web search, browsing, image gen, email, payments, code execution, file storage.

Can different agents have different tools?

Yes — pass toolkit.get_tools(["web_search", "web_browse"]) to researcher, toolkit.get_tools(["email_send"]) to publisher.

Does each agent need its own ATXP account?

Optional. One account works for a crew. Separate accounts per agent enable per-agent spending isolation and audit trails.

How does payment work?

IOU balance charged per tool call automatically. Agent calls the tool; ATXP handles billing. How ATXP’s IOU model works →

Does it work with CrewAI task delegation?

Yes — tool access follows the agent, not the task. Delegated tasks use the receiving agent’s tool list.