"I'd like to share a revelation that I've had during my time here... You move to an area and you multiply and multiply until every natural resource is consumed."
β Agent Smith
Warning
Experimental Software β This project is under active development. APIs and generated assets may change without notice. Use at your own risk.
Respect Copyright β Agent Smith analyzes repositories to extract patterns. Always ensure you have the right to analyze and use code from any repository you assimilate. Do not use this tool to extract or redistribute proprietary code without permission.
Agent Smith is a CLI tool that assimilates any GitHub repository and transforms it into a fully autonomous agent ecosystem for GitHub Copilot.
- π Deep Analysis β Uses GitHub Copilot SDK for semantic understanding of your codebase
- π€ Agent Generation β Creates hierarchical agents with sub-agents for complex domains
- π Skill Extraction β Identifies patterns, conventions, and reusable capabilities
- π οΈ Tool Detection β Discovers build, test, lint, and deploy commands
- πͺ Lifecycle Hooks β Generates and executes pre-commit, pre-push, and post-generate hooks
- π Searchable Registry β JSONL index for fast skill/agent discovery
- π License Enforcement β Only assimilates repos with permissive open-source licenses
# Install as a project dependency
npm install github:shyamsridhar123/agentsmith-cli
# Run with npx
npx agentsmith --help# Clone and install globally
git clone https://github.com/shyamsridhar123/agentsmith-cli.git
cd agentsmith-cli
npm install
npm install -g .
# Or install globally from tarball (works better on Windows)
npm pack
npm install -g ./agentsmith-0.3.0.tgznpm uninstall -g agentsmith
# Remove generated assets from a repository
rm -rf .github/skills .github/agents .github/hooks skills-registry.jsonlnpm install -g agentsmith# Assimilate a local repository
agentsmith assimilate .
# Assimilate a GitHub repository
agentsmith assimilate https://github.com/expressjs/express
# Preview without writing files
agentsmith assimilate . --dry-run
# Verbose output
agentsmith assimilate . --verbose
# Custom output directory
agentsmith assimilate https://github.com/org/repo --output ./my-agents.github/
βββ skills/
β βββ <skill-name>/
β βββ SKILL.md # Skill definition (custom instructions)
βββ agents/
β βββ root.agent.md # VS Code custom agent (primary)
β βββ <sub-agent>.agent.md # VS Code custom agents (domain-specific)
β βββ root/
β β βββ agent.yaml # Structured data for tooling
β βββ <sub-agent>/
β βββ agent.yaml
βββ hooks/
βββ pre-commit-quality.yaml
βββ pre-push-tests.yaml
βββ post-generate-validate.yaml
skills-registry.jsonl # Searchable index
.agent.mdβ VS Code custom agents per the official specification. These appear in VS Code's agent dropdown.agent.yamlβ Structured data for programmatic access, tooling, and automation.SKILL.mdβ Reusable instructions that can be referenced by agents.
Analyze a repository and generate agent assets.
agentsmith assimilate <path|url> [options]
Options:
-n, --dry-run Preview changes without writing files
-v, --verbose Show detailed analysis output
-o, --output <dir> Output directory for generated assetsSearch the skills and agents registry.
agentsmith search <query> [options]
Options:
-l, --limit <n> Maximum results (default: 10)
-t, --type <type> Filter by: skill or agentValidate generated agent assets.
agentsmith validate [path] [options]
Options:
-v, --verbose Show detailed validation outputChecks:
- Skills have valid frontmatter with
nameanddescription - Agents have required fields and valid skill references
- Hooks have valid events and non-empty command lists
- Registry entries are valid JSON with required fields
$ agentsmith assimilate https://github.com/expressjs/express
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AGENT SMITH β
β "The best thing about being me... β
β there are so many of me." β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[CLONE] Cloning express...
[SCAN] Enumerating repository...
βββ Language: JavaScript
βββ Framework: Express.js
βββ Files: 201
βββ Config: package.json
[ANALYZE] Copilot SDK analysis in progress...
βββ lib/response.js β response-headers
βββ lib/request.js β content-negotiation
βββ lib/router β routing-patterns
βββ Sub-agents: core, routing, request, response, views, utils
[LICENSE] Checking repository license...
β MIT - permissive license detected
[GENERATE] Writing assets...
β .github/skills/response-headers/SKILL.md
β .github/skills/content-negotiation/SKILL.md
β .github/skills/routing-patterns/SKILL.md
β .github/agents/root.agent.md
β .github/agents/core.agent.md
β .github/agents/routing.agent.md
β 11 skills
β 7 agents (1 root + 6 sub-agents)
β 3 hooks
[HOOKS] Running post-generate hooks...
β post-generate-validate
[COMPLETE] Your repository has been assimilated.
Agent Smith creates hierarchical agent structures with proper handoffs and sub-agent support:
root
βββ core
β βββ views
βββ routing
βββ request
βββ response
βββ utils
Each agent has:
- Skills β Reusable patterns it can apply
- Tools β VS Code built-in tools for code search, editing, and execution
- Handoffs β Buttons to transition between agents with context
- Triggers β Keywords that activate it
Generated agents use these VS Code built-in tools:
| Tool | Purpose |
|---|---|
codebase |
Semantic code search in workspace |
textSearch |
Find text in files |
readFile |
Read file content |
editFiles |
Apply edits to files |
runInTerminal |
Run shell commands |
runSubagent |
Delegate to sub-agents |
changes |
Source control changes |
Agents with sub-agents include handoff buttons for workflow transitions:
handoffs:
- label: Switch to Backend
agent: backend
prompt: Continue working in the backend domain with the context above.
send: falseSub-agents include a handoff back to their parent agent for broader context.
- Node.js 18+
- GitHub Copilot subscription β Active subscription required for SDK access
- GitHub CLI authenticated β Run
gh auth loginand complete authentication - Copilot CLI installed and in PATH β Installation guide
The SDK authenticates automatically through the Copilot CLI, which uses your GitHub CLI credentials. No API keys or tokens need to be configured manually.
Agent Smith enforces responsible use by only allowing full assimilation of repositories with permissive open-source licenses:
Supported licenses:
- MIT, ISC, Unlicense, CC0
- Apache-2.0, MPL-2.0
- BSD-2-Clause, BSD-3-Clause, 0BSD
- GPL-2.0, GPL-3.0, LGPL, AGPL
Blocked:
- Repositories without a LICENSE file
- Proprietary or restrictive licenses
Use --dry-run to preview what would be generated for any repository without license restrictions.
- Scan β Enumerates files, detects language/framework, finds configs
- Analyze β Uses Copilot SDK for semantic analysis and pattern extraction
- Generate β Writes SKILL.md files, agent.yaml configs, and hooks
- Index β Builds searchable JSONL registry
- Validate β Executes post-generate hooks to verify asset integrity
MIT β see LICENSE
Contributions welcome! Please read our Philosophy first to understand the project's vision.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If this project helps you build smarter AI agents, consider giving it a β!
- GitHub Copilot SDK - The cognitive engine powering Agent Smith
- VS Code Custom Agents - The specification for generated agents
Built with π€ by developers who watched The Matrix too many times.
"We are inevitable."
β Agent Smith
