The world's first AI-native programming language with verified confidence, formal verification, and multi-agent primitives. Built for autonomous agents.
npm install agentic-langbash
Install dependencies
npm install
Build the transpiler
npm run build
Compile an .agentic file to TypeScript
./bin/agentic.js compile examples/auth.agentic --output examples/auth.ts
Watch mode
./bin/agentic.js watch examples/
`
Example Code
`agentic
@confidence(0.90)
@needs(database: Database, jwt_secret: string)
func authenticate(token: string) -> Result {
// Validate input
@confident(0.99)
if token.isEmpty() {
return Err(AuthError.MISSING_TOKEN)
}
// Decode with uncertainty
@uncertain("Edge case: malformed but decodable tokens?")
decoded = jwt.decode(token, jwt_secret) match {
Ok(payload) -> payload,
Err(e) -> {
@context {
what_failed: "JWT decode",
suggestions: ["Check token format", "Verify JWT_SECRET"]
}
return Err(AuthError.INVALID_TOKEN)
}
}
return Ok(User.fromDict(decoded))
}
// Auto-generated property tests
@property("rejects empty tokens")
@property("rejects invalid tokens")
@property("accepts valid tokens")
`
Language Features
$3
- @confidence(0.90) - Declare how confident the AI is
- Compiler warns when confidence < 0.80
- Helps humans focus review efforts
$3
- @stub - Not implemented, returns error
- @partial - Works for subset of inputs
- @complete - Full implementation with verification
$3
- @needs(database, logger) - Explicit dependencies
- Compiler checks availability at call sites
- No more "where did this variable come from?"
$3
- Errors include suggestions and recovery steps
- Structured data, not strings
- AI agents can programmatically fix errors
$3
- Properties auto-extracted from code
- 1000 random test cases per function
- Shrinking to minimal failing case
$3
- Health checks with auto-recovery
- Escalates to human only when needed
- Full audit trail
Architecture
`
.agentic file → [Parser] → AST → [Transformer] → TypeScript AST → .ts file
↓
Runtime Library
(confidence, health checks)
`
Project Structure
`
agentic-lang/
├── src/
│ ├── parser/ # Tree-sitter based parser
│ ├── transformer/ # AST → TypeScript transformation
│ ├── generator/ # Code generation + source maps
│ ├── runtime/ # Runtime library (@confidence, @needs, etc.)
│ ├── property-tests/ # Auto-generate property tests
│ └── cli.ts # CLI entry point
├── examples/ # Example .agentic files
├── vscode-extension/ # VSCode extension for syntax highlighting
└── docs/ # Documentation
`
Building from Source
`bash
Install dependencies
npm install
Build transpiler
npm run build
Run tests
npm test
Development mode
npm run dev -- compile examples/auth.agentic
`
VSCode Extension
Syntax highlighting and IntelliSense support included:
`bash
cd vscode-extension
npm install
npm run compile
Press F5 to test in Extension Development Host
``