This guide walks through setting up nexcoder, configuring execution presets, and running your first agentic pipelines and code intelligence tasks.
- Python: Python 3.11 or 3.12 (Python 3.13 is supported for core execution; 3.11/3.12 recommended for complete Tree-sitter and PyTorch compatibility).
- Git: Configured with standard line endings (
core.autocrlf=inputon Unix/macOS or.gitattributescheckout on Windows). - Optional Serving Engines:
git clone https://github.com/ThiagoVenturim/nexcoder.git
cd nexcoder
python -m venv .venv
# On Linux / macOS:
source .venv/bin/activate
# On Windows (PowerShell):
.venv\Scripts\Activate.ps1The repository includes githooks that enforce zero emojis and strip automated AI co-author trailers:
git config core.hooksPath .githooksInstall the core foundation and feature packages in editable mode:
# Foundation packages (required by dependent packages)
pip install -e packages/core
pip install -e packages/control
# Feature packages
pip install -e packages/code-intel
pip install -e packages/agents
pip install -e packages/planning
pip install -e packages/ideation
pip install -e packages/security
pip install -e packages/capture
pip install -e packages/interfaces
pip install -e packages/serving
pip install -e packages/continuous-improvement
# Tooling and quality verification
pip install pytest ruffExperience nexcoder's end-to-end automated lifecycle immediately without needing any API keys or network connection:
python examples/quickstart/run_quickstart.pyThis single command runs all six pipeline stages offline against an included sample project:
- Ideation & Architectural Jury: Evaluates an idea hypothesis and returns a quorum consensus verdict.
- PRD Generation: Creates a structured Product Requirements Document.
- Sprint & Backlog Planning: Breaks down tasks and initializes a local Git repository.
- Code Intelligence: Indexes AST symbols and queries code via GraphRAG.
- Multi-Agent Pipeline: Dispatches the catalog
bugfix-deliveryworkflow. - Security Gate: Executes SAST vulnerability checks and verifies release readiness.
For detailed breakdown, artifact descriptions, and instructions on connecting real models, see the Quickstart Example Guide.
To install optional provider dependencies (e.g. Anthropic, OpenAI, Google Gemini, Ollama, Langfuse):
pip install -e "packages/core[all]"nexcoder manages provider configurations through environment variables and the NexcoderConfig model.
Copy .env.example to .env or set environment variables in your active shell:
# Model Provider API Keys (optional if running offline or local-only)
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="AIza..."
# Local Inference Endpoints
export OLLAMA_BASE_URL="http://localhost:11434"
export VLLM_BASE_URL="http://localhost:8000/v1"
# Langfuse Telemetry
export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."
export LANGFUSE_HOST="http://localhost:3000"nexcoder provides five execution presets out of the box:
| Preset | Description | Network Needed |
|---|---|---|
offline |
Deterministic fake models and hash embeddings for tests and CI | No |
all-open-source |
Directs all model tiers to Ollama or local vLLM instances | Localhost only |
local-vllm |
High-throughput local vLLM serving with GPU tensor parallelism | Localhost only |
all-paid |
Anthropic Claude, OpenAI, and Google Gemini across tiers | Yes |
hybrid |
High-volume routines run locally; synthesis and jury run on paid frontier APIs | Mixed |
Specify the preset programmatically or via environment:
from nexcoder_core import NexcoderConfig, load_config
# Load default config and override preset
config = load_config()
config.preset = "offline"nexcoder avoids vendor lock-in by routing model requests to three capability tiers:
small: High-throughput extraction, classification, query rewriting, and chunk tagging.medium: Code generation, unit testing, structural analysis, and documentation.large: Architectural evaluation, multi-persona jury debate, and PRD generation.
from nexcoder_core import get_chat_model, load_config
# Load default config and set offline preset for hermetic execution
config = load_config()
config.preset = "offline"
model = get_chat_model("medium", config=config)
response = model.invoke("Draft a unit test plan for an authentication service.")
print(response.content)Index source code and query semantic relationships:
from nexcoder_code_intel import CodeSearchIndex
from nexcoder_core.retrieval.embeddings import HashEmbedder
embedder = HashEmbedder(dimensions=256)
index = CodeSearchIndex("code_index.db", embedder=embedder)
code = """
class BillingService:
def __init__(self, gateway):
self.gateway = gateway
def charge_invoice(self, invoice_id: str, amount_cents: int) -> bool:
return self.gateway.process_charge(invoice_id, amount_cents)
"""
index.index_code("billing.py", code, language="python")
# Hybrid lexical + dense search with HyDE
results = index.search("process customer charge", top_k=2, hyde=True)
for r in results:
print(f"[{r['score']:.3f}] {r['id']}")Load an agent persona from the catalog and construct an execution pipeline:
from nexcoder_agents.catalog import AgentCatalog
from nexcoder_agents.engine import PipelineBuilder
from nexcoder_agents.engine.blocks import PromptBlock, ValidatorBlock
# Load catalog from packages/agents/agents
catalog = AgentCatalog.from_directory("packages/agents/agents")
architect = catalog.get("lead-architect")
# Construct pipeline blocks
validator = ValidatorBlock(name="input-validator", required_keys=["prd_content"])
prompt_block = PromptBlock(
name="generate-architecture",
user_prompt_template=architect.prompt if architect else "{prd_content}",
)
builder = PipelineBuilder("architecture-review")
builder.add_sequence([validator, prompt_block])
pipeline = builder.compile()Ensure your environment passes all repository standards:
# Verify no emojis in codebase or documentation
python scripts/check_no_emoji.py
# Lint codebase with Ruff
ruff check packages scripts
# Run test suite hermetically (offline)
python -m pytest packages