Last week, a friend showed me an agent that deleted its own config file.
The model was certain it was helping. The server did what it was told. Nobody verified the middle.
That's the real cost of free tokens. Not the price. The silence between "the model said" and "the system did."
This is a tutorial. It goes from an empty terminal to a working agent on MonkeyCode's free server. Every stage ends with a check. If the check fails, you stop and look.
Disclosure: This article was prepared as part of MonkeyCode's product outreach.
MonkeyCode is an open-source project. It offers free model access and a free server option. The free tier currently includes 10 million tokens. Don't trust that number. Check the dashboard. That habit is the whole point.
clone → install → configure → deploy → gate → measure
│ │ │ │ │ │
└─check └─check └─check └─check └─check └─stop?
Stage 0: Decide what "working" means
Before installing anything, write down one task. One small task.
Mine was: "Summarize the last commit message and suggest a better one."
No agents. No plugins. One task, one measurable output.
Why? Because a free server will run anything. The real question is whether it runs your thing well. You can't answer that without a target.
Stage 1: Clone and inspect
Open a terminal.
git clone <repo-url> && cd monkeycode
Wait. Don't run that yet.
I don't know your repo URL. You shouldn't trust mine either. Search for the official MonkeyCode repository. Copy the URL from the project page. Then run the command.
Verification: list the files.
ls -la
You should see a LICENSE file. If you don't, stop. An open-source project without a license is a trap. Not a gift.
Stage 2: Install
npm install
Or pnpm. Or bun. Use whatever the README says. The README is your first source of truth.
Verification: check the install log for errors. Then run the version command.
monkeycode --version
A version number means the install worked. "Command not found" means the PATH is wrong. Fix that before going further. Then run monkeycode --help. Command names vary by version. Check before you trust mine.
Stage 3: Configure free model access
Create a .env file.
touch .env
Add your API key. Where do you get it? From the MonkeyCode dashboard. Not from a blog post. Not from me.
MONKEYCODE_API_KEY=your_key_here
Verification: send one tiny prompt.
monkeycode run "Say hello in five words."
Did it answer? Good. How long did it take? Write that number down. You'll need it later.
Stage 4: Deploy to the free server
The free server runs your agent without renting a box. Deploy with the project's CLI. Run monkeycode --help to find the exact command.
monkeycode deploy
Verification: hit the health endpoint.
curl https://your-app.monkeycode.dev/health
You want a JSON response: {"status":"ok"}. A timeout means the server went to sleep. Wait a minute and try again. Free servers do that. It's normal. It's also why you never promise a response time before measuring.
Stage 5: Add a human gate
Here the tutorial turns into design.
A free server will happily run a destructive action. The model doesn't know it's destructive. The server doesn't care. Only the human gate can stop it.
Write a small guard.
import sys
def confirm(action: str) -> bool:
print(f"Agent wants to: {action}")
answer = input("Approve? [y/N] ").strip().lower()
return answer == "y"
if not confirm("delete the staging database"):
print("Blocked. Agent stops here.")
sys.exit(1)
Not clever. That's the point. The gate should be boring. Boring code is code you can trust at 2 AM.
Verification: run the agent against a test file. Watch the gate fire. Approve once. Deny once. Both paths must behave exactly as written.
Stage 6: Measure, then set stop conditions
Run your one task ten times.
for i in $(seq 1 10); do monkeycode run "Summarize the last commit" >> results.log; done
Count successes. Count failures. If the success rate drops below your threshold, the agent should stop asking and start waiting.
That's a stop condition. Write it into your config before you need it. Because you will need it.
Who should not use this
The free server is not a production SLA. If your users need a response in 200 milliseconds, measure first. Then promise. If you handle regulated data, read the terms before sending a single token.
And if you're building an agent that can delete things? The free tier is the best place to test the gate. Not the worst. The best.
Try it
Clone the repo. Claim the tokens. Deploy the server. Then break something on purpose. Watch the gate catch it.
Free model. Free server. One honest gate.
The model will be confident. The server will be fast. The gate is the only part that will ever say no. Keep it.
Top comments (0)