{"id":29477043,"url":"https://github.com/furk4neg3/jotform-test-ai-agent-changes","last_synced_at":"2026-05-15T20:31:39.858Z","repository":{"id":303605565,"uuid":"1016058547","full_name":"furk4neg3/jotform-test-ai-agent-changes","owner":"furk4neg3","description":"Automated live testing for Jotform AI Agent updates—no manual previews required.","archived":false,"fork":false,"pushed_at":"2025-07-16T21:14:11.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-17T15:47:06.029Z","etag":null,"topics":["ai-agent","flask","open-ai","python"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/furk4neg3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-08T12:31:57.000Z","updated_at":"2025-07-16T21:14:14.000Z","dependencies_parsed_at":"2025-07-09T15:20:54.475Z","dependency_job_id":null,"html_url":"https://github.com/furk4neg3/jotform-test-ai-agent-changes","commit_stats":null,"previous_names":["furk4neg3/jotform-ai-agent-test-changes","furk4neg3/jotform-test-ai-agent-changes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/furk4neg3/jotform-test-ai-agent-changes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furk4neg3%2Fjotform-test-ai-agent-changes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furk4neg3%2Fjotform-test-ai-agent-changes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furk4neg3%2Fjotform-test-ai-agent-changes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furk4neg3%2Fjotform-test-ai-agent-changes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/furk4neg3","download_url":"https://codeload.github.com/furk4neg3/jotform-test-ai-agent-changes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/furk4neg3%2Fjotform-test-ai-agent-changes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33078898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","flask","open-ai","python"],"created_at":"2025-07-14T17:19:13.690Z","updated_at":"2026-05-15T20:31:39.825Z","avatar_url":"https://github.com/furk4neg3.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jotform AI Agent Auto-Preview\n\nAutomatically test your Jotform AI Agent immediately after any configuration change—no more manual “Preview” clicks.\n\n---\n\n## 🚀 Features\n\n* **Add Knowledge**\n  \n  Push new knowledge materials (text) to your agent and instantly generate a test question to verify integration.\n\n* **Add Action**\n  \n  Define triggers (e.g. “User Talks About”, “Sentence Contains”) and corresponding actions (e.g. “Say Exact Message”) and automatically validate them via a generated prompt.\n\n* **Change Persona**\n  \n  Update agent properties—name, role, language, tone, chattiness, or add chat guidelines—and see live conversational previews.\n\n* **Unified UI**\n  \n  A single-page interface to configure your agent, powered by Flask and a React-like vanilla JS front-end.\n\n---\n\n## 📦 Tech Stack\n\n* **Backend**: Flask (Python)\n* **Custom HTTP Client:** Reverse-engineered Jotform’s hidden AI Agent web API via browser DevTools (network tab \u0026 cURL) to implement all agent-builder calls from scratch\n* **Jotform Client**: `JotformAIAgentClient` wrapping Jotform AI Agent Builder \u0026 Chat APIs\n* **AI Prompting**: OpenAI GPT (via `openai` Python SDK)\n* **Frontend**: Static HTML/CSS/JS (`index.html`) served from `static/`\n* **Environment Management**: python-dotenv\n\n---\n\n## 🛠️ Getting Started\n\n### Prerequisites\n\n* Python 3.8+\n* A Jotform **Session Token** (for authenticated API calls)\n* An **OpenAI API Key**\n\n### Installation\n\n1. **Clone the repo**\n\n   ```bash\n   git clone https://github.com/your-org/jotform-ai-preview.git\n   cd jotform-ai-preview\n   ```\n\n2. **Install dependencies**\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Create `.env`**\n\n   ```ini\n   # .env\n   JOTFORM_SESSION=your_jotform_session_cookie\n   OPENAI_API_KEY=your_openai_api_key\n   ```\n\n### Running the App\n\n```bash\npython app.py\n```\n\nBy default, Flask will serve on `http://localhost:5000/`. Open that in your browser to load the configuration UI.\n\n---\n\n## 🗂️ Project Structure\n\n```\n.\n├── app.py                # Flask app defining all endpoints (/add_knowledge, /add_action, etc.)\n├── jotform_client.py     # JotformAIAgentClient: wrappers for materials, tasks, properties, chats\n├── requirements.txt      # Python dependencies\n├── .env                  # Environment variables (not committed)\n└── static/\n    └── index.html        # Single-page UI for agent configuration and live preview\n```\n\n---\n\n## 🔌 API Endpoints\n\n| Endpoint          | Method | Description                                                      |\n| ----------------- | ------ | ---------------------------------------------------------------- |\n| `/`               | GET    | Serve the static configuration UI                                |\n| `/add_knowledge`  | POST   | Add new knowledge and preview via generated test prompt          |\n| `/add_action`     | POST   | Add new action and preview via generated test prompt             |\n| `/update_name`    | POST   | Rename agent, then preview                                       |\n| `/update_role`    | POST   | Change agent role, then preview                                  |\n| `/add_guideline`  | POST   | Append a chat guideline to persona, then preview                 |\n| `/update_persona` | POST   | Update any persona property (language, tone, etc.), then preview |\n\n---\n\n## 💡 How It Works\n\n1. **Configuration** (UI): you enter your **Agent ID** and configure knowledge, actions, or persona.\n2. **Backend Flow** (e.g. in `/add_knowledge`):\n\n   * Calls `client.add_knowledge(...)` to push new material.\n   * Uses OpenAI to generate a single test prompt (`generate_test_prompt`).\n   * Invokes `client._preview_change(...)` to start a fresh chat and run the prompt, capturing both greeting and agent reply.\n3. **Results Display**: The UI parses the JSON and renders:\n\n   * **Initial Greeting**\n   * **Test Prompt**\n   * **Agent Response**\n   * **Raw API Result**\n\n---\n\n## 🤝 Contributing\n\n1. Fork and create a branch (`git checkout -b feature/foo`)\n2. Commit your changes (`git commit -am 'Add some foo'`)\n3. Push to the branch (`git push origin feature/foo`)\n4. Open a Pull Request\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n\n---\n\n*Happy testing—no more manual previews!*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurk4neg3%2Fjotform-test-ai-agent-changes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffurk4neg3%2Fjotform-test-ai-agent-changes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffurk4neg3%2Fjotform-test-ai-agent-changes/lists"}