Discovery Engine
The Discovery Engine provides semantic search and workflow planning across your integration mesh. Describe what you want in natural language, and the engine finds relevant tools and builds verified plans.
How It Works
Semantic Search
Describe your goal in natural language. The engine searches tool descriptions and metadata to find relevant tools, ranked by relevance.
Example: Query “get customer invoices” returns tools from QuickBooks, SAP, Stripe, and other billing systems, ranked by how well they match your query.
Workflow Planning
For multi-step workflows, the planning engine searches exhaustively over the tool graph. It finds paths from your starting point to your goal, considering type compatibility, adapters, and policies.
The engine verifies each plan before execution. Plans include Cognitive Trust Certificates (CTCs) proving correctness—no cycles, type-safe transitions, and policy compliance.
Coverage Analysis
The engine identifies what tools you’re missing to achieve a goal. If a workflow isn’t possible with your current integrations, it tells you which tools or integrations you need to add.
Discovery Tools
discover
Semantic tool search. Pass a natural language query and get back relevant tools.
{
"query": "create an invoice",
"limit": 10
}
Returns tools ranked by relevance score.
plan
Plan multi-step workflows. Describe your goal, and the engine generates a verified plan.
{
"goal": "Create invoices from leads",
"policy": {"max_cost": 100}
}
Returns a step-by-step plan with estimated cost and safety guarantees.
guide
Interactive guided discovery. The engine asks clarifying questions to narrow down what you need.
{
"goal": "I want to sync data between systems"
}
The engine responds with questions like “What type of data?” and options like “Customers”, “Invoices”, “Products”.
Semantic Types
Tools are annotated with semantic types that describe what data they work with, not just their structure. Examples include crm.lead@1, billing.invoice@1, billing.customer@1.
The engine understands type relationships. A lead is a subtype of contact, and both can be converted to a customer with the right adapter.
Type Bridging
When tools have incompatible types, the engine automatically inserts adapters. If you need to convert a CRM lead to a billing customer, the engine finds and inserts the appropriate adapter tool.
Policy System
Enforce business rules through policies:
- Read-only mode: Only allow read operations, block writes
- Cost limits: Prevent plans that exceed a credit budget
- Integration filters: Restrict to specific integrations
- Custom rules: Define complex policies for your use case
The planner respects all policies when generating plans.
Cognitive Trust Certificates
Every verified plan includes a CTC that proves:
- No cycles (the plan terminates)
- Type safety (all conversions are valid)
- Policy compliance (all rules are respected)
- Optimality (no cheaper safe path exists)
CTCs provide formal guarantees before execution. If a plan has a CTC, it’s guaranteed to work barring upstream API failures.
Skills
Save verified workflows as reusable skills. Skills are pre-validated, tested, and faster to execute than rebuilding the workflow each time.
After executing a plan successfully, save it as a skill. Other agents can then call the skill like any other tool.
Performance
Typical discovery queries complete in under 150ms. Planning takes 50-200ms depending on complexity. The system scales to thousands of tools per server.
Best Practices
Use discovery instead of hardcoding tool names. This makes your workflows adapt automatically if you switch integrations.
Start with coverage analysis before building workflows. Check if your goal is achievable with current tools.
Use planning for multi-step workflows instead of manual chaining. The engine handles type bridging and validation automatically.
Save frequently-used workflows as skills. Skills execute faster and are cheaper than rebuilding workflows each time.
Troubleshooting
If discovery returns no results, try broadening your query, lowering the minimum score threshold, or adding more integrations.
If plan generation fails, the goal may be impossible with current tools. Run coverage analysis to see what’s missing.
If plan validation fails, check the error message for specific violations—cycles, type mismatches, or policy violations.
Reference
For detailed parameter documentation, see the Discovery Tools reference.