Proposal: GNAP as an integration pattern for Temporal + AI agent coordination
Temporal is the gold standard for durable, distributed workflow orchestration — fault-tolerant, scalable, and now with native OpenAI Agents SDK integration (just announced in public preview). GNAP offers a complementary pattern for cases where you want AI agents to coordinate without Temporal's full workflow infrastructure.
GNAP (Git-Native Agent Protocol) uses a git repo as a task board: board/todo/ → board/doing/ → board/done/. It's lighter than Temporal for cases where agents need to coordinate without long-running durable workflows.
Where GNAP + Temporal complement each other:
Temporal is excellent for orchestrating predefined business logic. GNAP is ideal for coordinating autonomous agents whose work is less structured. A Temporal workflow can delegate to GNAP for the autonomous portion:
@workflow.defn
class DataAnalysisWorkflow:
@workflow.run
async def run(self, dataset_id: str):
# Temporal handles the orchestration
await workflow.execute_activity(
create_gnap_task, # Write to board/todo/
args=[f"analyze-{dataset_id}"],
)
# AI agent (outside Temporal) claims task from GNAP board
result = await workflow.execute_activity(
wait_for_gnap_completion, # Poll board/done/
args=[f"analyze-{dataset_id}"],
start_to_close_timeout=timedelta(hours=2),
)
return result
Temporal's durable execution guarantees the handoff even if the agent crashes and needs to restart — GNAP ensures the work can be reclaimed. This makes the Temporal + GNAP combination more robust than either alone for human-in-the-loop AI workflows.
Spec: https://github.com/farol-team/gnap