How to Use Tabnine Agent

This guide walks you through using Tabnine Agent effectively, from basic interactions to advanced workflows.

Getting Started

Activating Agent Mode

Tabnine Agent works in Agent Mode, which provides full agentic capabilities including tool usage and autonomous workflows.

In VS Code:

  1. Open Tabnine Chat panel

  2. Look for the “Agent Mode” toggle or indicator

  3. Ensure agent mode is enabled for tool calling capabilities

Your First Agent Request

Start with a simple request to get familiar with agent interactions:

You: "Document this function and explain what it does"
Agent: I'll analyze the function, generate comprehensive documentation, and explain its purpose and usage.

Interaction Patterns

Natural Language Commands

Agents understand natural language instructions. Be specific about what you want:

Good Examples:

✅ "Refactor this component to use React hooks instead of class components"
✅ "Add error handling to this API call with proper user feedback"
✅ "Create unit tests for the user authentication module"
✅ "Optimize this database query for better performance"

Less Effective:

❌ "Make this better"
❌ "Fix this"
❌ "Do something with this code"

Multi-Step Workflows

Agents excel at complex, multi-step tasks:

You: "I need to add a new user registration feature with email verification"

Agent Process:
1. Analyzes existing user system
2. Creates implementation plan
3. Builds registration components
4. Implements email verification
5. Adds comprehensive tests
6. Updates documentation

Common Agent Tasks

Code Development

Feature Implementation:

"Implement a shopping cart feature with add, remove, and quantity update functionality"

Bug Fixing:

"Investigate why the search functionality returns inconsistent results"

Code Quality:

"Review this module for security vulnerabilities and performance issues"

Code Refactoring

Architecture Improvements:

"Break down this monolithic service into microservices"

Pattern Implementation:

"Convert this codebase to use the repository pattern for data access"

Modernization:

"Upgrade this jQuery code to modern vanilla JavaScript with ES6+ features"

Testing & Quality Assurance

Test Creation:

"Generate comprehensive test suite for the payment processing module"

Code Coverage:

"Identify untested code paths and create appropriate tests"

Performance Testing:

"Create performance tests for the API endpoints"

Working within Context

Code Context

Agents automatically understand your codebase context:

  • Current File: Agents see the file you’re working in

  • Project Structure: Understanding of your project layout

  • Dependencies: Awareness of installed packages and frameworks

  • Coding Patterns: Recognition of your team’s coding style

Providing Additional Context

When needed, provide specific context:

"Using the existing authentication system, add role-based access control to the admin dashboard"
"Following the current error handling patterns in this project, add validation to the user input form"

Advanced Usage Patterns

Iterative Development

Work with agents iteratively for complex projects:

Session 1: "Create the basic structure for a blog system"
Session 2: "Add user authentication to the blog system"
Session 3: "Implement comment functionality with moderation"
Session 4: "Add search capabilities with indexing"

Template-Based Requests

Create reusable request patterns for your team:

"Following our standard REST API template, create CRUD endpoints for [entity]"
"Using our component library patterns, create a reusable [component-type] component"

Code Review Assistance

"Review this pull request for security issues, performance problems, and code quality"
"Check if this implementation follows our team's coding standards and best practices"

Best Practices

While this is not an exhaustive list, these major points will help you get the results you want.

1. Be Specific and Clear

  • Instead of: “Make this faster”

  • Try: “Optimize this database query by adding appropriate indexes and reducing N+1 queries”

2. Provide Context When Needed

  • Instead of: “Add tests”

  • Try: “Add unit tests for the payment service using Jest, following our existing test patterns”

3. Break Down Complex Tasks

  • For very large tasks, break them into phases:

Phase 1: "Design the database schema for the new feature"
Phase 2: "Implement the backend API endpoints"
Phase 3: "Create the frontend components"
Phase 4: "Add comprehensive testing"

4. Leverage Agent Memory

Within a session, agents remember previous context:

You: "Create a user management system"
Agent: [Implements basic system]

You: "Now add password reset functionality"
Agent: [Adds to existing system, maintaining consistency]

Monitoring Agent Progress

Understanding Agent Actions

Agents will typically show you their progress. Here are a few examples:

  • Analyzing current authentication system...

  • Planning password reset implementation...

  • Creating password reset endpoint...

  • Implementing email notification system...

  • Adding tests for new functionality...

  • Password reset feature complete!

Reviewing Agent Decisions

Agents often explain their reasoning:

Agent: "I chose to implement this using JWT tokens because:
1. It matches your existing authentication pattern
2. It's stateless and scalable
3. It integrates well with your current security middleware"

Common Pitfalls

Vague Instructions

  • Problem: “Make this code better”

  • Solution: “Improve error handling and add input validation”

Overloading Requests

  • Problem: “Rewrite the entire application using microservices and add authentication and testing”

  • Solution: Break into multiple focused requests

Ignoring Context

  • Problem: Making requests without considering existing patterns

  • Solution: Reference existing code patterns and team conventions

Iteration and Refinement

Building on Results

You: "Create a basic todo app"
Agent: [Creates basic implementation]

You: "Add categories and due dates"
Agent: [Enhances existing app]

You: "Add real-time sync with WebSockets"
Agent: [Further enhances with advanced features]

Requesting Modifications

"The search function works well, but can you make it case-insensitive and add fuzzy matching?"
"This is good, but can you refactor it to use TypeScript interfaces for better type safety?"

Measuring Success

Quality Indicators

Look for these signs of successful agent interactions:

  • Consistency: Code follows your project patterns

  • Completeness: All requested features are implemented

  • Quality: Code includes proper error handling and tests

  • Documentation: Changes are well-documented

  • Integration: New code works seamlessly with existing systems

Feedback Loop

Provide feedback to improve future interactions:

"That implementation is perfect - I especially like how you maintained the existing error handling patterns"
"Good work, but next time please include more detailed comments for complex algorithms"

Common Tabnine Agentic Workflow

Select Agent from the upper menu, between Chat and Test. Type in your prompt in the same bottom text window.

You’ll initially be met by the red Tabnine logo, followed by a description of what Agent intends to do with its response and the files it creates. Below that, you will see a brief “Working…” message:

You will see such descriptors for most steps of the process. This will help you keep track of Agent’s own workflow.

The most common descriptors are

Exploring and Explored

Creating and Created

Reading and Read

Applying and Applied

When it generates the code for a file, you can create that file by hitting the Apply button. To approve changes to a new version of an existing file, select the circled, green checkmark above the document window:

You will similarly see prompts to either Reject or Run new files or changes to files. This serves the same function as the check and x marks mentioned above.

?: Do I have to approve “changes” to the file if it’s a new file (i.e., click the green checkmark)?

No. On the initial creation, you can do without clicking it because there are no additional changes — the file now exists. For edits, absolutely. Once you click the checkmark, it will automatically close both the original file and the window comparing the original file code (in red) to highlighted changes (in green).

As Agent continues, it will further add headers above new sections of work, such as in this example where it pivots to creating the application’s backend:

Also seen above, you will see the difference between a completed file and one in progress. The completed file will include a green dot over the file icon, while the incomplete will have an orange dot along.

Proceed

There will be moments where the generated response will wait for your confirmation to continue. Hit the >Proceed button to do this.

Additionally, there might be requests to run the code as is from the Agent itself. You can either hit Reject or hit Run to proceed.

Tabnine Agent might take the liberty to generate other files it deems to be standard or helpful, such as a Quick Start Guide:

Edits

You may ask Tabnine Agent to consider changes to the code by reading and exploring files:

Last updated

Was this helpful?