Перейти к содержанию
НОВОЕМаркетплейс и ваша команда: продавайте то, что создали, и получайте планы и изменения, проверенные до того, как вы их увидите. Что нового

Библиотека / ИИ-агенты и ассистенты

ИИ-агенты и ассистенты

Логирование запусков агентов OpenAI в виде хеш-связанных квитанций в Data Tables для каждого клиента

Получает запросы клиентов через webhook, запускает AI Agent OpenAI и сохраняет каждый запуск в журнале Data Table для каждого клиента с хеш-цепочкой, чтобы можно было обнаружить последующие изменения.

Что делает

## Log every AI agent run per client and check it later For agencies and freelancers who run an AI agent for paying clients and want to show a client later what the agent was asked, what it answered, and that the record has not been edited since. ### How it works 1. Your app POSTs { "client_id", "prompt" } to Agent request. 2. The AI Agent runs with Max Iterations and a token limit from Settings. 3. Every run, whether answered, failed or refused, becomes one entry in that client's chain in the agent_run_log Data table: SHA-256 of prompt and answer, model, model and tool calls, outcome, prev_hash and entry_hash. Raw text is not stored unless you turn on store_text. 4. The caller gets the answer plus a receipt (seq, entry_hash). If the entry can't be written, the answer is withheld (503) and you get an email. 5. Every night the whole log is checked again. You get an email naming the first break, or a daily anchor (last hash per client) that is your copy outside n8n. 6. Verify request returns one client's chain status, safe to show that client. ### Setup steps 1. Create the two Data tables in the note below. 2. Credentials: OpenAI on Chat model, Header Auth on both webhooks, SMTP on the three email nodes. 3. Fill in Settings and Daily check settings. 4. Publish, then run the examples in Try it.

Шаги

  1. Agent request
  2. Settings
  3. Validate request
  4. Route the request
  5. Reject: bad request
  6. Client AI agent
  7. Chat model
  8. Calculator tool
  9. Build the log entry
  10. Read the chain head
  11. Link and hash the entry
  12. Append to the log
  13. Re-read around the entry
  14. Confirm the position

Всего шагов: 39.

Похожие автоматизации