Skip to content
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

Add example of Coding Agent with AgentKit #55

Merged
merged 6 commits into from
Feb 21, 2025
Merged

Conversation

charlypoly
Copy link
Contributor

No description provided.

@charlypoly charlypoly marked this pull request as ready for review February 19, 2025 19:22
@jamesmurdza
Copy link
Contributor

A few notes/suggestions:

  • If the LLM API key is incorrect, there is no warning and agent goes into an infinite loop. (Is this an issue with the framework itself?)
  • I see a lot of Agent response > undefined in the terminal, and not sure what this means. These logs could probably just be skipped?
  • The code you're using to reset the sandbox timeout looks wrong. (The timeout is in ms and is relative to the current time.) All you have to do is call setTimeout once during each iteration, and you should be fine.

@jamesmurdza
Copy link
Contributor

I think the whole getSandbox function could probably be written as:

export async function getSandbox(network?: NetworkRun) {
  let sandbox = network?.state.kv.get("sandbox") as Sandbox;
  if (!sandbox) {
    sandbox = await Sandbox.create();
  }
  await sandbox.setTimeout(5 * 60_000);
  network?.state.kv.set("sandbox", sandbox);
  return sandbox;
}

@jamesmurdza
Copy link
Contributor

Also, this is just a suggestion, but it might be nice to be able to zip and export all the files when the agent is finished. Otherwise, all the agent's hard work is gone!

@charlypoly
Copy link
Contributor Author

@tizkovatereza I've applied all fixes and suggestions 🤝

@jamesmurdza jamesmurdza merged commit a820344 into e2b-dev:main Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants