Skip to main content

Crate simple_agents_ffi

Crate simple_agents_ffi 

Source
Expand description

C-compatible FFI bindings for SimpleAgents.

Structs§

SAClient
SAMessage

Functions§

sa_client_free
Free a client created by sa_client_new_from_env.
sa_client_new_from_env
Create a client from environment variables for a provider.
sa_complete
Execute a completion request with a single user prompt.
sa_complete_messages_json
Execute a completion request with full message input and return a structured JSON payload.
sa_last_error_message
Get the last error message for the current thread.
sa_run_email_workflow_yaml
Execute workflow email YAML through the Rust workflow runner and return JSON output.
sa_run_workflow_yaml
Execute workflow YAML with arbitrary workflow input JSON and return JSON output.
sa_run_workflow_yaml_stream_events
Execute workflow YAML and emit live workflow events to a callback while returning final output.
sa_run_workflow_yaml_with_events
Execute workflow YAML and include collected workflow events in the JSON output under events.
sa_run_workflow_yaml_with_options
Execute workflow YAML with arbitrary input JSON and optional telemetry options JSON.
sa_stream_messages
Execute a message-based completion request in streaming mode and emit JSON events to a callback.
sa_string_free
Free a string returned by SimpleAgents FFI.