princeton-nlp / SWE-agent

SWE-agent takes a GitHub issue and tries to automatically fix it, using GPT-4, or your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges.
https://princeton-nlp.github.io/SWE-agent/
MIT License
13.39k stars 1.33k forks source link

How to solve a JSON task using SWE Agent? #636

Closed SM-Kumail-Rizvi closed 2 months ago

SM-Kumail-Rizvi commented 3 months ago

Describe the issue

Hi there,

I have a task in JSON format that I would like to solve using the SWE Agent. Here is the JSON structure of my task:

[ { "TaskName": "Implement Server-Side Login Validation", "KnowledgeGraph": [ "Server->authenticates->User", "Server->validates->Credentials", "Server->queries->Firestore" ], "CodeBase": { "Type": "Firestore Cloud Function", "Language": "Typescript" }, "DesignKeyTradeOffs": [ { "option": "Validate credentials directly against Firestore", "pros": [ "Simple implementation", "Direct integration with existing authentication service" ], "cons": [ "Potential performance bottleneck", "Limited control over error handling" ] }, { "option": "Implement a custom authentication service", "pros": [ "Full control over authentication process", "Better performance optimization" ], "cons": [ "Higher implementation complexity", "Additional maintenance overhead" ] } ], "Design": [ "Use Firestore Authentication to validate user credentials", "Implement secure transmission and storage of credentials", "Integrate error handling and logging for authentication failures" ], "DesignConstraints": [ "Ensure credentials are encrypted in transit", "Handle various edge cases like network failures" ], "ImplementationBestPractices": [ "Use environment variables for sensitive data", "Adhere to secure coding practices" ], "RiskMitigation": [ "Implement retry logic for network failures", "Log detailed error information for debugging" ], "TestStrategy": { "UnitTests": [ "Test valid login credentials", "Test invalid login credentials", "Test network failure scenarios" ] }, "EstimatedLinesOfCode": 60 } ]

I want to use the SWE Agent to solve this task. Could you please provide a detailed guide on how to proceed with this JSON task? Specifically, I am looking for instructions on:

  1. How to input this JSON task into the SWE Agent.
  2. How to configure the SWE Agent to process and solve this task.
  3. Any additional configurations or steps required to ensure that the SWE Agent handles this task correctly.

I appreciate any guidance you can provide. Thank you!

Optional: Relevant documentation page

No response