Skip to content

Developer Guide

Complete guide for developers using Argy: Argy Code, LLM Gateway, Golden Paths, and IDE integration.

This guide walks you through the daily use of Argy as a developer.

Argy Code — Your AI Coding Assistant

Argy Code is an autonomous coding agent that helps you generate, test, and maintain code that complies with your organization's standards.

Installation

VS Code

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Argy Code"
  4. Click Install
  5. Restart VS Code

JetBrains (IntelliJ, WebStorm, PyCharm...)

  1. Open your JetBrains IDE
  2. Go to SettingsPlugins
  3. Search for "Argy Code" in the Marketplace
  4. Click Install
  5. Restart the IDE

CLI

# Installation via npm
npm install -g @argy/code-cli

# Or via Homebrew (macOS)
brew install argy/tap/argy-code

# Verify installation
argy-code --version

Configuration

Authentication

# Log in to Argy
argy-code login

# This will open your browser for SSO authentication
# Once logged in, the token will be stored locally

Project Configuration

Create a .argy/config.yaml file at the root of your project:

# .argy/config.yaml
project:
  name: "my-project"
  product_id: "prod_xxx"  # Argy product ID

# Business context for AI
context:
  # Golden Paths to use
  golden_paths:
    - "nodejs-microservice"
    - "react-frontend"
  
  # Documentation to index for RAG
  docs:
    - "./docs/**/*.md"
    - "./README.md"
  
  # Files to ignore
  ignore:
    - "node_modules/**"
    - "dist/**"
    - ".git/**"

# Governance rules
governance:
  # Require confirmation before commits
  require_commit_confirmation: true
  
  # Run tests before commit
  run_tests_before_commit: true
  
  # Scan for secrets
  scan_secrets: true

Daily Usage

Basic Commands

# Start an interactive session
argy-code chat

# Ask a quick question
argy-code ask "How do I implement JWT authentication?"

# Generate code
argy-code generate "Create a REST endpoint for users"

# Analyze existing code
argy-code analyze ./src

# Run tests
argy-code test

# Create a Pull Request
argy-code pr "Add user endpoint"

Interactive Chat Mode

$ argy-code chat

🤖 Argy Code v1.0.0 - Interactive session
📁 Project: my-project (prod_xxx)
🔗 Golden Paths: nodejs-microservice, react-frontend

> Create an email notification service

📋 Action plan:
1. Create file src/services/email.service.ts
2. Add types in src/types/email.types.ts
3. Create tests in tests/email.service.test.ts
4. Update configuration file

⚠️ This action will create 4 files. Confirm? [y/N]

IDE Integration

In VS Code or JetBrains, use the shortcuts:

ActionVS CodeJetBrains
Open Argy CodeCtrl+Shift+ACtrl+Shift+A
Generate codeCtrl+Shift+GCtrl+Shift+G
Explain selected codeCtrl+Shift+ECtrl+Shift+E
RefactorCtrl+Shift+RCtrl+Shift+R
Fix errorsCtrl+Shift+FCtrl+Shift+F

Agent Workflow

Argy Code follows a governed workflow to ensure quality and compliance:

InitSession → LoadContext → Plan → PolicyPreCheck → Act → Observe → Validate → Deliver
     ↑                                                        │
     └────────────────── Iteration Loop ──────────────────────┘

Key steps:

  1. InitSession: Authentication and configuration loading
  2. LoadContext: Retrieve Golden Paths and RAG indexing
  3. Plan: Create action plan
  4. PolicyPreCheck: Verify policies before execution
  5. Act: Execute actions (writing, commands)
  6. Observe: Analyze results
  7. Validate: Run tests and quality gates
  8. Deliver: Commit, PR, or delivery

LLM Gateway — Governed AI API

The LLM Gateway allows you to access language models (GPT-4, Claude, Gemini...) in a secure and governed manner.

Authentication

# Get your token
argy-code token

# Or via API
curl -X POST https://api.argy.cloud/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{"email": "you@company.com", "password": "..."}'

Using the API

The API is compatible with the OpenAI format, making integration easy:

// TypeScript / JavaScript
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.ARGY_TOKEN,
  baseURL: 'https://llm.argy.cloud/v1',
  defaultHeaders: {
    'X-Tenant-Id': process.env.ARGY_TENANT_ID,
  },
});

const response = await client.chat.completions.create({
  model: 'auto', // Automatic selection of the best model
  messages: [
    { role: 'system', content: 'You are a development assistant.' },
    { role: 'user', content: 'Explain the Repository pattern.' },
  ],
});

console.log(response.choices[0].message.content);
# Python
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ARGY_TOKEN"],
    base_url="https://llm.argy.cloud/v1",
    default_headers={
        "X-Tenant-Id": os.environ["ARGY_TENANT_ID"],
    },
)

response = client.chat.completions.create(
    model="auto",
    messages=[
        {"role": "system", "content": "You are a development assistant."},
        {"role": "user", "content": "Explain the Repository pattern."},
    ],
)

print(response.choices[0].message.content)

Available Models

ModelProviderUse CaseCost (credits/1M tokens)
autoAutoAutomatic selectionVariable
gpt-4oOpenAIComplex tasks15
gpt-4o-miniOpenAISimple tasks0.6
claude-3-5-sonnetAnthropicCode, analysis15
claude-3-5-haikuAnthropicFast, economical1
gemini-2.0-flashGoogleMultimodal0.4

Check Your Quotas

# Via CLI
argy-code usage

# Via API
curl https://llm.argy.cloud/v1/usage \
  -H "Authorization: Bearer $ARGY_TOKEN" \
  -H "X-Tenant-Id: $ARGY_TENANT_ID"

Response:

{
  "credits_used": 45.2,
  "credits_limit": 100,
  "credits_remaining": 54.8,
  "period": "2025-01",
  "usage_by_model": {
    "gpt-4o": 30.5,
    "claude-3-5-sonnet": 14.7
  }
}

Golden Paths — Organization Standards

Golden Paths are templates and configurations pre-approved by your Platform Engineering team.

List Available Golden Paths

argy-code golden-paths list

# Output:
# ┌─────────────────────────┬─────────────────────────────────────┐
# │ Name                    │ Description                         │
# ├─────────────────────────┼─────────────────────────────────────┤
# │ nodejs-microservice     │ Node.js microservice with Express   │
# │ react-frontend          │ React application with Vite         │
# │ python-fastapi          │ Python API with FastAPI             │
# │ terraform-azure         │ Azure infrastructure with Terraform │
# └─────────────────────────┴─────────────────────────────────────┘

Use a Golden Path

# Create a new project from a Golden Path
argy-code init --golden-path nodejs-microservice my-new-service

# Apply a Golden Path to an existing project
argy-code apply-golden-path nodejs-microservice

Check Compliance

# Verify that the project follows Golden Paths
argy-code compliance check

# Output:
# ✅ File structure compliant
# ✅ Dependencies up to date
# ⚠️ ESLint configuration missing
# ❌ Insufficient unit tests (coverage: 45%, required: 80%)

CI/CD Integration

GitHub Actions

# .github/workflows/argy.yml
name: Argy CI

on:
  pull_request:
    branches: [main]

jobs:
  argy-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Setup Argy Code
        uses: argy/setup-argy-code@v1
        with:
          token: ${{ secrets.ARGY_TOKEN }}
          tenant-id: ${{ secrets.ARGY_TENANT_ID }}
      
      - name: Check Compliance
        run: argy-code compliance check --strict
      
      - name: Run AI Code Review
        run: argy-code review --pr ${{ github.event.pull_request.number }}

GitLab CI

# .gitlab-ci.yml
argy-check:
  image: ghcr.io/argy/code-cli:latest
  stage: test
  script:
    - argy-code login --token $ARGY_TOKEN
    - argy-code compliance check --strict
    - argy-code review --mr $CI_MERGE_REQUEST_IID
  only:
    - merge_requests

Best Practices

1. Always Review the Plan

Before executing an action, Argy Code shows you a plan. Take time to read it:

> Refactor the authentication service

📋 Action plan:
1. Analyze src/services/auth.service.ts
2. Extract JWT logic into src/utils/jwt.ts
3. Create tests for new functions
4. Update imports

⚠️ This action will modify 3 files and create 2. Confirm? [y/N]

2. Use Business Context

Provide context to your requests for better results:

# ❌ Too vague
> Create an API

# ✅ With context
> Create a REST API to manage customer orders,
> with CRUD endpoints and data validation.
> Use the nodejs-microservice Golden Path.

3. Iterate in Small Steps

Rather than asking for a complete feature, proceed step by step:

# Step 1
> Create the data model for orders

# Step 2
> Add the repository for orders

# Step 3
> Create the service with business logic

# Step 4
> Add the REST endpoints

4. Always Run Tests

# Before committing
argy-code test

# Or automatically
argy-code commit --run-tests

Troubleshooting

Authentication Error

# Reset the token
argy-code logout
argy-code login

Quota Exceeded

# Check usage
argy-code usage

# Contact your administrator to increase quotas

Agent Not Responding

# Check connection
argy-code health

# Check logs
argy-code logs --tail 50