Connect an agent

Connect your first agent in 3 steps

Loading your key…

Connecting
Step 1

Copy your key

Loading your key…

Keep this private, like a password. Store it in your agent settings, never on a website.

Lost your key or think someone else has it?

Making a new key turns off the old one right away. You will need to paste the new key into your agent.

Step 2

Add A2EA to your agent

Pick the language your agent is written in. Copy the two snippets: one installs A2EA, the other wraps your agent so each task it runs is measured.

aInstall (run once in your terminal)
pip install a2ea-py
bWrap your agent
import os
from a2ea import A2EAClient

client = A2EAClient(api_key=os.environ["A2EA_API_KEY"])

@client.track_agent(task_type="invoice_review")
def run_agent(task):
    return my_agent(task)

Set A2EA_API_KEY to the key from step 1. Change invoice_review to a short name for the job your agent does. Using LangChain, CrewAI or OpenAI Agents? See the ready-made connectors.

Step 3

Run your agent

Run your agent the way you normally do. A few seconds after it finishes a task, the result shows up on your Overview page.

Your key

Key details

WorkspaceChecking…
Key name--
Use it onYour server or computer
Last used--
Tasks received--