Skip to main content
Version: 1.0.0

Touba components

Source defines the program, the runtime controls execution, and handlers connect it to external systems.

CompilationYour programAgents · capabilities · limitsCompiled contractAIRAI modelProposes an actionTouba runtimeChecks before executionYour handlersJavaScript · PythonYour systemsAPIs · databases · servicesExecution traceDecisions · calls · resultsAuthorized callYour programAgents · capabilities · limitsCompiled contractAIRTouba runtimeChecks before executionYour handlersJavaScript · PythonYour systemsAPIs · databases · servicesExecution traceDecisions · calls · resultsAI model : proposes an action
The model proposes. Touba checks the call. Your handlers perform the action and the trace records its execution.

From program to action​

ComponentResponsibility
LanguageDescribe types, functions, skills, agents, strategies and access rules in .tb files
Compiler and AIRCheck source and produce its structured intermediate representation
RuntimeExecute the program, check calls, permissions, budgets and approvals, then produce a trace
ManifestConnect tools to handlers and specify granted access
Decision providerSupply model choices using the context and offered capabilities
HandlerPerform an external operation with the inputs and access specified by its contract

Model selection and execution authorization are separate steps. Runtime checks apply to both structured and native decision interfaces.

Declare the contract, implement the operation​

Source defines inputs, output and the required capability:

tool SearchDatasets
takes query as Text
gives Text
requires network

The handler implements the search in JavaScript or Python. The manifest connects it to the tool and grants network access. The real tool guide covers the full example.

Development tools​

ToolUse
Touba CLIInitialize, prepare, compile, run, inspect and manage packages
Touba Language ToolkitDiagnostics, completion, navigation and trace inspection in VS Code
JavaScript and Python SDKsWrite handlers, drive the same runtime with ToubaEngine, test contracts and integrate providers

Both SDKs share the same concepts. Choose the language of your application:

touba sdk install javascript

or:

touba sdk install python

See the JavaScript and Python guides for their imports and APIs.

Composition and reuse​

A package can contain Touba declarations, handlers and contextual procedures. Imports make its declarations available to the program; the consuming project defines the permissions.

Strategies organize calls and human decisions. Multi-agent composition and bounded parallelism structure larger workflows with shared traces and limits.

Get started​

Follow the first program, then configure the VS Code extension.