Developer Guides · May 5, 2026
Developer Guide: Customising and Migrating Your Torly.ai Integration with Ease
Follow our developer-friendly guide to customise and migrate your Torly.ai integration for seamless visa application automation and robust compliance.
Introduction: Mastering AI Agent Customisation and Migration
Ready to level up your AI integration? This guide dives straight into AI agent customisation, showing you how to tune Torly.ai’s powerful platform for your Innovator Founder Visa workflow and migrate your setup without a hiccup. You’ll learn practical steps, pitfalls to watch for, and real code snippets that feel more like friendly advice than dry instruction.
By the end, you’ll have a robust, future-proof Torly.ai configuration—optimised for seamless visa readiness analysis, bespoke business-plan generation and ongoing compliance checks. Plus, you can kickstart the process today with Experience AI agent customisation with our AI-Powered UK Innovator Visa Application Assistant to see instant improvements.
Why Customisation Matters for Torly.ai
You choose Torly.ai because off-the-shelf solutions only go so far. Fine-tuning AI agent behaviour unlocks:
- Precise evaluation criteria that match endorsing-body requirements.
- Tailored feedback loops for founders, improving business-plan success rates.
- Integration points with your existing CI/CD pipeline for continuous compliance.
Customisation isn’t optional—it’s essential. When you tailor the AI to your company’s criteria, you get faster, more reliable visa-readiness checks. That translates into higher endorsement success and less back-and-forth with solicitors.
Preparing for Your Migration Journey
Before you reconfigure, gather your essentials:
- A copy of your legacy Torly.ai config (often in
torly.config.jsonorconfig.yml). - Node.js (v16+) installed on your dev machine.
- Access to your Torly.ai API key and workspace ID.
- A sandbox environment to test changes without affecting live data.
Think of this like migrating from an old ESLint .eslintrc file to the new flat config—you get a shell to start from, but you still need to tweak settings to suit your project. With Torly.ai, move from YAML or JSON to a dedicated JavaScript config for ultimate flexibility.
Step-by-Step Migration Guide
1. Initialise Your New Config File
Create torly.config.js at your project root:
// torly.config.js
import { defineConfig } from 'torly-ai/config';
import visaEvaluator from 'torly-ai/agents/visaEvaluator';
export default defineConfig({
apiKey: process.env.TORLY_API_KEY,
workspaceId: 'your-workspace-id',
agents: [
visaEvaluator({
endorsementBody: 'EB-UK',
language: 'en-GB'
})
]
});
This mirrors how ESLint’s flat config system uses defineConfig. You import modules, set parameters directly, and avoid brittle string references.
2. Map Legacy Settings to New Options
Look at your old config. For each section—like documentChecks or gapAnalysis—find the equivalent agent options in the new JS API. Your migration tool will handle most conversion logic, but you must:
- Replace string-based plugin references with imported modules.
- Move parser or languageOptions into the
defineConfigcall. - Consolidate global variables under one key if applicable.
3. Validate with a Dry Run
Run:
npx torly migrate torly.config.js --dry-run
You’ll see warnings for missing or deprecated properties. Fix these iteratively. Think of it like ESLint’s --report-unused-disable-directives—it flags what’s not needed.
Download BP Build Desktop APP helps you test locally with a visual interface for configurations and real-time feedback.
4. Commit and Deploy
Once the dry run is clean:
- Commit
torly.config.jsto your repo. - Trigger your CI/CD pipeline.
- Monitor logs for any agent-initialisation errors.
Voila—your integration is migrated.
Deep Dive: Advanced AI Agent Customisation
Now that you have a working config, let’s unlock the full power of AI agent customisation.
Customising Evaluation Criteria
Each agent in Torly.ai comes with default rule sets. Override or extend them:
import businessQual from 'torly-ai/agents/businessQualification';
agents: [
businessQual({
minimumFunding: 50000,
focusMarkets: ['UK', 'EU'],
customMetrics: {
sustainability: { weight: 0.2 },
}
})
]
Here you adjust:
– Funding thresholds.
– Geographic focus.
– Add bespoke metrics.
Adding New Agents
You might need a “Team Structure Advisor”. Create one:
import { defineAgent } from 'torly-ai/agent-builder';
const teamAdvisor = defineAgent({
id: 'teamAdvisor',
description: 'Analyses team expertise and recommends hires',
handler: async (context) => {
// custom logic
}
});
export default defineConfig({
/* ... */
agents: [teamAdvisor, /* existing agents */]
});
This approach feels like writing a plugin for ESLint, but your agent runs 24/7 to improve visa readiness.
Extending Outputs
Need extra documentation fields? Tweak the response schema:
languageOptions: {
responseFields: [
'score',
'recommendations',
'riskAnalysis',
'timeline'
]
}
By controlling responseFields, you ensure every report covers what your legal team expects.
Elevate your planning with the TorlyAI Desktop APP to preview these changes in real time.
Testing and Continuous Validation
Integrate your new config into automated tests:
- Write unit tests for custom agents using Jest.
- Use Torly.ai’s sandbox endpoint in CI to simulate submissions.
- Assert on response codes, scores, and recommendation presence.
Example with Jest:
import torly from 'torly-ai';
const client = torly({ apiKey: 'test-key', workspaceId: 'test' });
test('Business Qualification passes basic scenario', async () => {
const result = await client.runAgent('businessQualification', sampleData);
expect(result.score).toBeGreaterThan(70);
});
Automate this in GitHub Actions or GitLab CI. It’s as simple as ESLint testing in pre-commit hooks.
Build Your Endorsement Application with 6 AI Agents to try sample test data sets and speed up your QA cycle.
Troubleshooting Common Pitfalls
- Missing API key: Ensure
process.env.TORLY_API_KEYis set in all environments. - Legacy syntax lingering: Remove any
.torlyrcremnants to avoid conflicts. - Agent initialisation errors: Check that each imported agent exists in your version of Torly.ai.
- Response mismatches: If fields are undefined, revisit
responseFieldsinlanguageOptions.
When in doubt, consult the official docs or reach out to Torly.ai support for personalised advice.
Conclusion: Your Next Steps
Customising and migrating your Torly.ai integration is straightforward when you follow a clear, methodical approach. You’ll enjoy:
- Tailored visa readiness checks.
- Easier compliance management.
- Future-proof configuration in a single JS file.
Ready for smooth, powerful AI agent customisation? Get started with AI agent customisation using our AI-Powered UK Innovator Visa Application Assistant and transform your Innovator Founder Visa workflow today.