awayto

Joined 5 years ago

Karma
81
Submissions
64
Member since
Oct 16
Working on educational saas related stuff...

https://github.com/jcmccormick https://github.com/keybittech

meet.hn/city/us-Eugene

View on Hacker News

Recent submissions

Comment · 10 months ago
Comment · 11 months ago
> Run pwd to see the directory you’re working in. You’ll only be able to edit files in this directory.

If you're using the agent to produce any kind of code that has access to manipulate the filesystem, may as well have it understand its own abilities as having the entirety of CRUD, not just updates. I could easily see the agent talking itself into working around "only be able to edit" with its other knowledge that it can just write a script to do whatever it wants. This also reinforces to devs that they basically shouldn't trust the agent when it comes to the filesystem.

As for pwd for existing projects, I start each session running tree local to the part of the project filesystem I want to have worked on.

Comment · 1 year ago
Could you point to some resources which talk about how docker isn't considered a safe sandbox given the network and file system restrictions I mentioned?

I understand the sharing of kernel, while I might not be aware of all of the implications. I.e. if you have some local access or other sophisticated knowledge of the network/box docker is running on, then sure you could do some damage.

But I think the chances of a whitelisted llm endpoint returning some nefarious code which could compromise the system is actually zero. We're not talking about untrusted code from the internet. These models are pretty constrained.

Comment · 1 year ago
Google has what I would call a generous free tier, even including Gemini 2.5 Pro (https://ai.google.dev/gemini-api/docs/rate-limits). Just get an API key from AiStudio. Also very easy to just make a switch in your agent so that if you hit up against a rate limit for one model, re-request the query with the next model. With Pro/Flash/Flash-Lite and their previews, you've got 2500+ free requests per day.
Comment · 1 year ago
Yeah I agree. Ultimately I would suggest not having any kind of function call which returns an arbitrary command.

Instead, think of it as if you were enabling capabilities for AppArmor, by making a function call definition for just 1 command. Then over time suss out what commands you need your agent do to and nothing more.

Comment · 1 year ago
You can build your agent into a docker image then easily limit both networking and file system scope.

    docker run -it --rm \
      -e SOME_API_KEY="$(SOME_API_KEY)" \
      -v "$(shell pwd):/app" \ <-- restrict file system to whatever folder
      --dns=127.0.0.1 \ <-- restrict network calls to localhost
      $(shell dig +short llm.provider.com 2>/dev/null | awk '{printf " --add-host=llm-provider.com:%s", $$0}') \ <-- allow outside networking to whatever api your agent calls
      my-agent-image
Probably could be a bit cleaner, but it worked for me.
Comment · 1 year ago
Also if you're doing function calls you can just have the command as one response param, and arguments array as another response param. Then just black/white list commands you either don't want to run or which should require a human to say ok.
Comment · 1 year ago
Comment · 2 years ago

  Location: Oregon
  Remote: Yes
  Willing to relocate: No
  Technologies: Go/Python/TS/JS/HTML/CSS/Java/C#
  Résumé/CV: https://www.linkedin.com/in/joe-mccormick-76224429/
  Email: joe [-at-] keybittech.com
Been writing code for 25+ years. 10+ years professionally. Started freelancing a few years back. I've done a number of projects with the community so far, and really hoping to find new avenues currently. On the side I release a great deal of open source software at
https://github.com/jcmccormick.

I've made web applications (front and back end concurrently) for the majority of my time developing. However, now I have turned my sights on to LLM use. I have now learned how to work with all kinds of backends (JAX, Transformers, PyTorch, etc.) while being able to effectively fine tune my own models (from other bases). Definitely not a math major, but I do understand the practical use and intentions of model layers, matrix multiplications, and other various inner processes of neural networks.

I am currently working on a project that produces AST parses of one of my projects (20k+ loc), turns them into embeddings, and trains a model to answer questions and help me continue to code that project. All I can say is that it does work on principle, and is just a matter of time before I'll have a generalized pipeline for such projects.

If any of this sounds valuable to you, I'm certainly looking forward to utilizing my knowledge, so please do reach out via linkedin messenger, or my email. Thanks for your time.

Comment · 2 years ago
For those moments when you just don't know what (5 phrases) to say?
Comment · 2 years ago
Comment · 2 years ago
On routing, make sure any endpoints used between containers are (1) configurable, and (2) using the docker internal network naming conventions when working locally.

For example I have a compose with 10+ containers in it. Each container that needs to talk to another has some kind of environment property to tell it the name of that other container. So the "api" container might have a property called DB_HOST="db", "db" being the name of the db container.

Now, when developing i.e. the "api" image locally, your local dev server should be configured in the same way, providing the DB_HOST property to your local dev server environment. By doing this, you can completely stop the "api" container, allowing the local dev server to take its place, configured to talk to your other containers running in the docker network.

This way you are maintaining the local dev server setup that we've been using for ages and not developing directly on a docker image or dependent on its build cycle, etc.

Comment · 2 years ago
Comment · 2 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton