Overview

Enable your agents to manage issues, projects, and development workflows through Linear. Create and update issues, manage project timelines, organize teams, and streamline your software development process with AI-powered automation.

Prerequisites

Before using the Linear integration, ensure you have:

  • A CrewAI Enterprise account with an active subscription
  • A Linear account with appropriate workspace permissions
  • Connected your Linear account through the Integrations page

Setting Up Linear Integration

1. Connect Your Linear Account

  1. Navigate to CrewAI Enterprise Integrations
  2. Find Linear in the Authentication Integrations section
  3. Click Connect and complete the OAuth flow
  4. Grant the necessary permissions for issue and project management
  5. Copy your Enterprise Token from Account Settings

2. Install Required Package

uv add crewai-tools

Available Actions

Usage Examples

Basic Linear Agent Setup

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

# Get enterprise tools (Linear tools will be included)
enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

# Create an agent with Linear capabilities
linear_agent = Agent(
    role="Development Manager",
    goal="Manage Linear issues and track development progress efficiently",
    backstory="An AI assistant specialized in software development project management.",
    tools=[enterprise_tools]
)

# Task to create a bug report
create_bug_task = Task(
    description="Create a high-priority bug report for the authentication system and assign it to the backend team",
    agent=linear_agent,
    expected_output="Bug report created successfully with issue ID"
)

# Run the task
crew = Crew(
    agents=[linear_agent],
    tasks=[create_bug_task]
)

crew.kickoff()

Filtering Specific Linear Tools

from crewai_tools import CrewaiEnterpriseTools

# Get only specific Linear tools
enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token",
    actions_list=["linear_create_issue", "linear_update_issue", "linear_search_issue"]
)

issue_manager = Agent(
    role="Issue Manager",
    goal="Create and manage Linear issues efficiently",
    backstory="An AI assistant that focuses on issue creation and lifecycle management.",
    tools=enterprise_tools
)

# Task to manage issue workflow
issue_workflow = Task(
    description="Create a feature request issue and update the status of related issues to reflect current progress",
    agent=issue_manager,
    expected_output="Feature request created and related issues updated"
)

crew = Crew(
    agents=[issue_manager],
    tasks=[issue_workflow]
)

crew.kickoff()

Project and Team Management

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

project_coordinator = Agent(
    role="Project Coordinator",
    goal="Coordinate projects and teams in Linear efficiently",
    backstory="An experienced project coordinator who manages development cycles and team workflows.",
    tools=[enterprise_tools]
)

# Task to coordinate project setup
project_coordination = Task(
    description="""
    1. Search for engineering teams in Linear
    2. Create a new project for Q2 feature development
    3. Associate the project with relevant teams
    4. Create initial project milestones as issues
    """,
    agent=project_coordinator,
    expected_output="Q2 project created with teams assigned and initial milestones established"
)

crew = Crew(
    agents=[project_coordinator],
    tasks=[project_coordination]
)

crew.kickoff()

Issue Hierarchy and Sub-task Management

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

task_organizer = Agent(
    role="Task Organizer",
    goal="Organize complex issues into manageable sub-tasks",
    backstory="An AI assistant that breaks down complex development work into organized sub-tasks.",
    tools=[enterprise_tools]
)

# Task to create issue hierarchy
hierarchy_task = Task(
    description="""
    1. Search for large feature issues that need to be broken down
    2. For each complex issue, create sub-issues for different components
    3. Update the parent issues with proper descriptions and links to sub-issues
    4. Assign sub-issues to appropriate team members based on expertise
    """,
    agent=task_organizer,
    expected_output="Complex issues broken down into manageable sub-tasks with proper assignments"
)

crew = Crew(
    agents=[task_organizer],
    tasks=[hierarchy_task]
)

crew.kickoff()

Automated Development Workflow

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

workflow_automator = Agent(
    role="Workflow Automator",
    goal="Automate development workflow processes in Linear",
    backstory="An AI assistant that automates repetitive development workflow tasks.",
    tools=[enterprise_tools]
)

# Complex workflow automation task
automation_task = Task(
    description="""
    1. Search for issues that have been in progress for more than 7 days
    2. Update their priorities based on due dates and project importance
    3. Create weekly sprint planning issues for each team
    4. Archive completed issues from the previous cycle
    5. Generate project status reports as new issues
    """,
    agent=workflow_automator,
    expected_output="Development workflow automated with updated priorities, sprint planning, and status reports"
)

crew = Crew(
    agents=[workflow_automator],
    tasks=[automation_task]
)

crew.kickoff()

Troubleshooting

Common Issues

Permission Errors

  • Ensure your Linear account has necessary permissions for the target workspace
  • Verify that the OAuth connection includes required scopes for Linear API
  • Check if you have create/edit permissions for issues and projects in the workspace

Invalid IDs and References

  • Double-check team IDs, issue IDs, and project IDs for correct UUID format
  • Ensure referenced entities (teams, projects, cycles) exist and are accessible
  • Verify that issue identifiers follow the correct format (e.g., “ABC-1”)

Team and Project Association Issues

  • Use LINEAR_SEARCH_TEAMS to get valid team IDs before creating issues or projects
  • Ensure teams exist and are active in your workspace
  • Verify that team IDs are properly formatted as UUIDs

Issue Status and Priority Problems

  • Check that status IDs reference valid workflow states for the team
  • Ensure priority values are within the valid range for your Linear configuration
  • Verify that custom fields and labels exist before referencing them

Date and Time Format Issues

  • Use ISO 8601 format for due dates and timestamps
  • Ensure time zones are handled correctly for due date calculations
  • Verify that date values are valid and in the future for due dates

Search and Filter Issues

  • Ensure search queries are properly formatted and not empty
  • Use valid field names in filter formulas: title, number, project, createdAt
  • Test simple filters before building complex multi-condition queries
  • Verify that operator types match the data types of the fields being filtered

Sub-issue Creation Problems

  • Ensure parent issue IDs are valid and accessible
  • Verify that the team ID for sub-issues matches or is compatible with the parent issue’s team
  • Check that parent issues are not already archived or deleted

Getting Help

Need Help?

Contact our support team for assistance with Linear integration setup or troubleshooting.