build-with-ag2

Linear Agent

An AG2-powered agent that manages your Linear issues through natural language. It connects to Linear via Arcade — a managed OAuth2 service that handles authorization for you, so there’s no token storage or manual API setup required.

What the Agent Can Do

Example prompts:

AG2 Features

Stack

Component Role
AG2 Multi-agent orchestration (AssistantAgent + UserProxyAgent)
Arcade SDK Managed OAuth2 + tool execution for Linear
OpenAI GPT-4o LLM backend
Linear Project management target

Installation

  1. Install dependencies using uv:

    uv sync
    
  2. Set up environment variables:

    cp .env.example .env
    # Fill in your keys
    

    Required variables (see .env.example for details):

    Variable Where to get it
    OPENAI_API_KEY platform.openai.com/api-keys
    ARCADE_API_KEY docs.arcade.dev/home/api-keys
    ARCADE_USER_ID Email used to sign up at arcade.dev

Running the Agent

source .env && uv run python main.py

On the first run, Arcade will print an OAuth URL in the terminal — open it in your browser to authorize Linear. Subsequent runs skip this step (token is cached by Arcade).

Type your request at the You: prompt. Type exit to quit.

Build with AG2

This project is built with AG2 (Formerly AutoGen) and utilizes the following features from the library:

  1. ConversableAgent — LLM-powered agent that reasons over user requests and decides which tools to call
  2. Tool use — Python functions registered on both agents for reading and writing Linear issues via Arcade SDK

Check out more projects built with AG2 at Build with AG2!

Contact

License

This project is licensed under the Apache License 2.0. See the LICENSE for details.