Agent Configuration
Relevant source files
The following files were used as context for generating this wiki page:
The Agent Configuration system serves as the central orchestration layer for managing AI agents (GitHub Copilot, Claude, and Codex) within the GeNCorE Command Center. It defines the identity, visual representation, and GitHub integration parameters for each supported agent, ensuring consistent behavior across both the user interface and the backend API operations.
This system is responsible for mapping internal agent identifiers to specific GitHub metadata, such as bot login names and issue labels, which facilitates the automated assignment of tasks and the detection of agent-driven pull requests.
Core Agent Definitions
The project centralizes agent metadata in lib/agents.ts using the AgentConfig interface. This configuration dictates how agents appear in the UI and how they are referenced in GitHub API calls.
Agent Configuration Schema
The AgentConfig structure includes identification, GitHub integration details, and styling tokens for Tailwind CSS.
| Field | Type | Description |
|---|---|---|
id | AgentId | Unique literal identifier (copilot, claude, or codex). |
label | string | Human-readable name displayed in the UI. |
emoji | string | Visual icon associated with the agent. |
githubLogin | string | The GitHub username or bot account for assignment. |
issueLabel | string | The specific GitHub label applied to tasks for this agent. |
color | string | Tailwind text color class. |
borderColor | string | Tailwind border color class. |
badgeColor | string | Tailwind background/text classes for PR status badges. |
selectedBg | string | UI state styling for active selection in forms. |
Sources: lib/agents.ts:10-24, lib/agents.ts:26-62
Predefined Agents
The system currently supports three primary AI agents:
- GitHub Copilot: Identified as
copilot, using purple branding and theagent:copilotlabel. - Claude (Anthropic): Identified as
claude, using orange branding and theclaude[bot]login. - Codex (OpenAI): Identified as
codex, using blue branding and thecodex[bot]login.
Sources: lib/agents.ts:26-62
Task Orchestration Logic
Agents are assigned tasks through the creation of GitHub Issues. The system uses the configuration to automatically populate issue parameters like assignees and labels.
Task Creation Workflow
When a user submits a task via the TaskForm, the backend API fetches the relevant AgentConfig to construct the GitHub Issue payload.
This workflow ensures that tasks are routed to the correct AI bot by leveraging the githubLogin and issueLabel fields from the configuration.
Sources: app/api/task/route.ts:40-75, components/TaskForm.tsx:28-55
Agent Identification and Status
The system dynamically determines agent status and activity by inspecting repository data, specifically Pull Requests (PRs).
Detection Logic
The detectAgentFromPR function identifies which agent is responsible for a PR by analyzing the branch name (headRef) or the author's login.
export function detectAgentFromPR(
headRef: string,
authorLogin: string
): AgentConfig | null {
const branch = headRef.toLowerCase()
const author = authorLogin.toLowerCase()
if (branch.includes('copilot') || author.includes('copilot')) {
return AGENTS_BY_ID.copilot
}
// Logic continues for claude and codex...
}
Sources: lib/agents.ts:74-106
Status Mapping
Agent status is derived in the Dashboard based on whether there are active PRs associated with that agent's configuration.
| Status | Condition | UI Representation |
|---|---|---|
online | No active PRs detected for the agent. | Green dot, "Aktywny" label. |
busy | One or more active PRs detected. | Yellow dot, "Zajęty" label. |
offline | Fallback state (default). | Gray dot, "Offline" label. |
Sources: app/page.tsx:50-55, components/AgentCard.tsx:18-30
Visual Representation
The UI components AgentCard and PRCard use the configuration to maintain brand consistency.
Component Relationship
The AgentCard displays the agent's name, emoji, current status, and a link to their most recent PR if they are "busy". The PRCard uses the detectAgentFromPR utility to apply the correct agent's color and label to the PR entry.
Sources: components/AgentCard.tsx:32-75, components/PRCard.tsx:32-40
Conclusion
Agent Configuration in this project is a robust, centralized metadata system that bridges the gap between the web interface and GitHub's issue/PR infrastructure. By defining specific identifiers, styling tokens, and detection logic, the system allows for seamless multi-agent management and clear visibility into AI-driven development activities.