simple-agents-ffi
C-compatible bindings for SimpleAgents.
Build
The header is at crates/simple-agents-ffi/include/simple_agents.h.
Usage
int
Notes
sa_client_new_from_envexpects provider env vars (e.g.OPENAI_API_KEY).- Pass
max_tokens <= 0to omit max tokens. - Pass
temperature < 0.0to omit temperature. sa_complete_messages_jsonsupports message arrays and returns structured JSON including tool calls, usage, and optional healing/coercion metadata (mode:standard|healed_json|schema).sa_stream_messagesstreams message-based responses through a callback, emitting JSON events (chunk,error,done).