{"slug": "laya-system-1-code-intelligence-for-ai-agents", "title": "Laya \"System 1\" Code Intelligence for AI Agents", "summary": "Laya released SCS 0.2.0, a headless code-intelligence service that indexes source repositories and lets coding agents query them through a local MCP tool called query_code. SCS starts with an empty index, enrolls a repository only after an explicit CLI, MCP, or client request, and never modifies repository source; stable releases support Apple Silicon macOS and x86-64 Linux with CPython 3.14. Indexing requires an embedding provider, defaulting to the OpenAI embeddings API with text-embedding-3-large at 3072 dimensions, while Laya is an optional local Apple Silicon feature for selecting among seven query playbooks and SCS works without it on both supported platforms.", "body_md": "SCS is a headless code-intelligence service. It indexes source repositories and\nlets coding agents investigate them through a local MCP tool. An agent asks\n`query_code` a question; SCS returns bounded evidence from its structural and\nsemantic index.\n\nSCS starts with an empty index. It enrolls a repository only after an explicit CLI, MCP, or client request, and never changes repository source.\n\n- Stable releases support Apple Silicon macOS and x86-64 Linux with CPython 3.14.\n- Indexing needs an embedding provider. The default uses the OpenAI embeddings API and sends source-derived entity text to it. Local providers are available.\n- Laya is an **optional, local Apple Silicon feature** for choosing query\nplaybooks. SCS works without Laya on both supported platforms. See[Laya requirements](#optional-laya-routing) for its measured memory use.\n\nDownload the installer and checksum manifest from the same\n[GitHub Release](https://github.com/leonardoventurini/scs/releases), verify the\ninstaller, and install SCS:\n\n```\nVERSION=0.2.0\ncurl -fsSLO \"https://github.com/leonardoventurini/scs/releases/download/v${VERSION}/scs-installer-${VERSION}.sh\"\ncurl -fsSLO \"https://github.com/leonardoventurini/scs/releases/download/v${VERSION}/SHA256SUMS\"\nshasum -a 256 -c SHA256SUMS --ignore-missing\nsh \"scs-installer-${VERSION}.sh\"\nscs version\n```\n\nOn Linux, use `sha256sum -c SHA256SUMS --ignore-missing`. The installer\nverifies its wheel and constraints, installs without `sudo`, and uses a pinned,\nchecksum-verified `uv` binary when necessary. Current macOS releases are not\nApple-signed or notarized. See\n[distribution and upgrade details](https://github.com/leonardoventurini/scs/blob/main/docs/github-releases-distribution.md).\n\nConfigure an embedding provider before indexing. For the default OpenAI\nprovider, put this in `~/.scs/config.toml`:\n\n```\nembedding_provider = \"openai\"\nembedding_model = \"text-embedding-3-large\"\nembedding_dimension = 3072\nopenai_api_key = \"replace-with-your-key\"\n```\n\nKeep the file owner-readable only (`chmod 600 ~/.scs/config.toml`). See\n[embedding configuration](https://github.com/leonardoventurini/scs/blob/main/docs/configuration.md) for local provider and\nreranking options.\n\nRegister the installed stdio bridge with Codex, then index the repository containing your current directory:\n\n```\ncodex mcp add scs -- \"$HOME/.local/bin/scs\" mcp\ncodex mcp get scs\nscs index \"$PWD\"\nscs status\n```\n\nIf an existing `scs` MCP entry points elsewhere, remove it first with\n`codex mcp remove scs`. Restart open Codex clients after changing MCP\nconfiguration. Indexing runs as a durable background job; use `scs status` or\n`get_graph_stats` to check when it is ready. The path above assumes the\ninstaller's default `~/.local/bin` location.\n\n```\nagent goal + repository + optional anchors\n                 |\n                 v\n        validate request and paths\n                 |\n                 v\n     select one of seven playbooks  <--- optional local Laya classifier\n                 |\n                 v\n     bounded index search and graph reads\n                 |\n                 v\n   evidence + routing + trace + completeness\n```\n\nFor example, an agent can ask:\n\n```\nquery_code(\n    goal=\"Find tests affected by changes to the parser\",\n    repo_path=\"/repo\",\n    file_paths=[\"src/parser.py\"],\n    mode=\"balanced\",\n)\n```\n\nThe `fast`, `balanced`, and `thorough` modes set fixed time and evidence\nbudgets. Results show which playbook ran and whether evidence was complete,\ntruncated, or degraded. See the [MCP tool reference](https://github.com/leonardoventurini/scs/blob/main/docs/mcp-tools.md) for\nanchors, tool contracts, and the\n[`query_code` migration guide](https://github.com/leonardoventurini/scs/blob/main/docs/query-code-migration.md) for retired tools.\n\nSCS indexes supported source files structurally. Other regular UTF-8 text\nfiles can be indexed at file level for lexical and semantic search. Git ignore\nrules and size limits apply. Once a repository is enrolled, SCS watches\nGit-visible changes and updates its index in the background. See\n[indexing and project management](https://github.com/leonardoventurini/scs/blob/main/docs/indexing.md) for coverage, limits,\nreindexing, and deletion.\n\nThe default OpenAI embedding provider sends source-derived entity text to\nthe configured API. SCS does not send whole repository files to a\nsummarization service. You can instead configure a local OpenAI-compatible\nserver or an in-process MLX provider. Provider details and trust controls\nare in [embedding configuration](https://github.com/leonardoventurini/scs/blob/main/docs/configuration.md).\n\nOn Apple Silicon, Laya can choose one of SCS's bounded query playbooks. SCS runs Laya in its own local MLX worker process; it does not call an external inference service. Laya receives the goal and explicit anchors, not repository source, embeddings, or retrieved evidence. SCS performs the search and graph reads. Without Laya, routing follows deterministic rules.\n\n**Resource example:** On a Mac Studio M3 Ultra, the pinned model bundle\noccupied about 807 MB on disk, and a warmed Laya worker measured about\n5.2 GB of physical memory footprint on 2026-09-24. This is one observed\nmeasurement, not a fixed minimum; usage can vary by host and workload.\nLaya is disabled unless explicitly configured.\n\nTo enable it from a source checkout on Apple Silicon:\n\n```\nuv sync --all-groups --extra laya\nuv run --extra laya python scripts/install-laya.py\n```\n\nAdd `decision_model = \"laya\"` to `~/.scs/config.toml`, then run\n`uv run --extra laya scs daemon restart` from that checkout. The release\ninstaller installs the base tool without the optional Laya dependency.\nThe installation script downloads and verifies a pinned model bundle;\nqueries never download a model. A configured daemon reports ready only\nafter its worker loads and warms. If inference fails during a query, SCS\nreports degradation and uses deterministic routing.\n\n`scs list` shows enrolled projects and their stable numeric IDs.\n`scs reingest ID|PATH` forces a full rebuild, and `scs delete ID|PATH`\nremoves only SCS-owned derived state. `scs doctor` checks daemon health;\n`scs metrics --days 7 --json` reports aggregate operations without query\ntext, source text, file paths, job payloads, or results. See\n[indexing and project management](https://github.com/leonardoventurini/scs/blob/main/docs/indexing.md) for lifecycle details.\n\nEach MCP client runs a small stdio bridge. Bridges share one lazily started\ndaemon, which shuts down after the last bridge disconnects. Persistent state\nlives under `SCS_HOME`. See [architecture](https://github.com/leonardoventurini/scs/blob/main/docs/architecture.md) for storage,\nruntime ownership, and legacy-index migration.\n\nFor a source checkout:\n\n```\njust setup\njust verify\njust eval-search\n```\n\n`just setup` syncs dependencies, builds the private native extension, and\ninstalls the repository's pre-commit hook. `just verify` runs strict\nBasedpyright checks, Ruff, Python tests with branch coverage, and the Rust\nworkspace tests. Search and query evaluation guidance lives in\n[evals/README.md](https://github.com/leonardoventurini/scs/blob/main/evals/README.md).", "url": "https://wpnews.pro/news/laya-system-1-code-intelligence-for-ai-agents", "canonical_source": "https://github.com/leonardoventurini/scs", "published_at": "2026-09-24 22:31:04+00:00", "updated_at": "2026-09-24 23:00:17.770322+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "agent-protocols", "ai-tools"], "entities": ["Laya", "SCS", "OpenAI", "Codex", "query_code", "CPython 3.14", "Apple Silicon", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/laya-system-1-code-intelligence-for-ai-agents", "markdown": "https://wpnews.pro/news/laya-system-1-code-intelligence-for-ai-agents.md", "text": "https://wpnews.pro/news/laya-system-1-code-intelligence-for-ai-agents.txt", "jsonld": "https://wpnews.pro/news/laya-system-1-code-intelligence-for-ai-agents.jsonld"}}