Skip to main content

Coding Agents

Coding agents give your MeetLoyd agents the ability to clone repositories, write code, run tests, commit, push, and open pull requests — all inside isolated sandbox environments. Every LLM provider is supported (Claude, GPT, Gemini, Mistral, Groq, self-hosted models), so there is no provider lock-in.

This guide covers setup, the coding lifecycle, security, CI integration, and cost controls.

Overview

Coding agents combine three capabilities:

  1. Coding Tools — read, write, edit files, search code, and run commands
  2. Git Tools — full git lifecycle: clone, branch, commit, push, PR, CI status
  3. Sandbox Isolation — all operations run inside a sandboxed project directory

Getting Started

1. Connect a Git Integration

Go to Settings > Integrations and connect your GitHub or GitLab account. This triggers automatic discovery: available coding tools are identified, the coding-agent skill is suggested for relevant agents, and agent memory is updated with the new capabilities.

2. Assign the Coding Agent Skill

Navigate to Agents > [Your Agent] > Skills, find coding-agent in the catalog, and click Assign. This unlocks 16 tools:

CategoryTools
FilesFile read, file write, file edit, search, list files
CommandsBash execution
GitStatus, clone, checkout, diff, add, commit, push, log
Pull RequestsPR create, PR status

3. Start a Coding Session

Tell your agent what to build or fix. The orchestrator handles the full lifecycle automatically:

Clone repo > Create branch > Write code > Run tests > Commit > Push > Open PR > Monitor CI

If CI fails, the agent automatically reads the error output and fixes the issues (up to 3 retry attempts).

LOYD.md — Project Constitution

When an agent starts working on a repository for the first time, MeetLoyd automatically generates a LOYD.md file — a model-agnostic project constitution that provides coding context.

LOYD.md is created by scanning the repository for approximately 80 marker files (package.json, Cargo.toml, go.mod, tsconfig.json, CI configs, Dockerfiles, and more). The tech stack, frameworks, build tools, test runners, and linting configs are identified, then synthesized into a structured document with 9 sections:

SectionContent
Project OverviewWhat the project does
Tech StackLanguage, framework, build tool, test runner
Project StructureDirectory layout and key files
Development CommandsHow to build, test, lint, and run
Coding ConventionsStyle rules, naming, formatting
Architecture PatternsDesign patterns in use
Testing StrategyHow tests are organized and run
CI/CD PipelineContinuous integration and deployment
Security ConsiderationsSecurity-relevant patterns
tip

If your repo already has a CLAUDE.md or LOYD.md, the agent uses that instead of generating a new one.

Security

Sandbox Isolation

All file and command operations are sandboxed:

ProtectionDetails
Directory confinementFiles can only be accessed within the project directory
Path escape preventionAttempts to access files outside the allowed scope are rejected
Sensitive path protectionConfiguration files and system directories are inaccessible
Command safetyDestructive or dangerous commands are blocked
Network isolationNetwork access disabled by default unless explicitly allowed

Git Security

ProtectionDetails
Shell injection preventionAll user inputs are sanitized
Branch/remote validationNames must match a strict alphanumeric pattern
URL validationOnly HTTPS, SSH, and git protocols accepted for clone
No interactive promptsCredential dialogs are suppressed
Diff size capOutput limited to 50 KB to prevent context flooding

Approval Gates

Operations that modify the remote repository require approval in proactive mode:

ToolRequires Approval
CloneYes
CommitYes
PushYes
PR createYes
Bash executionYes
All other toolsNo

Audit Trail

Every operation is logged with timestamp, tool name, action, path, and whether it was allowed or blocked.

Autonomy Levels

The coding orchestrator respects MeetLoyd's standard autonomy model:

LevelBehavior
AutonomousAgent clones, codes, commits, pushes, and creates PRs without asking
Proactive (default)Agent does the work, then asks for approval before commit/push/PR
ReactiveAgent waits for explicit instructions at each step

Cost Controls

A cost guard checks accumulated LLM costs before each coding iteration:

SettingValue
Default limit$5.00 per session
When reachedCoding loop stops gracefully
Work preservedChanges can be committed manually
TrackingReal-time via the executor's token usage reporting

CI Integration

After pushing and creating a PR, the agent monitors CI checks:

  1. Polls CI status every 15 seconds
  2. Waits up to 5 minutes for CI to complete
  3. If CI fails, reads the error output and enters a fix loop
  4. Fix loop: code changes, commit, push, wait for CI
  5. Up to 3 retry attempts
CI ProviderSupport
GitHub ActionsFully supported
GitLab CIFully supported

Connector Screening

When you connect any new integration (not just GitHub), MeetLoyd runs a connector screening:

  1. Tool Discovery — identifies what tools are now available
  2. Data Discovery — connector-specific introspection (e.g., CRM pipelines, repo structure)
  3. Memory Update — stores discovered capabilities in agent memory
  4. Skill Suggestion — recommends relevant skills for the new integration

This happens automatically, not just during initial team setup. Connect a CRM months later and your agent immediately learns what data is available.

Supported Git Providers

ProviderClonePushPR CreationCI Status
GitHubHTTPS, SSHYesYesYes
GitLabHTTPS, SSHYesYesYes
BitbucketHTTPS, SSHYesManualManual
info

PR creation and CI status checking for GitHub and GitLab require the gh or glab CLI to be installed and authenticated in the sandbox environment.

Example Workflow

Here is what happens when you tell your agent "Fix the login validation bug in our webapp":

  1. Agent receives the task
  2. Orchestrator provisions a sandbox microVM
  3. Repository is cloned, a feature branch is created
  4. LOYD.md is generated (or loaded from repo)
  5. Agent reads relevant files and understands the codebase
  6. Agent makes targeted code changes
  7. Agent runs tests to verify the fix
  8. Changes are committed and pushed
  9. A pull request is created (as draft if configured)
  10. CI checks are monitored
  11. If CI fails, agent reads errors and fixes them
  12. Sandbox is cleaned up
  13. You receive the PR URL for review

The entire flow is visible in the team activity feed.