# Una > Your AI agent writes the code. Una proves it keeps its contracts before it runs. A programming language with declared authority and JSON output for agents. The compiler proves contracts and refinements with an SMT solver, confines authority to declared capabilities, and checks information-flow labels. Every command but the language server has JSON output for agents. Current release: v0.4.0. Stable editions: 0.1, 0.2. Preview editions, which may still change: 0.3, 0.4, 0.5. ## Start - [Install Una](https://una-lang.org/en/install.md): the installer, and the archives of v0.4.0: macOS arm64, Linux arm64 - [Get started](https://una-lang.org/en/docs/get-started.md): install, then the tutorial to a checked program built as a native executable - [Una, compact](https://una-lang.org/en/docs/agents/compact.md): the language in one page, for an agent's context - [The loop](https://una-lang.org/en/docs/agents/loop.md): the cycle an agent repeats: format, check, read the diagnostics, fix, test - [Una for agents](https://una-lang.org/en/docs/agents.md): the full guide to writing, checking and repairing Una, with the JSON each command returns ## Language guide - [At a glance](https://una-lang.org/en/docs/language.md) - [Lexical structure](https://una-lang.org/en/docs/language/lexical-structure.md) - [Modules and imports](https://una-lang.org/en/docs/language/modules.md) - [Kinds and types](https://una-lang.org/en/docs/language/types.md) - [Functions and contracts](https://una-lang.org/en/docs/language/functions.md) - [Expressions and control flow](https://una-lang.org/en/docs/language/control-flow.md) - [Errors](https://una-lang.org/en/docs/language/errors.md) - [Capabilities and effects](https://una-lang.org/en/docs/language/capabilities.md) - [Information flow](https://una-lang.org/en/docs/language/information-flow.md) - [Requirements](https://una-lang.org/en/docs/language/requirements.md) - [Examples as tests](https://una-lang.org/en/docs/language/examples.md) - [Verification](https://una-lang.org/en/docs/language/verification.md) - [Canonical form](https://una-lang.org/en/docs/language/canonical-form.md) - [A complete package](https://una-lang.org/en/docs/language/complete-example.md) - [Not in this edition](https://una-lang.org/en/docs/language/not-yet.md) ## Constructs - [kind](https://una-lang.org/en/docs/language/types/kind.md): edition 0.1 and later - [where and refinements](https://una-lang.org/en/docs/language/types/where.md): edition 0.1 and later - [predicate: reflect and opaque](https://una-lang.org/en/docs/language/types/predicate.md): edition 0.1 and later - [Constraints on generics](https://una-lang.org/en/docs/language/types/constraints.md): edition 0.2 and later - [requires](https://una-lang.org/en/docs/language/functions/requires.md): edition 0.1 and later - [ensures](https://una-lang.org/en/docs/language/functions/ensures.md): edition 0.1 and later - [when](https://una-lang.org/en/docs/language/control-flow/when.md): edition 0.1 and later - [for](https://una-lang.org/en/docs/language/control-flow/for.md): edition 0.2 and later - [let edit and edit parameters](https://una-lang.org/en/docs/language/control-flow/let-edit.md): edition 0.2 and later - [take](https://una-lang.org/en/docs/language/control-flow/take.md): edition 0.2 and later - [together](https://una-lang.org/en/docs/language/control-flow/together.md): edition 0.2 and later - [fails](https://una-lang.org/en/docs/language/errors/fails.md): edition 0.1 and later - [fail](https://una-lang.org/en/docs/language/errors/fail.md): edition 0.1 and later - [if error and if none](https://una-lang.org/en/docs/language/errors/if-error.md): edition 0.1 and later - [attempt](https://una-lang.org/en/docs/language/errors/attempt.md): edition 0.1 and later - [checked and the escape budget](https://una-lang.org/en/docs/language/errors/checked.md): edition 0.1 and later - [capability and op](https://una-lang.org/en/docs/language/capabilities/capability.md): edition 0.1 and later - [uses](https://una-lang.org/en/docs/language/capabilities/uses.md): edition 0.1 and later - [@ bindings and with](https://una-lang.org/en/docs/language/capabilities/with.md): edition 0.1 and later - [handler](https://una-lang.org/en/docs/language/capabilities/handler.md): edition 0.1 and later - [Host capabilities and grants](https://una-lang.org/en/docs/language/capabilities/host.md): edition 0.1 and later - [Labels](https://una-lang.org/en/docs/language/information-flow/labels.md): edition 0.1 and later - [policy: declassification](https://una-lang.org/en/docs/language/information-flow/policy.md): edition 0.1 and later - [trusted modules](https://una-lang.org/en/docs/language/information-flow/trusted.md): edition 0.1 and later - [requirement and derived from](https://una-lang.org/en/docs/language/requirements/requirement.md): edition 0.1 and later - [example](https://una-lang.org/en/docs/language/examples/example.md): edition 0.1 and later - [Loops that run until stopped: for ever, for until, stop and skip](https://una-lang.org/en/docs/language/control-flow/for-ever.md): edition 0.4 preview - [test](https://una-lang.org/en/docs/language/examples/test.md): edition 0.3, 0.4 preview - [Units of measure](https://una-lang.org/en/docs/language/types/units.md): edition 0.3 preview ## Learn - [Una by Example](https://una-lang.org/en/learn.md) - [1 Hello, Una](https://una-lang.org/en/learn/hello.md) - [2 Numbers](https://una-lang.org/en/learn/numbers.md) - [3 Text and conditions](https://una-lang.org/en/learn/text-and-conditions.md) - [4 Kinds](https://una-lang.org/en/learn/kinds.md) - [5 Contracts and the verifier](https://una-lang.org/en/learn/contracts.md) - [6 Functions and their results](https://una-lang.org/en/learn/functions.md) - [7 Results and failures](https://una-lang.org/en/learn/failure.md) - [8 Choosing](https://una-lang.org/en/learn/choices.md) - [9 Repeating: for](https://una-lang.org/en/learn/loops.md) - [10 Collections](https://una-lang.org/en/learn/collections.md) - [11 Packages and modules](https://una-lang.org/en/learn/packages.md) - [12 Capabilities](https://una-lang.org/en/learn/capabilities.md) - [13 Limits on authority](https://una-lang.org/en/learn/authority.md) - [14 Testing](https://una-lang.org/en/learn/testing.md) - [15 Concurrency and parallelism](https://una-lang.org/en/learn/concurrency.md) - [16 Memory](https://una-lang.org/en/learn/memory.md) - [17 Information flow](https://una-lang.org/en/learn/information-flow.md) - [18 Tools](https://una-lang.org/en/learn/tools.md) - [19 Editions](https://una-lang.org/en/learn/editions.md) ## Guides - [Reviewed feature availability](https://una-lang.org/en/docs/editions/availability.md) - [Driven programs](https://una-lang.org/en/docs/guides/driven-programs.md) - [Known limits](https://una-lang.org/en/docs/known-limits.md) - [Serving HTTP](https://una-lang.org/en/docs/guides/serving-http.md) - [Tasks and time](https://una-lang.org/en/docs/guides/tasks-and-time.md) ## Diagnostics - [Diagnostics](https://una-lang.org/en/docs/errors.md): one page per code, 121 codes, as printed by `una explain` ## Optional - [Specification](https://una-lang.org/en/docs/spec.md): the normative specification, chapter by chapter - [01. Lexical structure](https://una-lang.org/en/docs/spec/01-lexical-structure.md) - [02. Grammar](https://una-lang.org/en/docs/spec/02-grammar.md) - [03. Types](https://una-lang.org/en/docs/spec/03-types.md) - [04. Functions and contracts](https://una-lang.org/en/docs/spec/04-functions-and-contracts.md) - [05. Capabilities and effects](https://una-lang.org/en/docs/spec/05-capabilities-and-effects.md) - [06. Errors](https://una-lang.org/en/docs/spec/06-errors.md) - [07. Information flow](https://una-lang.org/en/docs/spec/07-information-flow.md) - [08. Requirements and tests](https://una-lang.org/en/docs/spec/08-requirements-and-examples.md) - [09. Core IR](https://una-lang.org/en/docs/spec/09-core-ir.md) - [10. Static semantics](https://una-lang.org/en/docs/spec/10-static-semantics.md) - [11. Dynamic semantics](https://una-lang.org/en/docs/spec/11-dynamic-semantics.md) - [12. Verification](https://una-lang.org/en/docs/spec/12-verification.md) - [13. Diagnostics, Agent ABI and project files](https://una-lang.org/en/docs/spec/13-diagnostics-and-abi.md) - [14. Standard library](https://una-lang.org/en/docs/spec/14-standard-library.md) - [15. Canonical form](https://una-lang.org/en/docs/spec/15-canonical-form.md) - [16. Native backend](https://una-lang.org/en/docs/spec/16-native-backend.md) - [17. Memory model](https://una-lang.org/en/docs/spec/17-memory-model.md) - [18. Fixed-width integers](https://una-lang.org/en/docs/spec/18-fixed-width-integers.md) - [19. Structured concurrency](https://una-lang.org/en/docs/spec/19-structured-concurrency.md) - [20. Constraints on generics](https://una-lang.org/en/docs/spec/20-constraints-on-generics.md) - [21. Maps](https://una-lang.org/en/docs/spec/21-maps.md) - [22. Text operations](https://una-lang.org/en/docs/spec/22-text.md) - [23. JSON](https://una-lang.org/en/docs/spec/23-json.md) - [24. HTTP](https://una-lang.org/en/docs/spec/24-http.md) - [25. Units of measure](https://una-lang.org/en/docs/spec/25-units-of-measure.md) - [26. Long-running programs](https://una-lang.org/en/docs/spec/26-long-running-programs.md) - [27. Tasks and time](https://una-lang.org/en/docs/spec/27-tasks-and-time.md) - [29. Numerics](https://una-lang.org/en/docs/spec/29-numerics.md) - [30. Packages and dependencies](https://una-lang.org/en/docs/spec/30-packages.md) - [31. HTTP servers](https://una-lang.org/en/docs/spec/31-http-servers.md)