# Bart

```json
{
  "name": "Bart",
  "slug": "bart",
  "url": "https://composio.dev/toolkits/bart",
  "markdown_url": "https://composio.dev/toolkits/bart.md",
  "logo_url": "https://logos.composio.dev/api/bart",
  "categories": [
    "scheduling & booking"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-05-12T10:02:26.975Z"
}
```

![Bart logo](https://logos.composio.dev/api/bart)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Bart MCP or direct API to fetch train schedules, get live service alerts, plan multi-leg routes, and check station information through natural language.

## Summary

Bart is the Bay Area Rapid Transit system, providing fast public transportation across the San Francisco Bay Area. It helps commuters and travelers get real-time schedule info, plan routes, and stay updated on service changes.

## Categories

- scheduling & booking

## Toolkit Details

- Tools: 18

## Images

- Logo: https://logos.composio.dev/api/bart

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Bart.
  - Setup:
    - Configure Api Key credentials for Bart.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Find next departures from Embarcadero station
- Get real-time trip updates for Richmond line
- Check current BART service advisories and alerts
- Plan trip arriving at SFO airport by 9 AM

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `BART_BART_GET_API_VERSION` | Get BART API Version | Get the current version of the BART API. This action retrieves version information for the BART (Bay Area Rapid Transit) API, including the current API version number, copyright information, and license details. This is useful for verifying API compatibility and ensuring you're working with the expected API version. The BART API is currently at version 3.10 and supports both XML and JSON output formats. Use this action to confirm which version of the API you're interfacing with and to access licensing information. |
| `BART_GET_ELEVATOR_STATUS` | Get Elevator Status | Tool to fetch current elevator status across all BART stations. Use when you need real-time elevator availability information for accessibility planning or route guidance. |
| `BART_GET_ESTIMATED_DEPARTURES` | Get Estimated Departures | Tool to get real-time estimated departure times for a specified BART station. Returns live train departure predictions including minutes until departure, platform assignments, train lengths, line colors, bicycle accommodation, and delay information. Use this when you need current departure times for planning trips or checking train status. |
| `BART_GET_FARE` | Get BART Fare | Get fare information between two BART stations including Clipper and cash prices. Returns multiple fare types (Clipper, cash, senior/disabled, youth, Clipper START) with their respective prices. Use this when you need to find out how much a BART trip costs between two stations. |
| `BART_GET_GTFS_ALERTS` | Get GTFS-RT Service Alerts | Tool to fetch GTFS-RT service alerts in protobuf format for integration with GTFS static feed. Use when you need real-time service advisories, disruptions, or alert information. |
| `BART_GET_GTFS_RT_TRIP_UPDATES` | Get GTFS-RT Trip Updates | Tool to fetch real-time trip updates in GTFS-Realtime format. Use when you need the latest live trip information as raw protobuf. |
| `BART_GET_GTFS_STATIC_SCHEDULE_FEED` | Download GTFS Static Schedule Feed | Downloads the BART static GTFS (General Transit Feed Specification) schedule feed as a ZIP archive. The GTFS feed contains comprehensive transit data including stations, routes, trip schedules, fares, and service calendars in standardized CSV format. Use this to access complete BART schedule information for route planning, analysis, or integration with transit applications. |
| `BART_BART_GET_ROUTE_INFO` | Get Route Info | Tool to fetch detailed information about a specific BART route. Use when you know the route number (1–12) or need all routes configuration. Call after confirming the route ID. |
| `BART_GET_ROUTE_SCHEDULE` | Get Route Schedule | Tool to get detailed schedule information for a specific BART route showing all trains and their stops. Use when you need to see the complete schedule for a route including departure times, station stops, bike policies, and passenger load indicators. Call this after determining the specific route number (1-12). |
| `BART_GET_SCHEDULE_ARRIVE` | Get BART Schedule Arrive | Tool to retrieve schedule information based on a specified arrival time. Use when planning trips arriving by a given time. |
| `BART_GET_SCHEDULE_DEPART` | Get BART Schedule Depart | Get BART train schedules departing from an origin station to a destination station at a specified time. Returns multiple trip options with departure/arrival times, fares (Clipper, cash, senior/disabled, youth), transfer details, train information, and platform numbers. Use this when you need to plan BART trips with specific departure times or when users ask about train schedules between two stations. |
| `BART_GET_SERVICE_ADVISORIES` | Get Service Advisories | Tool to fetch current BART service advisories. Use when you need up-to-date system-wide or station-level alerts before presenting or planning transit routes. |
| `BART_GET_STATION_ACCESS` | Get Station Access | Get comprehensive station access information including parking, transit, bike facilities, and lockers. Returns detailed access information for a specific BART station including: entering/exiting instructions, parking availability and lot capacity, bike parking and bike station details, locker availability, car-sharing options, nearby destinations, and connected transit services. Use this when you need to help users understand how to access a BART station or what facilities are available. |
| `BART_GET_STATION_INFO` | Get Station Info | Get detailed information for a specific BART station by its abbreviation code. Returns comprehensive station details including: name, location (address, city, county, coordinates), routes serving the station (northbound/southbound), platform information, nearby amenities (food, shopping, attractions), and general station description. Use this when you need detailed information about a specific BART station and you already have its 4-letter abbreviation code (e.g., 'EMBR' for Embarcadero, 'MONT' for Montgomery Street, '12TH' for 12th Street Oakland). |
| `BART_BART_GET_STATIONS` | Get BART Stations | Get a list of all BART stations with their complete information. This action retrieves information about all BART (Bay Area Rapid Transit) stations including station names, abbreviation codes, geographic coordinates (latitude/longitude), and full addresses. This is useful for finding station locations, getting station codes for other API calls, or building station lookup tools. |
| `BART_GET_STATION_SCHEDULE` | Get Station Schedule | Get detailed scheduled departure information for a specific BART station. Returns all trains departing from the station including route line, destination, departure time, bike allowance, crowding level, and platform number. Use this when you need to see all departures from a specific station. |
| `BART_GET_TRAIN_COUNT` | Get Train Count | Tool to fetch current count of trains active in the BART system. Use when you need real-time information about how many trains are currently operating. |
| `BART_LIST_ROUTES` | List BART Routes | Tool to get a list of all current BART routes/lines with basic information. Use when you need to see all available routes, their colors, directions, or route numbers. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK
```python
pip install composio_openai
```

```typescript
npm install @composio/openai
```

#### Path 1, Step 2: Initialize Composio and Create Tool Router Session

Import and initialize Composio client, then create a Tool Router session
```python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
```

```typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
```

#### Path 1, Step 3: Execute Bart Tools via Tool Router with Your Agent

Get tools from Tool Router session and execute Bart actions with your Agent
```python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Show me the next trains departing from Embarcadero to Fremont after 5pm today.'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
```

```typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Show me the next trains departing from Embarcadero to Fremont after 5pm today.'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and Claude Agent SDK
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
```

#### Path 2, Step 2: Create Tool Router Session

Initialize the Composio client and create a Tool Router session
```python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
```

```typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
```

#### Path 2, Step 3: Connect to AI Agent

Use the MCP server with your AI agent
```python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Bart tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Show me the next trains from Embarcadero to Fremont this afternoon')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Show me the next trains from Embarcadero to Fremont this afternoon' }],
  stopWhen: stepCountIs( 5 )
});

console.log(`Agent: ${text}`);
```

## Why Use Composio?

### 1. AI Native Bart Integration

- Supports both Bart MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Bart data

### 2. Managed Auth

- Built-in API key management with secure storage
- Central place to manage, scope, and revoke Bart access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Bart
- Scoped, least privilege access to Bart resources
- Full audit trail of agent actions to support review and compliance

## Use Bart with any AI Agent Framework

Choose a framework you want to connect Bart with:

- [OpenAI Agents SDK](https://composio.dev/toolkits/bart/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/bart/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/bart/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/bart/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/bart/framework/codex)
- [OpenClaw](https://composio.dev/toolkits/bart/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/bart/framework/hermes-agent)
- [Google ADK](https://composio.dev/toolkits/bart/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/bart/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/bart/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/bart/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/bart/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/bart/framework/crew-ai)
- [Pydantic AI](https://composio.dev/toolkits/bart/framework/pydantic-ai)
- [AutoGen](https://composio.dev/toolkits/bart/framework/autogen)

## Related Toolkits

- [Google Calendar](https://composio.dev/toolkits/googlecalendar) - Google Calendar is a time management service for scheduling meetings, events, and reminders. It streamlines personal and team organization with integrated notifications and sharing options.
- [Apaleo](https://composio.dev/toolkits/apaleo) - Apaleo is a cloud-based property management platform for hospitality businesses. It centralizes reservations, billing, and daily operations for smoother hotel management.
- [Appointo](https://composio.dev/toolkits/appointo) - Appointo is an appointment booking platform for Shopify stores. It lets businesses add online scheduling to their websites with zero coding.
- [Bookingmood](https://composio.dev/toolkits/bookingmood) - Bookingmood is commission-free booking software for rental businesses. It lets you manage reservations and sync bookings directly on your website.
- [Booqable](https://composio.dev/toolkits/booqable) - Booqable is a rental software platform for managing inventory, bookings, and reservations. It helps businesses streamline rentals and keep track of every item with ease.
- [Cal](https://composio.dev/toolkits/cal) - Cal is a meeting scheduling platform that offers shareable booking links and real-time calendar syncing. It streamlines the process of finding mutual availability to make scheduling effortless.
- [Calendarhero](https://composio.dev/toolkits/calendarhero) - Calendarhero is a powerful scheduling platform that streamlines your calendar management across multiple services. It helps you efficiently schedule, reschedule, and organize meetings without the back-and-forth.
- [Calendly](https://composio.dev/toolkits/calendly) - Calendly is an appointment scheduling tool that automates meeting invitations, availability checks, and reminders. It helps individuals and teams avoid endless email back-and-forth when booking meetings.
- [Etermin](https://composio.dev/toolkits/etermin) - eTermin is an online appointment scheduling platform for businesses to manage bookings. It streamlines client appointments, saving time and reducing scheduling conflicts.
- [Evenium](https://composio.dev/toolkits/evenium) - Evenium is an all-in-one platform for managing professional events, from planning to analysis. It helps teams simplify event logistics, boost engagement, and track every detail in one place.
- [Eventee](https://composio.dev/toolkits/eventee) - Eventee is a user-friendly event management platform for mobile and web. It boosts attendee engagement for in-person, virtual, and hybrid events.
- [Eventzilla](https://composio.dev/toolkits/eventzilla) - Eventzilla is an event management platform for creating, promoting, and running events. It streamlines ticketing, registration, and attendee coordination for organizers.
- [Humanitix](https://composio.dev/toolkits/humanitix) - Humanitix is a not-for-profit ticketing platform that donates 100% of profits to charity. It empowers event organizers to make social impact with every ticket sold.
- [Lodgify](https://composio.dev/toolkits/lodgify) - Lodgify is an all-in-one vacation rental software for property managers and owners. It centralizes bookings, guest messaging, and channel synchronization in one dashboard.
- [Planyo Online Booking](https://composio.dev/toolkits/planyo_online_booking) - Planyo Online Booking is a flexible reservation system for managing bookings by day, hour, or event. It streamlines scheduling for any business needing reservations.
- [Scheduleonce](https://composio.dev/toolkits/scheduleonce) - Scheduleonce is a scheduling platform for capturing, qualifying, and engaging with inbound leads. It streamlines appointment booking and follow-ups for faster lead conversion.
- [Supersaas](https://composio.dev/toolkits/supersaas) - Supersaas is a flexible appointment scheduling platform for businesses and individuals. It streamlines bookings, reminders, and calendar management in one place.
- [Sympla](https://composio.dev/toolkits/sympla) - Sympla is a platform for managing in-person and online events, ticket sales, and registrations. It streamlines event setup, attendee tracking, and digital content delivery.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.

## Frequently Asked Questions

### Do I need my own developer credentials to use Bart with Composio?

Yes, Bart requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
