Library
The builtin modules, grouped by topic. Every function has its signature, a short description and a small example. Functions in the String, List, Map, Set, Range, Int, Float, Result and JSON modules whose first parameter has that type can also be called as methods: String.upcase(s) is the same as s.upcase. A family groups modules under one name, as Ruby’s OpenSSL::Cipher does: OpenSSL.Cipher.aes_256_gcm_encrypt is the function aes_256_gcm_encrypt of the member Cipher of the OpenSSL family, and only OpenSSL is a reserved name.
You can also look up any builtin from the command line with agentica help NAME; agentica help alone lists the namespaces and the builtin types, and agentica help --json prints every builtin and builtin type as one JSON array.
- Data structures Lists, maps, sets, queues, heaps, ranges, bytes, lazy pipelines and optional values, and when to use each.
- Text and data Work with text and numbers, search and replace text with regular expressions, read and write JSON and TOML, encode URLs, escape HTML and handle cookies, find the media type of a file, read Unix time as a UTC date and RFC 3339 text, pack numbers into bytes, hash and sign bytes, and draw secure random bytes.
- Errors Report failures as Result values and read them.
- Concurrency Run work at the same time with tasks, pass values between tasks with channels, share state in ATS tables, cache computed text, and keep state in actors.
- IO and system Standard input and output, files, other programs, the network, and the system.
- IO
- File, Dir and Path
- Process
- TCP, TLS and HTTP
- System, Time and Random
- Logger
- Native code Call C functions of a native library with an extern block.
- Option parser (std)
- Archive
- Testing Unit tests and Gherkin feature files, both run by agentica test, and the profile.
- Algorithms
- Code analysis (std)