Connect your application
Use small application-owned adapters around a reusable service queue and Codex CLI runner.
Keep application ownership explicit
The service database belongs to the framework. Your source and destination databases belong to your application. Use separate files and keep application SQL in your own preparation and export scripts.
Prepare both tasks and a run
from pathlib import Path
from codex_agenting.storage import Store
store = Store(Path(".agenting/application.sqlite"))
store.verify() # Initialize this separate service database first.
task_id = store.add_task(
"summarize.md",
{"text": "Synthetic input for an integration example."},
unit_id="catalog:001",
)
# Use model and reasoning values approved for your own setup.
run_id = store.create_run(model, reasoning, [task_id])
print({"run_id": run_id, "selected_tasks": 1})The task's unit_id is a string link to the application record. It is not inferred from the internal task ID, and it is not injected into the prompt automatically.
Write prompt templates as data
Summarize the following text in one short paragraph.
{{ text }}Simple placeholders receive literal values from the task's JSON arguments. The framework does not evaluate template expressions or generated code.
Export saved responses
for row in store.iter_results(run_id):
response_text = row["gpt_result"]
source_key = row["unit_id"]
# Apply application validation and source-revision checks here.
# Persist using your application's explicit replay/write policy.Set the delivery policy in your application
Decide how to detect changed source records, reject invalid responses, and handle repeated exports. The framework's saved result does not establish exactly-once delivery or domain correctness.