Agent framework integration

Twin Browser + AutoGen

AutoGen is Microsoft’s framework for multi-agent LLM applications — conversable agents that call registered functions and coordinate to complete a task. Functions registered with an agent become callable tools the model can invoke during a conversation.

Agent framework3 MCP tools: run · compile_skill · run_skillBearer key auth

How Twin plugs into AutoGen

Twin’s AutoGen adapter registers a browser function on your assistant agent. When the model decides it needs the web, it calls the function with a goal and Twin executes it on the compile-once execution layer. The cross-tenant skill corpus means a skill compiled by one workflow can be safely reused by another, so the cache hit rate — and the savings — climb as the network runs.

Twin is the browser execution layer your stack calls. The first run cold-compiles a skill; every similar request after that is matched from the cache and replayed deterministically, so your marginal cost per run trends toward zero.

app.example.com
  1. Receive goal from AutoGendone
  2. Compile DOM → token-efficient indexed statedone
  3. Match the semantic dispatch cacherunning
  4. Replay compiled skill — 0 LLM callsqueued
Wire it up

Drop Twin into AutoGen

Copy, paste, and swap in your Bearer key. The first run compiles a skill; repeats hit the semantic dispatch cache and replay deterministically.

AutoGen — register a browser functionpython
from autogen import AssistantAgent, UserProxyAgent
from twin_browser.autogen import register_twin

assistant = AssistantAgent("assistant", llm_config=llm_config)
user = UserProxyAgent("user", human_input_mode="NEVER")

# Registers a 'twin_run(goal, url)' function the assistant can call.
register_twin(assistant, user, api_key="tw_live_xxx")

user.initiate_chat(
    assistant,
    message="Pull this month's usage from the vendor dashboard and summarize it",
)

Base URL https://twin-browser.com/api/v1 · auth Authorization: Bearer tw_live_… · MCP tools run, compile_skill, run_skill.

Get started

Connect AutoGen in 4 steps

Install → configure your key → make the first call. The cache takes over from there.

  1. 1
    Install the adapter

    pip install twin-browser includes the AutoGen helper.

  2. 2
    Register the function

    Register twin_run on your AssistantAgent and UserProxyAgent.

  3. 3
    Authenticate

    Pass your TWIN_API_KEY to the adapter constructor.

  4. 4
    Start the chat

    Kick off the conversation; the agent calls twin_run when it needs the browser.

Why this stays cheap at scale

Most browser infrastructure re-runs the LLM on every execution, so cost climbs with usage. Twin compiles a task once via skill compilation, matches re-phrased requests to it, and replays without the model — so repeated workflows stop scaling with your token bill.

FAQ

AutoGen on Twin — common questions

Can multiple AutoGen agents share Twin skills?
Yes. Skills are compiled at the tenant level, so every agent in your workflow reuses them — and the cross-tenant corpus extends that benefit across the network where a skill is safe to share.
Does Twin handle login and MFA inside an AutoGen run?
Yes. Credentials live in the encrypted vault, and a step that needs approval or MFA triggers a human-in-the-loop handoff, then the run resumes.

Wire up AutoGen in minutes

Free to start. Usage-based credits from $29/mo, with LLM cost metered and passed through at 1×.