API Reference (Python, AKIOS V1.0)
Programmatic access to the security cage.
Install
pip install akios
Core
from akios.core.runtime.engine import WorkflowEngine
engine = WorkflowEngine()
result = engine.run("workflows/example.yml", context={"user_id": 123})
print(result["status"], result["execution_time"])
run(workflow_path_or_workflow, context=None)→ dict with status, execution_time, output_directory.
Agents (programmatic)
- FilesystemAgent:
read,write,list,stat,exists(respectingallowed_paths). - HttpAgent:
get/post/put/deletewith redaction and rate limits. - LlmAgent:
complete,chatwith token/budget tracking. - ToolExecutorAgent:
runallowlisted commands in sandboxed subprocess.
Example:
from akios.core.runtime.agents.filesystem import FilesystemAgent
fs = FilesystemAgent({"allowed_paths": ["./data/input", "./data/output"]})
content = fs.read("./data/input/doc.txt")
fs.write("./data/output/result.txt", "done")
Validation helpers
- Workflows are validated before run; use
akios config validate/akios runfor CLI validation. - API errors surface as exceptions with clear messages (invalid agent/action, missing parameters, disallowed path, unsupported model).
Legacy alias
RuntimeEnginemaps toWorkflowEngine(backward compatibility).
Keep audit enabled when calling programmatically; logs and redaction rules apply the same as CLI runs.