github-agent 0.11.0__tar.gz → 0.14.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- github_agent-0.14.0/PKG-INFO +310 -0
- github_agent-0.14.0/README.md +289 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/agent_server.py +31 -24
- github_agent-0.14.0/github_agent/api_client.py +546 -0
- github_agent-0.14.0/github_agent/mcp_server.py +690 -0
- github_agent-0.14.0/github_agent.egg-info/PKG-INFO +310 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent.egg-info/SOURCES.txt +1 -0
- github_agent-0.14.0/github_agent.egg-info/requires.txt +6 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/pyproject.toml +4 -3
- github_agent-0.14.0/scripts/verify_api_integration.py +279 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/tests/test_concept_parity.py +27 -19
- {github_agent-0.11.0 → github_agent-0.14.0}/tests/test_github_agent_brute_force_coverage.py +2 -2
- {github_agent-0.11.0 → github_agent-0.14.0}/tests/test_startup.py +4 -5
- github_agent-0.11.0/PKG-INFO +0 -292
- github_agent-0.11.0/README.md +0 -272
- github_agent-0.11.0/github_agent/api_client.py +0 -278
- github_agent-0.11.0/github_agent/mcp_server.py +0 -292
- github_agent-0.11.0/github_agent.egg-info/PKG-INFO +0 -292
- github_agent-0.11.0/github_agent.egg-info/requires.txt +0 -5
- {github_agent-0.11.0 → github_agent-0.14.0}/LICENSE +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/__init__.py +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/__main__.py +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/auth.py +1 -1
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/github_input_models.py +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/github_response_models.py +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent/mcp_config.json +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent.egg-info/dependency_links.txt +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent.egg-info/entry_points.txt +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/github_agent.egg-info/top_level.txt +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/scripts/validate_a2a_agent.py +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/setup.cfg +0 -0
- {github_agent-0.11.0 → github_agent-0.14.0}/tests/test_github_agent_api_brute_force_coverage.py +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: github-agent
|
|
3
|
+
Version: 0.14.0
|
|
4
|
+
Summary: GitHub Agent for MCP
|
|
5
|
+
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
8
|
+
Classifier: License :: Public Domain
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: <3.14,>=3.11
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: agent-utilities[agent,logfire]>=0.16.0
|
|
16
|
+
Provides-Extra: test
|
|
17
|
+
Requires-Dist: pytest-xdist>=3.6.0; extra == "test"
|
|
18
|
+
Requires-Dist: pytest; extra == "test"
|
|
19
|
+
Requires-Dist: pytest-asyncio; extra == "test"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# Github Agent
|
|
23
|
+
## CLI or API | MCP | Agent
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+

|
|
27
|
+

|
|
28
|
+

|
|
29
|
+

|
|
30
|
+

|
|
31
|
+

|
|
32
|
+

|
|
33
|
+

|
|
34
|
+

|
|
35
|
+

|
|
36
|
+

|
|
37
|
+

|
|
38
|
+

|
|
39
|
+

|
|
40
|
+

|
|
41
|
+

|
|
42
|
+

|
|
43
|
+
|
|
44
|
+
*Version: 0.14.0*
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Overview
|
|
49
|
+
|
|
50
|
+
**Github Agent** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with GitHub Agent for MCP.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Key Features
|
|
55
|
+
|
|
56
|
+
- **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
|
|
57
|
+
- **Enterprise-Grade Security:** Comprehensive support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
|
|
58
|
+
- **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
|
|
59
|
+
- **Native Telemetry & Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## CLI or API
|
|
64
|
+
|
|
65
|
+
This agent wraps the GitHub Agent for MCP API. You can interact with it programmatically or via its integrated execution entrypoints.
|
|
66
|
+
|
|
67
|
+
Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in [docs/index.md](file:///home/apps/workspace/agent-packages/agents/github-agent/docs/index.md).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## MCP
|
|
72
|
+
|
|
73
|
+
This server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
|
|
74
|
+
|
|
75
|
+
### Available MCP Tools
|
|
76
|
+
| Tool Module | Toggle Env Var | Enabled by Default | Description & Nested Methods |
|
|
77
|
+
|-------------|----------------|--------------------|------------------------------|
|
|
78
|
+
| **Repo** | `REPOSTOOL` | `True` | Manage GitHub repositories. Action-routed methods: `list`, `get`, `create`, `delete`, `update`. |
|
|
79
|
+
| **Issue** | `ISSUETOOL` | `True` | Manage GitHub issues. Action-routed methods: `list`, `get`, `create`, `update`. |
|
|
80
|
+
| **Pull** | `PULLSTOOL` | `True` | Manage GitHub pull requests. Action-routed methods: `list`, `get`, `create`, `update`. |
|
|
81
|
+
| **Content** | `CONTENTSTOOL` | `True` | Manage GitHub contents. Action-routed methods: `get`, `create`, `update`, `delete`. |
|
|
82
|
+
| **Branch** | `BRANCHESTOOL` | `True` | Manage GitHub branches. Action-routed methods: `list`, `get`, `create`, `delete`. |
|
|
83
|
+
| **Commit** | `COMMITSTOOL` | `True` | Manage GitHub commits. Action-routed methods: `list`, `get`. |
|
|
84
|
+
|
|
85
|
+
Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](file:///home/apps/workspace/agent-packages/agents/github-agent/docs/mcp.md).
|
|
86
|
+
|
|
87
|
+
### MCP Configuration Examples
|
|
88
|
+
|
|
89
|
+
#### stdio Transport (Recommended for local IDEs e.g., Cursor, Claude Desktop)
|
|
90
|
+
Configure your IDE's `mcp.json` to launch the MCP server via `uvx`:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": {
|
|
95
|
+
"github-agent": {
|
|
96
|
+
"command": "uvx",
|
|
97
|
+
"args": [
|
|
98
|
+
"--from",
|
|
99
|
+
"github-agent",
|
|
100
|
+
"github-mcp"
|
|
101
|
+
],
|
|
102
|
+
"env": {
|
|
103
|
+
"GITHUB_URL": "your_github_url_here",
|
|
104
|
+
"GITHUB_VERIFY": "your_github_verify_here",
|
|
105
|
+
"DEBUG": "your_debug_here",
|
|
106
|
+
"PYTHONUNBUFFERED": "your_pythonunbuffered_here",
|
|
107
|
+
"GITHUB_TOKEN": "your_github_token_here"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### Streamable-HTTP Transport (Recommended for production deployments)
|
|
115
|
+
Configure your client's `mcp.json` to launch the Streamable-HTTP server via `uvx` with explicit host and port definition:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"mcpServers": {
|
|
120
|
+
"github-agent": {
|
|
121
|
+
"command": "uvx",
|
|
122
|
+
"args": [
|
|
123
|
+
"--from",
|
|
124
|
+
"github-agent",
|
|
125
|
+
"github-mcp"
|
|
126
|
+
],
|
|
127
|
+
"env": {
|
|
128
|
+
"TRANSPORT": "streamable-http",
|
|
129
|
+
"HOST": "0.0.0.0",
|
|
130
|
+
"PORT": "8000",
|
|
131
|
+
"GITHUB_URL": "your_github_url_here",
|
|
132
|
+
"GITHUB_VERIFY": "your_github_verify_here",
|
|
133
|
+
"DEBUG": "your_debug_here",
|
|
134
|
+
"PYTHONUNBUFFERED": "your_pythonunbuffered_here",
|
|
135
|
+
"GITHUB_TOKEN": "your_github_token_here"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Alternatively, connect to a pre-deployed remote or local Streamable-HTTP instance:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"github-agent": {
|
|
148
|
+
"url": "http://localhost:8000/github-agent/mcp"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Deploying the Streamable-HTTP server via Docker:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
docker run -d \
|
|
158
|
+
--name github-agent-mcp \
|
|
159
|
+
-p 8000:8000 \
|
|
160
|
+
-e TRANSPORT=streamable-http \
|
|
161
|
+
-e PORT=8000 \
|
|
162
|
+
-e GITHUB_URL="your_value" \
|
|
163
|
+
-e GITHUB_VERIFY="your_value" \
|
|
164
|
+
-e DEBUG="your_value" \
|
|
165
|
+
-e PYTHONUNBUFFERED="your_value" \
|
|
166
|
+
-e GITHUB_TOKEN="your_value" \
|
|
167
|
+
knucklessg1/github-agent:latest
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Agent
|
|
173
|
+
|
|
174
|
+
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts seamlessly with the **Agent Web UI (AG-UI)** and Terminal interface.
|
|
175
|
+
|
|
176
|
+
### Running the Agent CLI
|
|
177
|
+
To start the interactive command-line agent:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Set credentials
|
|
181
|
+
export GITHUB_URL="your_value"
|
|
182
|
+
export GITHUB_VERIFY="your_value"
|
|
183
|
+
export DEBUG="your_value"
|
|
184
|
+
export PYTHONUNBUFFERED="your_value"
|
|
185
|
+
export GITHUB_TOKEN="your_value"
|
|
186
|
+
|
|
187
|
+
# Run the agent server
|
|
188
|
+
github-agent --provider openai --model-id gpt-4o
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Docker Compose Orchestration
|
|
192
|
+
The following `docker/agent.compose.yml` configures the Agent, Web UI, and Terminal Interface together:
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
version: '3.8'
|
|
196
|
+
|
|
197
|
+
services:
|
|
198
|
+
github-agent-mcp:
|
|
199
|
+
image: knucklessg1/github-agent:latest
|
|
200
|
+
container_name: github-agent-mcp
|
|
201
|
+
hostname: github-agent-mcp
|
|
202
|
+
restart: always
|
|
203
|
+
env_file:
|
|
204
|
+
- ../.env
|
|
205
|
+
environment:
|
|
206
|
+
- PYTHONUNBUFFERED=1
|
|
207
|
+
- HOST=0.0.0.0
|
|
208
|
+
- PORT=8000
|
|
209
|
+
- TRANSPORT=streamable-http
|
|
210
|
+
ports:
|
|
211
|
+
- "8000:8000"
|
|
212
|
+
healthcheck:
|
|
213
|
+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
|
214
|
+
interval: 30s
|
|
215
|
+
timeout: 10s
|
|
216
|
+
retries: 3
|
|
217
|
+
start_period: 10s
|
|
218
|
+
logging:
|
|
219
|
+
driver: json-file
|
|
220
|
+
options:
|
|
221
|
+
max-size: "10m"
|
|
222
|
+
max-file: "3"
|
|
223
|
+
|
|
224
|
+
github-agent-agent:
|
|
225
|
+
image: knucklessg1/github-agent:latest
|
|
226
|
+
container_name: github-agent-agent
|
|
227
|
+
hostname: github-agent-agent
|
|
228
|
+
restart: always
|
|
229
|
+
depends_on:
|
|
230
|
+
- github-agent-mcp
|
|
231
|
+
env_file:
|
|
232
|
+
- ../.env
|
|
233
|
+
command: [ "github-agent" ]
|
|
234
|
+
environment:
|
|
235
|
+
- PYTHONUNBUFFERED=1
|
|
236
|
+
- HOST=0.0.0.0
|
|
237
|
+
- PORT=9016
|
|
238
|
+
- MCP_URL=http://github-agent-mcp:8000/mcp
|
|
239
|
+
- PROVIDER=${PROVIDER:-openai}
|
|
240
|
+
- MODEL_ID=${MODEL_ID:-gpt-4o}
|
|
241
|
+
- ENABLE_WEB_UI=True
|
|
242
|
+
- ENABLE_OTEL=True
|
|
243
|
+
ports:
|
|
244
|
+
- "9016:9016"
|
|
245
|
+
healthcheck:
|
|
246
|
+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9016/health')"]
|
|
247
|
+
interval: 30s
|
|
248
|
+
timeout: 10s
|
|
249
|
+
retries: 3
|
|
250
|
+
start_period: 10s
|
|
251
|
+
logging:
|
|
252
|
+
driver: json-file
|
|
253
|
+
options:
|
|
254
|
+
max-size: "10m"
|
|
255
|
+
max-file: "3"
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in [docs/agent.md](file:///home/apps/workspace/agent-packages/agents/github-agent/docs/agent.md).
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Security & Governance
|
|
264
|
+
|
|
265
|
+
Built directly upon the enterprise-ready [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities) core, standard security parameters are fully supported:
|
|
266
|
+
|
|
267
|
+
### Access Control & Policy Enforcement
|
|
268
|
+
- **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.
|
|
269
|
+
- **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
|
|
270
|
+
- **Scoped Credentials:** Execution context runs restricted to the specific caller identity.
|
|
271
|
+
|
|
272
|
+
### Runtime Security Grid
|
|
273
|
+
| Feature | Functionality | Enablement |
|
|
274
|
+
|---------|---------------|------------|
|
|
275
|
+
| **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
|
|
276
|
+
| **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
|
|
277
|
+
| **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Installation
|
|
282
|
+
|
|
283
|
+
Install the Python package locally:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# Using uv (highly recommended)
|
|
287
|
+
uv pip install github-agent[all]
|
|
288
|
+
|
|
289
|
+
# Using standard pip
|
|
290
|
+
python -m pip install github-agent[all]
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Repository Owners
|
|
296
|
+
|
|
297
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
298
|
+
|
|
299
|
+

|
|
300
|
+

|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Contribute
|
|
305
|
+
|
|
306
|
+
Contributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:
|
|
307
|
+
- Format code using `ruff format .`
|
|
308
|
+
- Lint code using `ruff check .`
|
|
309
|
+
- Validate type-safety with `mypy .`
|
|
310
|
+
- Execute test suites using `pytest`
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# Github Agent
|
|
2
|
+
## CLI or API | MCP | Agent
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+

|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
*Version: 0.14.0*
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Overview
|
|
28
|
+
|
|
29
|
+
**Github Agent** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with GitHub Agent for MCP.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Key Features
|
|
34
|
+
|
|
35
|
+
- **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
|
|
36
|
+
- **Enterprise-Grade Security:** Comprehensive support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
|
|
37
|
+
- **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
|
|
38
|
+
- **Native Telemetry & Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## CLI or API
|
|
43
|
+
|
|
44
|
+
This agent wraps the GitHub Agent for MCP API. You can interact with it programmatically or via its integrated execution entrypoints.
|
|
45
|
+
|
|
46
|
+
Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in [docs/index.md](file:///home/apps/workspace/agent-packages/agents/github-agent/docs/index.md).
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## MCP
|
|
51
|
+
|
|
52
|
+
This server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
|
|
53
|
+
|
|
54
|
+
### Available MCP Tools
|
|
55
|
+
| Tool Module | Toggle Env Var | Enabled by Default | Description & Nested Methods |
|
|
56
|
+
|-------------|----------------|--------------------|------------------------------|
|
|
57
|
+
| **Repo** | `REPOSTOOL` | `True` | Manage GitHub repositories. Action-routed methods: `list`, `get`, `create`, `delete`, `update`. |
|
|
58
|
+
| **Issue** | `ISSUETOOL` | `True` | Manage GitHub issues. Action-routed methods: `list`, `get`, `create`, `update`. |
|
|
59
|
+
| **Pull** | `PULLSTOOL` | `True` | Manage GitHub pull requests. Action-routed methods: `list`, `get`, `create`, `update`. |
|
|
60
|
+
| **Content** | `CONTENTSTOOL` | `True` | Manage GitHub contents. Action-routed methods: `get`, `create`, `update`, `delete`. |
|
|
61
|
+
| **Branch** | `BRANCHESTOOL` | `True` | Manage GitHub branches. Action-routed methods: `list`, `get`, `create`, `delete`. |
|
|
62
|
+
| **Commit** | `COMMITSTOOL` | `True` | Manage GitHub commits. Action-routed methods: `list`, `get`. |
|
|
63
|
+
|
|
64
|
+
Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](file:///home/apps/workspace/agent-packages/agents/github-agent/docs/mcp.md).
|
|
65
|
+
|
|
66
|
+
### MCP Configuration Examples
|
|
67
|
+
|
|
68
|
+
#### stdio Transport (Recommended for local IDEs e.g., Cursor, Claude Desktop)
|
|
69
|
+
Configure your IDE's `mcp.json` to launch the MCP server via `uvx`:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"github-agent": {
|
|
75
|
+
"command": "uvx",
|
|
76
|
+
"args": [
|
|
77
|
+
"--from",
|
|
78
|
+
"github-agent",
|
|
79
|
+
"github-mcp"
|
|
80
|
+
],
|
|
81
|
+
"env": {
|
|
82
|
+
"GITHUB_URL": "your_github_url_here",
|
|
83
|
+
"GITHUB_VERIFY": "your_github_verify_here",
|
|
84
|
+
"DEBUG": "your_debug_here",
|
|
85
|
+
"PYTHONUNBUFFERED": "your_pythonunbuffered_here",
|
|
86
|
+
"GITHUB_TOKEN": "your_github_token_here"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
#### Streamable-HTTP Transport (Recommended for production deployments)
|
|
94
|
+
Configure your client's `mcp.json` to launch the Streamable-HTTP server via `uvx` with explicit host and port definition:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"mcpServers": {
|
|
99
|
+
"github-agent": {
|
|
100
|
+
"command": "uvx",
|
|
101
|
+
"args": [
|
|
102
|
+
"--from",
|
|
103
|
+
"github-agent",
|
|
104
|
+
"github-mcp"
|
|
105
|
+
],
|
|
106
|
+
"env": {
|
|
107
|
+
"TRANSPORT": "streamable-http",
|
|
108
|
+
"HOST": "0.0.0.0",
|
|
109
|
+
"PORT": "8000",
|
|
110
|
+
"GITHUB_URL": "your_github_url_here",
|
|
111
|
+
"GITHUB_VERIFY": "your_github_verify_here",
|
|
112
|
+
"DEBUG": "your_debug_here",
|
|
113
|
+
"PYTHONUNBUFFERED": "your_pythonunbuffered_here",
|
|
114
|
+
"GITHUB_TOKEN": "your_github_token_here"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Alternatively, connect to a pre-deployed remote or local Streamable-HTTP instance:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"github-agent": {
|
|
127
|
+
"url": "http://localhost:8000/github-agent/mcp"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Deploying the Streamable-HTTP server via Docker:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
docker run -d \
|
|
137
|
+
--name github-agent-mcp \
|
|
138
|
+
-p 8000:8000 \
|
|
139
|
+
-e TRANSPORT=streamable-http \
|
|
140
|
+
-e PORT=8000 \
|
|
141
|
+
-e GITHUB_URL="your_value" \
|
|
142
|
+
-e GITHUB_VERIFY="your_value" \
|
|
143
|
+
-e DEBUG="your_value" \
|
|
144
|
+
-e PYTHONUNBUFFERED="your_value" \
|
|
145
|
+
-e GITHUB_TOKEN="your_value" \
|
|
146
|
+
knucklessg1/github-agent:latest
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Agent
|
|
152
|
+
|
|
153
|
+
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts seamlessly with the **Agent Web UI (AG-UI)** and Terminal interface.
|
|
154
|
+
|
|
155
|
+
### Running the Agent CLI
|
|
156
|
+
To start the interactive command-line agent:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Set credentials
|
|
160
|
+
export GITHUB_URL="your_value"
|
|
161
|
+
export GITHUB_VERIFY="your_value"
|
|
162
|
+
export DEBUG="your_value"
|
|
163
|
+
export PYTHONUNBUFFERED="your_value"
|
|
164
|
+
export GITHUB_TOKEN="your_value"
|
|
165
|
+
|
|
166
|
+
# Run the agent server
|
|
167
|
+
github-agent --provider openai --model-id gpt-4o
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Docker Compose Orchestration
|
|
171
|
+
The following `docker/agent.compose.yml` configures the Agent, Web UI, and Terminal Interface together:
|
|
172
|
+
|
|
173
|
+
```yaml
|
|
174
|
+
version: '3.8'
|
|
175
|
+
|
|
176
|
+
services:
|
|
177
|
+
github-agent-mcp:
|
|
178
|
+
image: knucklessg1/github-agent:latest
|
|
179
|
+
container_name: github-agent-mcp
|
|
180
|
+
hostname: github-agent-mcp
|
|
181
|
+
restart: always
|
|
182
|
+
env_file:
|
|
183
|
+
- ../.env
|
|
184
|
+
environment:
|
|
185
|
+
- PYTHONUNBUFFERED=1
|
|
186
|
+
- HOST=0.0.0.0
|
|
187
|
+
- PORT=8000
|
|
188
|
+
- TRANSPORT=streamable-http
|
|
189
|
+
ports:
|
|
190
|
+
- "8000:8000"
|
|
191
|
+
healthcheck:
|
|
192
|
+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
|
193
|
+
interval: 30s
|
|
194
|
+
timeout: 10s
|
|
195
|
+
retries: 3
|
|
196
|
+
start_period: 10s
|
|
197
|
+
logging:
|
|
198
|
+
driver: json-file
|
|
199
|
+
options:
|
|
200
|
+
max-size: "10m"
|
|
201
|
+
max-file: "3"
|
|
202
|
+
|
|
203
|
+
github-agent-agent:
|
|
204
|
+
image: knucklessg1/github-agent:latest
|
|
205
|
+
container_name: github-agent-agent
|
|
206
|
+
hostname: github-agent-agent
|
|
207
|
+
restart: always
|
|
208
|
+
depends_on:
|
|
209
|
+
- github-agent-mcp
|
|
210
|
+
env_file:
|
|
211
|
+
- ../.env
|
|
212
|
+
command: [ "github-agent" ]
|
|
213
|
+
environment:
|
|
214
|
+
- PYTHONUNBUFFERED=1
|
|
215
|
+
- HOST=0.0.0.0
|
|
216
|
+
- PORT=9016
|
|
217
|
+
- MCP_URL=http://github-agent-mcp:8000/mcp
|
|
218
|
+
- PROVIDER=${PROVIDER:-openai}
|
|
219
|
+
- MODEL_ID=${MODEL_ID:-gpt-4o}
|
|
220
|
+
- ENABLE_WEB_UI=True
|
|
221
|
+
- ENABLE_OTEL=True
|
|
222
|
+
ports:
|
|
223
|
+
- "9016:9016"
|
|
224
|
+
healthcheck:
|
|
225
|
+
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9016/health')"]
|
|
226
|
+
interval: 30s
|
|
227
|
+
timeout: 10s
|
|
228
|
+
retries: 3
|
|
229
|
+
start_period: 10s
|
|
230
|
+
logging:
|
|
231
|
+
driver: json-file
|
|
232
|
+
options:
|
|
233
|
+
max-size: "10m"
|
|
234
|
+
max-file: "3"
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in [docs/agent.md](file:///home/apps/workspace/agent-packages/agents/github-agent/docs/agent.md).
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Security & Governance
|
|
243
|
+
|
|
244
|
+
Built directly upon the enterprise-ready [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities) core, standard security parameters are fully supported:
|
|
245
|
+
|
|
246
|
+
### Access Control & Policy Enforcement
|
|
247
|
+
- **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.
|
|
248
|
+
- **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
|
|
249
|
+
- **Scoped Credentials:** Execution context runs restricted to the specific caller identity.
|
|
250
|
+
|
|
251
|
+
### Runtime Security Grid
|
|
252
|
+
| Feature | Functionality | Enablement |
|
|
253
|
+
|---------|---------------|------------|
|
|
254
|
+
| **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
|
|
255
|
+
| **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
|
|
256
|
+
| **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Installation
|
|
261
|
+
|
|
262
|
+
Install the Python package locally:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# Using uv (highly recommended)
|
|
266
|
+
uv pip install github-agent[all]
|
|
267
|
+
|
|
268
|
+
# Using standard pip
|
|
269
|
+
python -m pip install github-agent[all]
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Repository Owners
|
|
275
|
+
|
|
276
|
+
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
|
|
277
|
+
|
|
278
|
+

|
|
279
|
+

|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Contribute
|
|
284
|
+
|
|
285
|
+
Contributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:
|
|
286
|
+
- Format code using `ruff format .`
|
|
287
|
+
- Lint code using `ruff check .`
|
|
288
|
+
- Validate type-safety with `mypy .`
|
|
289
|
+
- Execute test suites using `pytest`
|
|
@@ -4,15 +4,7 @@ import os
|
|
|
4
4
|
import sys
|
|
5
5
|
import warnings
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
build_system_prompt_from_workspace,
|
|
9
|
-
create_agent_parser,
|
|
10
|
-
create_graph_agent_server,
|
|
11
|
-
initialize_workspace,
|
|
12
|
-
load_identity,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
__version__ = "0.11.0"
|
|
7
|
+
__version__ = "0.14.0"
|
|
16
8
|
|
|
17
9
|
logging.basicConfig(
|
|
18
10
|
level=logging.INFO,
|
|
@@ -22,23 +14,38 @@ logging.basicConfig(
|
|
|
22
14
|
logger = logging.getLogger(__name__)
|
|
23
15
|
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
DEFAULT_AGENT_DESCRIPTION = os.getenv(
|
|
29
|
-
"AGENT_DESCRIPTION",
|
|
30
|
-
meta.get(
|
|
31
|
-
"description",
|
|
32
|
-
"AI agent for GitHub Agent management.",
|
|
33
|
-
),
|
|
34
|
-
)
|
|
35
|
-
DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
|
|
36
|
-
"AGENT_SYSTEM_PROMPT",
|
|
37
|
-
meta.get("content") or build_system_prompt_from_workspace(),
|
|
38
|
-
)
|
|
17
|
+
DEFAULT_AGENT_NAME = None
|
|
18
|
+
DEFAULT_AGENT_DESCRIPTION = None
|
|
19
|
+
DEFAULT_AGENT_SYSTEM_PROMPT = None
|
|
39
20
|
|
|
40
21
|
|
|
41
22
|
def agent_server():
|
|
23
|
+
from agent_utilities import (
|
|
24
|
+
build_system_prompt_from_workspace,
|
|
25
|
+
create_agent_parser,
|
|
26
|
+
create_agent_server,
|
|
27
|
+
initialize_workspace,
|
|
28
|
+
load_identity,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
global DEFAULT_AGENT_NAME, DEFAULT_AGENT_DESCRIPTION, DEFAULT_AGENT_SYSTEM_PROMPT
|
|
32
|
+
initialize_workspace()
|
|
33
|
+
meta = load_identity()
|
|
34
|
+
DEFAULT_AGENT_NAME = os.getenv(
|
|
35
|
+
"DEFAULT_AGENT_NAME", meta.get("name", "Github Agent")
|
|
36
|
+
)
|
|
37
|
+
DEFAULT_AGENT_DESCRIPTION = os.getenv(
|
|
38
|
+
"AGENT_DESCRIPTION",
|
|
39
|
+
meta.get(
|
|
40
|
+
"description",
|
|
41
|
+
"AI agent for GitHub Agent management.",
|
|
42
|
+
),
|
|
43
|
+
)
|
|
44
|
+
DEFAULT_AGENT_SYSTEM_PROMPT = os.getenv(
|
|
45
|
+
"AGENT_SYSTEM_PROMPT",
|
|
46
|
+
meta.get("content") or build_system_prompt_from_workspace(),
|
|
47
|
+
)
|
|
48
|
+
|
|
42
49
|
warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
|
|
43
50
|
warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
|
|
44
51
|
|
|
@@ -51,7 +58,7 @@ def agent_server():
|
|
|
51
58
|
logger.debug("Debug mode enabled")
|
|
52
59
|
|
|
53
60
|
# Start server using the auto-discovery pattern (from mcp_config.json)
|
|
54
|
-
|
|
61
|
+
create_agent_server(
|
|
55
62
|
mcp_url=args.mcp_url,
|
|
56
63
|
mcp_config=args.mcp_config or "mcp_config.json",
|
|
57
64
|
host=args.host,
|