Skip to content

Buck Agent Tools

The Buck agent has access to MCP toolsets (Sourcegraph, Grafana) and custom function tools registered via ADK’s functiontool.New. Tools are defined in internal/buck/agent/ with typed args/results.

ToolsetSourcePurpose
SourcegraphMCP serverCode search across all repos
GrafanaMCP serverDashboards, metrics, logs, alerts

MCP auth: A custom http.RoundTripper injects auth headers for Sourcegraph (token transport). Grafana MCP requires no auth headers.

Creates a Jira ticket in the configured project. Registers a jira:<issueKey> session index entry so future events on the ticket resolve to the same session.

Used for: Implementation work that needs backlog tracking.

Searches Jira for existing tickets using JQL.

Creates a dashboard session for tracking work. Optionally links a jira_key and registers session index entries so future events resolve to the same session.

Sets the default Jira project for the user’s team. Resolves the user’s team via their email and cached Pack mapping, then updates the team settings.

Dispatches an async Claude session via an ephemeral EKS pod through the PodOrchestrator. Natively multi-repo — accepts repos []string where a single entry is a single-repo session and multiple entries span repos. Mode is optional: when empty, Claude decides what to do; when set to plan, restricts to planning only.

  • Records a PendingSession mapping so the pod callback can resume the correct ADK session
  • Pod authenticates back to the agent’s runner API using a pod-bound JWT (HMAC-signed)
  • Returns immediately with a session UUID and pod name
  • Optionally accepts extra instructions for Claude

Resumes a paused Claude session by dispatching a new EKS pod that restores workspace and conversation state from S3. The session picks up exactly where it left off with full conversation history. Optionally accepts follow-up instructions so the resumed session knows what to do next.

Posts messages to the Slack thread associated with the current session. Supports two modes:

  • Plain text: Simple text message
  • Block Kit: Interactive messages with buttons, selects, date pickers when blocks are provided

The tool resolves its target via the session index (LookupBySession) rather than parsing the session ID.

A runAgentWithSlackFallback helper ensures respond_in_slack is called — if the agent finishes without posting to Slack (or errors out), a fallback message is posted automatically.

Posts plain text comments on the Jira ticket associated with the current session. A runAgentWithJiraFallback helper provides the same guarantee for Jira-originated sessions.

Posts updates to a #bucky-feed Slack channel. When a jira_key is provided:

  1. Fetches Jira watchers for the ticket
  2. Resolves their Slack user IDs via email lookup
  3. Appends @mentions to the feed post

Enabled by SLACK_FEED_CHANNEL_ID.

Large LLM prompts (system instruction, tool descriptions) live in internal/buck/agent/prompts/*.md and are embedded at compile time via //go:embed. This keeps prompts easy to edit without touching Go code.

The agent’s system prompt includes a “Claude Code Runner Capabilities” section that teaches it what dispatched Claude sessions can do (MCP tools, shell access, browser automation, test execution) so it knows when to offload tasks to session pods.