You'll need a GitHub token for this challenge. Create your token by following GitHub's documentation.
For a fine-grained token, use these settings:
- Repository access: All repositories
- Issues permission: Read and write
check more detail information in this link
For a classic personal access token, make sure to include the repo scope.
check more detail information in this link
-
Clone the following repository - https://github.com/vessl-ai/2025-02-hacknight-bootstrap
git clone https://github.com/vessl-ai/2025-02-hacknight-bootstrap.git cd 2025-02-hacknight-bootstrap
-
Install utilities - we need uv and orbstack
- uv: Hyperpocket uses this as package manager.
- orbstack: Hyperpocket runs tools with this underneath.
brew install uv # skip if you already have one brew install orbstack # to run docker container, skip if you already have simliar one.
-
Install dependencies - run the following
cd 01_github_issue_cleanup_agent uv sync
-
Set up environment variables in
.env
OPENAI_API_KEY="your-openai-api-key" OPENAI_API_BASE="openai-api-base" MODEL_NAME="model-name" GITHUB_TOKEN="your-github-token"
(optional) if you want to use deepseek or some other model, you can use fireworks inference api.
OPENAI_API_KEY="your-fireworks-api-key" OPENAI_API_BASE="https://api.fireworks.ai/inference/v1" MODEL_NAME="accounts/fireworks/models/deepseek-v3" GITHUB_TOKEN="your-github-token"
- more detail information link
-
Test if your agent starts well!
# on `01_github_issue_agent` dir uv run python agent.py
Go to 01_github_issue_cleanup_agent/agent.py#L16:
pocket = PocketLangchain(
tools=[
# Add your tools here
])
You can add the following tools:
- issue-cleanup
- cleanup your issue.
- tool url: https://github.com/vessl-ai/2025-02-hacknight-bootstrap/tree/main/tools/issue-cleanup
- list-issues
- lists the github issues for a repository
- tool url: https://github.com/vessl-ai/2025-02-hacknight-bootstrap/tree/main/tools/list-issues
pocket = PocketLangchain(
tools=[
("https://github.com/vessl-ai/2025-02-hacknight-bootstrap/tree/main/tools/list-issues",
{"GITHUB_TOKEN": os.getenv("GITHUB_TOKEN")}),
("https://github.com/vessl-ai/2025-02-hacknight-bootstrap/tree/main/tools/issue-cleanup",
{"GITHUB_TOKEN": os.getenv("GITHUB_TOKEN")})
])
- the dictionary values will be sent into runtime environment.
Run again and play with the agent.
You can see the list of Hyperpocket managed tools in https://github.com/vessl-ai/hyperpocket/tree/main/tools.
-
Create your directory as <TEAMNAME_AGENTNAME> and copy upper example(github_issue_cleanup_agent) into it.
-
Tune system prompt and add tools to the agent.
-
Tool region is the same as the previous example.
- Run the agent and see the magic.
To add a custom tool, follow the docs https://vessl-ai.github.io/hyperpocket/tools/using-function-tools.html