We gave machines the ability to reason, decide, and act. Then we kept building them with languages that can't see any of it happening.
curl -sSf https://install.corvid-lang.org | shIt's 2am. Something your AI did woke you up. Maybe it issued a refund it shouldn't have. Maybe it sent a patient the wrong triage recommendation. Maybe it pushed a deployment that should have waited for review.
You trace it back. The prompt was fine. The policy was in a separate file. The worker just... executed. Somewhere between three languages and a config nobody updated, the guardrail disappeared.
Because your language had no idea what your program was trying to do.
Software changed. Languages didn't. Until now.
Define the tools, their effects, and the agent. The approve line is required before any dangerous call.
effect clinical_action: trust: human_required tool prescribe(id, med) -> Order dangerous agent triage(p: Patient) -> Assessment: result = assess(p) if result.urgency > 0.9: approve Prescription(p.id, result.med) prescribe(p.id, result.med) return result
Delete the approve line. In Python, nothing happens. In Corvid, the compiler refuses to build.
effect clinical_action: trust: human_required tool prescribe(id, med) -> Order dangerous agent triage(p: Patient) -> Assessment: result = assess(p) if result.urgency > 0.9: prescribe(p.id, result.med) return result
The approval is not a suggestion. It is a type-system requirement. Present or absent. Compiles or doesn't.
effect clinical_action: trust: human_required tool prescribe(id, med) -> Order dangerous agent triage(p: Patient) -> Assessment: result = assess(p) if result.urgency > 0.9: approve Prescription(p.id, result.med) prescribe(p.id, result.med) return result
curl -sSf https://install.corvid-lang.org | sh
View source
Corvid starts from a simple premise: if your program reasons, decides, and acts, the compiler should see all three.
Effects are not flat tags. Cost, trust, reversibility, data, latency, and confidence each compose with their own algebra. The compiler enforces each independently.
This isn't a framework you import. It's the language itself.
Exceed the cost bound and the code won't compile.
@budget($0.10) agent bounded(text) -> String: return classify(classify(text))
Low confidence routes to approval automatically.
@min_confidence(0.90) agent bot(q) -> String: return search(q)
The typechecker rejects returns without a retrieval chain.
agent research(id) -> Grounded<String>: return fetch_doc(id)
Compiler proves grounding. Runtime checks the model response.
prompt answer(ctx: Grounded) -> Grounded: cites ctx strictly
Cheap models first. Escalate on low confidence.
prompt classify(q) -> String: progressive: cheap below 0.80 expensive
Executions become reviewable, diffable evidence.
@deterministic @replayable agent classify(t) -> String
Wherever AI makes a consequential decision, the same primitives apply.
Cost, trust, and reversibility dimensions. The compiler requires approval and enforces the budget.
effect transfer_money: cost: $0.50 trust: human_required reversible: false tool issue_refund(id) -> Receipt dangerous @budget($1.00) agent refund(id) -> Receipt: approve IssueRefund(id) return issue_refund(id)
Trust and PII dimensions. The compiler requires clinician approval and tracks data flow.
effect clinical_action: trust: human_required data: pii tool prescribe(id, med) -> Order dangerous @trust(human_required) agent triage(p) -> Assessment: r = assess(p) if r.urgency > 0.9: approve Emergency(p.id) prescribe(p.id, r.med) return r
The compiler verifies grounding and that citations trace back to sources.
tool search(q) -> Grounded<String> prompt answer(q, ctx: Grounded) -> Grounded: cites ctx strictly """Answer {q} using ONLY: {ctx}""" agent support(q) -> Grounded: return answer(q, search(q))
Both deploy and rollback are dangerous with irreversible effects.
tool deploy(sha) -> Status dangerous tool rollback(env) -> Status dangerous @trust(human_required) agent deploy_agent(c) -> Status: if review(c).safe: approve Deploy(c.sha) return deploy(c.sha) approve Rollback("prod") return rollback("prod")
Corvid is open source, built in public, shaped by engineers who've stayed up too late debugging an agent that did something it shouldn't have.
We're early. The community is small. That's the point. You're not joining a crowd. You're shaping a foundation.
If you've ever looked at your agent code and thought "I can't actually prove this is safe", you're who we built this for.
We're building it. Come build with us.
Build with Corvidcurl -sSf https://install.corvid-lang.org | sh