-
Notifications
You must be signed in to change notification settings - Fork 352
feat: refactor agent skills and support OpenAI Agents SDK #1100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5fa5cb3
d250df5
070daa9
b65734e
1a2f7f2
0d1de62
db4c68d
7b2f525
22beaae
6fe9af6
78c3a4c
98041dd
4a64f40
9d05ca3
3d1136a
38f97b9
e1071ed
9fafbb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| { | ||
| "openai": [ | ||
| { | ||
| "name": "calculate_request", | ||
| "match": { | ||
| "match_type": "contains", | ||
| "message": { | ||
| "content": "What is 2+2?", | ||
| "role": "user" | ||
| } | ||
| }, | ||
| "response": { | ||
| "id": "chatcmpl-calc", | ||
| "object": "chat.completion", | ||
| "created": 1677652288, | ||
| "model": "gpt-4.1-mini", | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": null, | ||
| "tool_calls": [ | ||
| { | ||
| "id": "call_abc123", | ||
| "type": "function", | ||
| "function": { | ||
| "name": "calculate", | ||
| "arguments": "{\"expression\": \"2+2\"}" | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "finish_reason": "tool_calls" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "name": "calculate_result", | ||
| "match": { | ||
| "match_type": "contains", | ||
| "message": { | ||
| "content": "4", | ||
| "role": "tool", | ||
| "tool_call_id": "call_abc123" | ||
| } | ||
| }, | ||
| "response": { | ||
| "id": "chatcmpl-calc-result", | ||
| "object": "chat.completion", | ||
| "created": 1677652288, | ||
| "model": "gpt-4.1-mini", | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "The result of 2+2 is 4" | ||
| }, | ||
| "finish_reason": "stop" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "name": "weather_request", | ||
| "match": { | ||
| "match_type": "contains", | ||
| "message": { | ||
| "content": "What is the weather in London?", | ||
| "role": "user" | ||
| } | ||
| }, | ||
| "response": { | ||
| "id": "chatcmpl-weather", | ||
| "object": "chat.completion", | ||
| "created": 1677652289, | ||
| "model": "gpt-4.1-mini", | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": null, | ||
| "tool_calls": [ | ||
| { | ||
| "id": "call_def456", | ||
| "type": "function", | ||
| "function": { | ||
| "name": "get_weather", | ||
| "arguments": "{\"location\": \"London\"}" | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "finish_reason": "tool_calls" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "name": "weather_result", | ||
| "match": { | ||
| "match_type": "contains", | ||
| "message": { | ||
| "content": "Rainy, 52°F", | ||
| "role": "tool", | ||
| "tool_call_id": "call_def456" | ||
| } | ||
| }, | ||
| "response": { | ||
| "id": "chatcmpl-weather-result", | ||
| "object": "chat.completion", | ||
| "created": 1677652289, | ||
| "model": "gpt-4.1-mini", | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "The weather in london is Rainy, 52°F" | ||
| }, | ||
| "finish_reason": "stop" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -101,6 +101,7 @@ COPY --chown=python:pythongroup .python-version . | |||
| COPY --chown=python:pythongroup uv.lock . | ||||
| COPY --chown=python:pythongroup packages/kagent-adk packages/kagent-adk | ||||
| COPY --chown=python:pythongroup packages/kagent-core packages/kagent-core | ||||
| COPY --chown=python:pythongroup packages/kagent-skills packages/kagent-skills | ||||
| COPY --chown=python:pythongroup README.md . | ||||
|
|
||||
| ARG VERSION | ||||
|
|
@@ -114,15 +115,18 @@ RUN --mount=type=cache,target=/.kagent/cache,uid=1001,gid=1001 \ | |||
| && echo "Installation complete." | ||||
|
|
||||
| # Create a separate venv for bash tool commands (sandbox environment) | ||||
| # This venv does not have pip installed | ||||
|
Comment on lines
117
to
+118
|
||||
| RUN --mount=type=cache,target=/.kagent/cache,uid=1001,gid=1001 \ | ||||
| echo "Creating bash tool sandbox environment..." \ | ||||
| && mkdir -p /.kagent/sandbox-venv \ | ||||
| && uv venv --python=python$TOOLS_PYTHON_VERSION /.kagent/sandbox-venv \ | ||||
| && echo "Bash tool sandbox environment created." | ||||
|
|
||||
| ENV PATH="/.kagent/.venv/bin:$PATH" | ||||
| ENV UV_PROJECT_ENVIRONMENT=/app/.venv | ||||
| ENV BASH_VENV_PATH="/.kagent/sandbox-venv" | ||||
| ENV PYTHONPATH="/.kagent:/" | ||||
|
||||
| ENV PYTHONPATH="/.kagent:/" |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent spelling: "london" should be capitalized to "London" to match the input and be consistent with the rest of the response. The weather data uses "london" as the key (line 58) which is fine for internal lookup, but the response should preserve the proper capitalization.
Change line 122 from:
to: