Pre-built tools cover the common cases - web search, document processing, image generation, standard API integrations. But every organization has unique systems, proprietary APIs, and domain-specific operations that no tool library will ever include. Custom apps bridge this gap, letting you extend agent capabilities to include whatever your particular situation requires. The difference between an agent that can only use generic tools and one that can interact with your specific systems is often the difference between a demo and a production deployment.
When Custom Apps Make Sense
The tool library exists to save you from building commodity integrations. Web search, Slack messaging, calendar access, file processing - these are problems solved many times over. Building your own version provides no advantage and consumes engineering time that could go elsewhere.
Custom apps make sense when your requirements are genuinely unique.
Proprietary internal systems are the most common case. Your company's internal database, your custom CRM, your homegrown inventory management system - these are not in any tool library because they exist only in your organization. If agents need to interact with these systems, custom apps are the only path.
Domain-specific logic that embeds business rules or specialized calculations warrants custom apps. A pricing calculator with your specific discount structures. A compliance checker against your particular regulations. A risk scorer using your proprietary model. The logic is yours; the tool must be yours too.
Specialized transformations that process data in ways specific to your use case need custom implementation. Converting between your internal formats. Applying your validation rules. Transforming data to match your downstream systems' expectations.
Novel capabilities that do not exist in standard libraries must be built. If you are doing something new - a capability nobody has packaged into a reusable tool - you are building it yourself regardless of platform.
The decision framework is simple: if the capability is standard and exists in the library, use the library. If the capability is unique to your situation, build a custom app.
What a Custom App Does
A custom app is a self-contained unit that accepts inputs, performs some operation, and returns outputs. From the agent's perspective, it looks just like any other tool - it has a name, a description, defined parameters, and produces results.
The difference is that you control what happens inside. The app might call your internal APIs, perform calculations using your business logic, access your databases, or interact with your proprietary systems. The internals are yours to define.
Custom apps become part of the tool ecosystem once deployed. Agents can use them alongside library tools. Workflows can include them as steps. Other custom apps can call them. The integration is seamless - your custom capability becomes a first-class citizen in the platform.
This matters because it means you are not building a separate integration. You are extending the existing system with your specific needs. The agent does not treat custom tools differently from built-in tools. The observability captures custom tool calls the same way. The approval gates work the same way. Everything composes.
Designing the Interface
Good custom apps start with clear interface design. What inputs does the operation need? What outputs does it produce? What can go wrong?
Input parameters should be the minimum required. Each parameter adds cognitive load for the agent and increases the chance of errors. Include what is necessary, no more. Use clear, descriptive names that help the agent understand what to provide.
Output structure should be predictable and useful. Return what the calling agent or workflow needs for subsequent steps. Structure the output so relevant information is easily accessible. Avoid dumping raw data that requires further parsing.
Error handling should produce clear, actionable information. When something fails, the error message should explain what went wrong and ideally what could fix it. Agents receiving clear error messages can often recover or explain the issue to users. Agents receiving cryptic errors are stuck.
Description text matters more than you might expect. The description tells agents when to use this tool. A vague description leads to inappropriate use. A precise description guides correct selection. Write the description as if explaining to a capable colleague when this tool is the right choice.
Think about the interface from the agent's perspective. The agent reads the description, sees the parameters, and decides whether this tool fits its current need. Design for that decision process.
Building the App
The implementation depends on your platform, but the pattern is consistent. You define a schema describing inputs and outputs, implement the logic that transforms inputs to outputs, and deploy the result.
The schema becomes the tool's interface. Parameter names, types, descriptions, and whether they are required - all specified in the schema. This schema drives both validation and the information provided to agents about how to use the tool.
The implementation is your code. Call your APIs, run your calculations, access your data stores. The platform provides the execution environment; you provide the logic. Standard software engineering practices apply - handle errors, validate inputs, log appropriately, test thoroughly.
Deployment makes the app available. Once deployed, the app exists in the system and can be added to agents or workflows. Versioning lets you update the app while maintaining compatibility with existing uses.
The build process is typically simpler than building standalone integrations because the platform handles many concerns. Authentication and secrets management, execution environment, observability, error handling infrastructure - these exist already. Your custom app plugs into them rather than building from scratch.
Connecting to Internal Systems
Most custom apps exist to connect agents to internal systems. Several patterns recur.
API wrappers are the simplest case. Your internal system has an API. Your custom app accepts parameters, calls that API, and returns relevant parts of the response. The app translates between what agents need and what your API provides.
Authentication for these APIs typically uses secrets management. Store credentials securely in the platform, inject them at runtime. Your app code accesses credentials without hardcoding them, maintaining security while enabling the connection.
Database access requires careful design. Your app might query internal databases to retrieve information agents need. Design queries to return appropriate data volumes - agents work best with focused results, not data dumps. Consider what filtering or aggregation happens in the app versus what the agent handles.
Composite operations combine multiple internal calls into a single tool. An agent might need information that requires querying three internal systems and combining results. A custom app that does this combination presents a clean interface to the agent while handling the internal complexity.
Business logic execution embeds your rules into a callable tool. The agent provides inputs; your app applies your business rules; the outputs reflect your logic. Pricing calculations, eligibility determinations, risk assessments - logic you have already built, now accessible to agents.
Testing Custom Apps
Custom apps need testing like any other software, with additional considerations for agent usage.
Functional testing verifies the app does what it should. Given these inputs, does it produce the expected outputs? Do error cases produce appropriate errors? Standard testing practices apply.
Schema testing verifies the interface is correct. Do the parameter types match what the implementation expects? Do the outputs match the declared schema? Mismatches cause runtime failures that are frustrating to debug.
Agent integration testing verifies agents can use the app effectively. Add the app to a test agent and try realistic prompts. Does the agent select the tool appropriately? Does it provide reasonable parameters? Does it handle the outputs usefully? This testing catches interface design issues that functional testing misses.
Description testing verifies agents understand when to use the app. Present an agent with multiple tools including yours and see if it selects correctly across a range of scenarios. Poor descriptions lead to incorrect selection; testing reveals this.
Consider edge cases that agents might encounter. What happens with missing optional parameters? What if inputs are at boundary values? What if the backend system is slow or unavailable? Agents will encounter these cases in production; testing should cover them.
Maintenance and Evolution
Custom apps require ongoing attention like any production software.
Backend changes in your internal systems may require app updates. API versions change, data schemas evolve, new fields become available. Keep your apps synchronized with the systems they connect to.
Usage patterns reveal opportunities for improvement. If agents frequently use the app in ways you did not anticipate, consider whether the interface should change to better support those patterns. If certain errors recur, improve handling or documentation.
Versioning lets you update apps without breaking existing uses. Deploy new versions while maintaining old ones until dependent agents and workflows migrate. Forced migrations without versioning cause avoidable incidents.
Deprecation handles apps that are no longer needed or are replaced by better alternatives. Communicate deprecation clearly, provide migration paths, and maintain old versions long enough for transitions to complete.
The maintenance burden is typically lighter than standalone integrations because you are maintaining only your unique logic. The platform handles execution infrastructure, observability, authentication - concerns that would otherwise require your ongoing attention.
Sharing and Reuse
Custom apps can be shared across your organization and potentially beyond.
Internal sharing lets multiple teams use apps you build. A custom app connecting to your CRM becomes available to any agent or workflow in your organization. Build once, use many times.
Team boundaries can be respected through access controls. Some custom apps might be organization-wide. Others might be restricted to specific teams working with specific systems. Configure appropriately for your governance requirements.
Documentation enables reuse. Other teams using your app need to understand its purpose, parameters, and limitations. Invest in documentation proportional to expected reuse.
Standardization across custom apps improves usability. Consistent naming conventions, consistent error formats, consistent output structures make the collection of custom apps feel coherent rather than ad hoc.
For teams building agent systems that need to interact with proprietary systems, inference.sh provides the infrastructure to deploy custom apps that integrate seamlessly with the rest of the platform. Define your schema, implement your logic, deploy, and your custom capability becomes available to any agent or workflow. The unique parts of your system become first-class tools without building integration infrastructure from scratch.
Custom apps are how generic AI capabilities become specific to your organization. The library handles the common cases. Custom apps handle your cases. Together, they give agents the full range of capabilities your use cases require.
FAQ
How do I decide between a custom app and just calling APIs directly from agent prompts?
Direct API calls from prompts (where the agent generates API requests as text) are fragile and limited. The agent might get the format wrong, authentication is difficult to handle, and error recovery is poor. Custom apps provide a clean abstraction - the agent calls a tool, the tool handles the API details. This separation makes agents more reliable and makes API changes easier to handle without retraining agents. Use custom apps for any API interaction that matters; reserve direct API generation for exploratory or one-off cases where building an app is not worthwhile.
What should I do when my custom app needs credentials that vary per user?
Per-user credentials require the platform's credential management infrastructure. Store user credentials through the platform's secure storage, associated with user identities. Your custom app retrieves the appropriate credentials at runtime based on which user's agent is executing. Never hardcode credentials or pass them through agent prompts. The platform handles the mapping from user identity to credentials; your app receives the credentials it needs without managing the storage or security itself.
How do I handle custom apps that take a long time to execute?
Long-running operations need appropriate timeout configuration and potentially asynchronous patterns. Set timeouts that accommodate your expected execution time plus reasonable buffer. For very long operations, consider returning immediately with a job identifier and providing a separate status-check tool. The agent can poll for completion or receive notification when finished. Design the interface to set appropriate expectations - if an operation takes minutes, the description should indicate this so agents and users know to expect a wait.