import Link from "next/link"; import { NavigationMenu } from "../components/navigationMenu"; import { FaCogs } from "react-icons/fa"; import { env } from "@sourcebot/shared"; const agents = [ { id: "review-agent", name: "Review Agent", description: "An AI code review agent that reviews your PRs. Uses the code indexed on Sourcebot to provide codebase-wide context.", requiredEnvVars: ["GITHUB_REVIEW_AGENT_APP_ID", "GITHUB_REVIEW_AGENT_APP_WEBHOOK_SECRET", "GITHUB_REVIEW_AGENT_APP_PRIVATE_KEY_PATH", "OPENAI_API_KEY"], configureUrl: "https://docs.sourcebot.dev/docs/features/agents/review-agent" }, ]; export default async function AgentsPage(props: { params: Promise<{ domain: string }> }) { const params = await props.params; const { domain } = params; return (
{agents.map((agent) => (
{/* Name and description */}

{agent.name}

{agent.description}

{/* Actions */}
{agent.requiredEnvVars.every(envVar => envVar in env && env[envVar as keyof typeof env] !== undefined) ? (
Agent is configured and accepting requests on /api/webhook
) : ( Configure )}
))}
); }