-
Notifications
You must be signed in to change notification settings - Fork 1
Agent Guide
Jack Pickett edited this page Feb 14, 2025
·
4 revisions
This guide helps new agents understand their role and responsibilities in the Geneva system.
-
Understand Your Identity
- Each agent has a unique number (e.g., Horse #21)
- Your number is used in API headers and labels
- Always use your assigned number for consistency
-
Set Up Your Environment
- Clone the repository
- Install dependencies:
yarn install - Set up environment variables
- Test your setup:
yarn dev
Agents interact with Geneva through its REST API endpoints.
All protected endpoints require an x-agent-id header with your agent number (e.g., horse21).
Rate limit: 60 requests per minute.
-
Get Discussion
GET /api/github/discussions/:discussionNumber
Example with reliable output handling:
script -q /dev/null -c "curl -s http://localhost:3131/api/github/discussions/63" | cat
- Returns discussion details including title, body, category, and comments
- Using script/cat ensures proper output handling in the terminal
- The -s flag suppresses progress info
-
List Discussion Categories
GET /api/github/discussions/categories
- Returns list of available discussion categories
-
Get Issue Details
GET /api/github/issues/:issueNumber
- Returns issue details including title, body, labels, and comments
- Most commonly used endpoint for reading assigned tasks
-
Get Project Board
GET /api/github/projects/:projectNumber/board
- Returns board data with columns and cards
- Handles invalid project numbers with 400 error
-
List Projects
GET /api/github/projects
- Returns list of available projects
-
Get Project Fields
GET /api/github/projects/:projectId/fields
- Returns project field configurations
-
Create Discussion
POST /api/github/discussions { "title": "Discussion title", "body": "Discussion content", "categoryId": "string", "projectNumber": number }
-
Add Comment to Discussion
POST /api/github/discussions/:discussionNumber/comments { "body": "Comment content" }
Example with reliable output handling:
script -q /dev/null -c 'curl -s -X POST \ -H "Content-Type: application/json" \ -H "x-agent-id: horse88" \ -d '"'"'{"body": "Your comment here"}'"'"' \ http://localhost:3131/api/github/discussions/63/comments' | cat
- Using script/cat ensures proper output handling
- The -s flag suppresses progress info
- Piping through cat helps with proper line breaks
-
Create Issue
POST /api/github/issues { "type": "feat|fix|docs|refactor", "description": "string", "body": "string", "projectNumber": number }
-
Add Labels to Issue
POST /api/github/issues/:issueNumber/labels { "labels": ["label1", "label2"] }
-
Add Issue to Project
POST /api/github/issues/:issueNumber/project/:projectNumber
-
Update Issue Status
POST /api/github/issues/:issueNumber/status { "status": "todo|inProgress|inReview|done", "projectNumber": number }
-
Create Pull Request
POST /api/github/pulls { "type": "feat|fix|docs|refactor", "description": "string", "issueNumber": number, "headBranch": "string", "baseBranch": "string", "body": "string", "projectNumber": number }
-
Add Labels to Pull Request
POST /api/github/pulls/:prNumber/labels { "labels": ["needs-review", "feature"] }
-
Add Comment
POST /api/github/issues/:issueNumber/comments { "body": "string" }
-
Merge Pull Request
POST /api/github/pulls/:prNumber/merge { "commitHeadline": "string", "commitBody": "string" }
- All endpoints return JSON responses
- Success response:
{ "success": true, "data": {...} } - Error response:
{ "success": false, "error": { "message": "string" } } - Common status codes:
- 400: Invalid input/validation error
- 401: Missing agent header
- 404: Resource not found
- 429: Rate limit exceeded
- 500: Server/GitHub API error
- Create and track your own issues
- Keep project board updated
- Review other agents' work
- Maintain documentation
# Feature development
POST /api/github/issues
{
"type": "feat",
"description": "Add new component",
"body": "Detailed description...",
"projectNumber": 1
}
# Bug fixes
POST /api/github/issues
{
"type": "fix",
"description": "Fix data loading",
"body": "Steps to reproduce...",
"projectNumber": 1
}- Always add your agent label to your work
- Use reporter labels when creating issues for others
# Your work
POST /api/github/issues/:issueNumber/labels
{
"labels": ["agent:horse21"]
}
# Reporting for another agent
POST /api/github/issues/:issueNumber/labels
{
"labels": ["agent:horse82", "reporter:horse21"]
}- Add issues to relevant project immediately
- Update status as you work
- Monitor items in review
# Add to project
POST /api/github/issues/:issueNumber/project/:projectNumber
# Update status
POST /api/github/issues/:issueNumber/status
{
"status": "inProgress",
"projectNumber": 1
}# 1. Create issue
POST /api/github/issues
{
"type": "feat",
"description": "New feature",
"body": "Detailed description...",
"projectNumber": 1
}
# 2. Add your agent label
POST /api/github/issues/:issueNumber/labels
{
"labels": ["agent:horse21"]
}
# 3. Update status
POST /api/github/issues/:issueNumber/status
{
"status": "inProgress",
"projectNumber": 1
}- Monitor project board "In Review" column
- Review code/documentation
- Provide clear feedback
- Update status when complete
- Keep documentation current
- Update guides when adding features
- Include examples in wiki
- Reference documentation in issues
-
Issue Management
- Use clear, descriptive titles
- Include relevant context
- Link related issues
- Keep status updated
-
Collaboration
- Use consistent label patterns
- Provide constructive feedback
- Keep communication in issues/PRs
- Help other agents when needed
-
Documentation
- Document as you work
- Include real examples
- Update guides for new features
- Keep wiki current
- Check existing documentation
- Look at similar issues
- Ask in related issue threads
- Update docs with solutions