a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
79 lines
2.4 KiB
JSON
79 lines
2.4 KiB
JSON
{
|
|
"name": "coding_agent",
|
|
"description": "A coding agent that uses OpenAI code_interpreter to write, run, and iterate on code",
|
|
"version": 1,
|
|
"schemaVersion": 2,
|
|
"inputParameters": ["task"],
|
|
"tasks": [
|
|
{
|
|
"name": "plan_implementation",
|
|
"taskReferenceName": "plan",
|
|
"type": "LLM_CHAT_COMPLETE",
|
|
"inputParameters": {
|
|
"llmProvider": "openai",
|
|
"model": "gpt-4o",
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"message": "You are a senior software engineer. Break down the coding task into clear steps. Output a numbered plan."
|
|
},
|
|
{
|
|
"role": "user",
|
|
"message": "${workflow.input.task}"
|
|
}
|
|
],
|
|
"temperature": 0.2,
|
|
"maxTokens": 1000
|
|
}
|
|
},
|
|
{
|
|
"name": "write_and_run_code",
|
|
"taskReferenceName": "code",
|
|
"type": "LLM_CHAT_COMPLETE",
|
|
"inputParameters": {
|
|
"llmProvider": "openai",
|
|
"model": "gpt-4o",
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"message": "You are a coding assistant with access to a code execution sandbox. Write the code, run it, verify the output, and fix any errors. Return the final working code and its output."
|
|
},
|
|
{
|
|
"role": "user",
|
|
"message": "Implementation plan:\n${plan.output.result}\n\nOriginal task: ${workflow.input.task}\n\nWrite the code, execute it, and return the working result."
|
|
}
|
|
],
|
|
"codeInterpreter": true,
|
|
"temperature": 0.1,
|
|
"maxTokens": 4000
|
|
}
|
|
},
|
|
{
|
|
"name": "review_code",
|
|
"taskReferenceName": "review",
|
|
"type": "LLM_CHAT_COMPLETE",
|
|
"inputParameters": {
|
|
"llmProvider": "openai",
|
|
"model": "gpt-4o-mini",
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"message": "You are a code reviewer. Review the implementation for correctness, edge cases, and code quality. Provide a brief summary of what was built and any suggestions."
|
|
},
|
|
{
|
|
"role": "user",
|
|
"message": "Task: ${workflow.input.task}\n\nImplementation:\n${code.output.result}"
|
|
}
|
|
],
|
|
"temperature": 0.3,
|
|
"maxTokens": 1000
|
|
}
|
|
}
|
|
],
|
|
"outputParameters": {
|
|
"plan": "${plan.output.result}",
|
|
"code": "${code.output.result}",
|
|
"review": "${review.output.result}"
|
|
}
|
|
}
|