Loading the notebook…
Loading the notebook…
Notebooks · First agents · 06
This notebook shows how to attach Gmail and other connector tools through the credential store.
Its imports and arguments are checked against shipit-agent 3.0. The outputs were saved when it was written, for an earlier release.
from pathlib import Path
import sys
ROOT = (
Path.cwd().resolve().parent
if Path.cwd().name == "notebooks"
else Path.cwd().resolve()
)
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from examples.run_multi_tool_agent import build_llm_from_env
from shipit_agent import (
Agent,
CredentialRecord,
FileCredentialStore,
GmailTool,
GoogleCalendarTool,
GoogleDriveTool,
JiraTool,
LinearTool,
SlackTool,
)credential_store = FileCredentialStore(
ROOT / ".shipit_notebooks" / "connector_creds.json"
)
credential_store.set(
CredentialRecord(
key="gmail",
provider="gmail",
secrets={
"access_token": "ACCESS_TOKEN",
"refresh_token": "REFRESH_TOKEN",
"client_id": "CLIENT_ID",
"client_secret": "CLIENT_SECRET",
},
)
)
llm = build_llm_from_env("bedrock")
agent = Agent(
llm=llm,
credential_store=credential_store,
tools=[
GmailTool(),
GoogleCalendarTool(),
GoogleDriveTool(),
SlackTool(),
LinearTool(),
JiraTool(),
],
)
sorted(tool.name for tool in agent.tools)After replacing placeholder secrets with real credentials, you can test actions like Gmail search, Slack channel history, Linear issue lookup, and Jira transitions through the same agent runtime.