Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DEBUG | No | Enable debug logging | false |
| NODE_ENV | No | Affects logging behavior (development, test, production) | |
| OPENAI_ORG_ID | No | OpenAI organization ID | |
| OPENAI_API_KEY | No | OpenAI API key for AI-enhanced tools | |
| OPENAI_BASE_URL | No | OpenAI-compatible API endpoint | https://api.openai.com/v1 |
| OPENAI_PROVIDER | No | Provider: openai, qwen, azure, anthropic, together | openai |
| AMBIANCE_API_KEY | No | Ambiance cloud API key for cloud features | |
| AMBIANCE_API_URL | No | Ambiance cloud API URL | https://api.ambiance.dev |
| WORKSPACE_FOLDER | No | Project workspace path | |
| AMBIANCE_BASE_DIR | No | Override working directory | |
| OPENAI_BASE_MODEL | No | Primary model for analysis tasks | gpt-5 |
| OPENAI_MINI_MODEL | No | Faster model for hints/summaries | gpt-5-mini |
| LOCAL_STORAGE_PATH | No | Custom local storage path | ~/.ambiance/embeddings |
| EMBEDDING_BATCH_SIZE | No | Number of texts per embedding batch | 32 |
| USE_LOCAL_EMBEDDINGS | No | Enable local embedding storage | false |
| AMBIANCE_DEVICE_TOKEN | No | Device identification token | |
| LOCAL_EMBEDDING_MODEL | No | Local embedding model when using local embeddings | all-MiniLM-L6-v2 |
| USING_LOCAL_SERVER_URL | No | Use local Ambiance server instead of cloud | |
| EMBEDDING_PARALLEL_MODE | No | Enable parallel embedding generation | false |
| OPENAI_EMBEDDINGS_MODEL | No | Model for generating embeddings | text-embedding-3-large |
| EMBEDDING_MAX_CONCURRENCY | No | Max concurrent API calls for parallel mode | 10 |
| EMBEDDING_RATE_LIMIT_RETRIES | No | Max retries for rate limit errors | 5 |
| EMBEDDING_RATE_LIMIT_BASE_DELAY | No | Base delay for rate limit retries (ms) | 1000 |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| local_context | 🚀 Enhanced local context with deterministic query-aware retrieval, AST-grep, and actionable intelligence. Provides: (1) deterministic AnswerDraft, (2) ranked JumpTargets, (3) tight MiniBundle (≤3k tokens), (4) NextActions—all using AST + static heuristics. Optional embedding enhancement when available. Completely offline with zero external dependencies for core functionality. |
| local_project_hints | 📊 Generate intelligent project navigation hints with word clouds, folder analysis, and architecture detection. Supports multiple output formats including markdown and HTML, with AI-powered analysis and configurable performance options. Accepts absolute paths or relative paths (when workspace can be detected). |
| local_file_summary | 📄 Get quick AST-based summary and key symbols for any file. Fast file analysis without external dependencies. Accepts absolute paths or relative paths (when workspace can be detected). |
| frontend_insights | 🔍 Map routes, components, data flow, design system, and risks in the web layer with embedding-enhanced analysis. Analyzes Next.js/React projects for architecture insights, component similarities, and potential issues using semantic embeddings. |
| local_debug_context | 🐛 Gather comprehensive debug context from error logs and codebase analysis with focused embedding enhancement When to use:
What this does:
Input: Error logs or stack traces as text Output: Structured debug context report with ranked matches and semantic insights Performance: Fast local analysis, ~1-3 seconds depending on codebase size Embedding Features: Focused context queries reduce noise and improve relevance |
| ast_grep_search | 🔍 AST-Grep structural code search tool Performs powerful structural code search using ast-grep's pattern matching capabilities. Unlike text-based search, this matches syntactical AST node structures. Key Features:
Pattern Syntax:
Common Mistakes to Avoid: ❌ Don't use: 'function $FUNC' (ambiguous, multiple AST interpretations) ❌ Don't use: 'export $TYPE' (ambiguous, multiple AST interpretations) ❌ Don't use: '$NAME' (too generic, matches everything) ❌ Don't use: /pattern/ (regex syntax not supported) ✅ Good Patterns:
Examples:
Advanced Usage:
Direct CLI Usage (for agents with command line access): Agents with command line access can run ast-grep directly: Basic usagenpx ast-grep --pattern "function $NAME($ARGS) { $BODY }" --lang ts Python function definitionsnpx ast-grep --pattern "def " --lang py Python classesnpx ast-grep --pattern "class $NAME:" --lang py With file filtering (recommended for large projects)npx ast-grep --pattern "def " --lang py src/**/*.py JSON outputnpx ast-grep --pattern "class $NAME:" --lang py --json=stream Full documentationnpx ast-grep --help Note: ast-grep respects .gitignore files automatically - no --exclude-dir flags neededUse Cases:
Performance Optimizations for Large Projects:
Tips for Large Projects (like D:\Dev\SWE-agent):
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |