The Afghan president received a ceremonial greeting on the Pentagon parade grounds that included a 21-gun salute by Army cannons.
There is reason for a little pomp. Osama bin Laden is dead. Al Qaeda in Afghanistan is gasping for air. Before the United States invaded in 2001, the Taliban forbade women to even come out of their homes. Now women have more freedom -- more than 2 million girls are going to school. More than 300,000 Afghan children who live in the country are on Facebook.
But it's not all good news. Military and civilian deaths continue.
Contributing on the military side is the phenomenon dubbed "green-on-blue" or "insider" attacks. Of the more than 2,000 American deaths since the 2001 invasion, an increasing number have come at the hands of the Afghans they trusted and trained.
Such incidents have increased every year since 2007, when the U.S. Defense Department started keeping track of them. From 2011 to 2012, the number of American and NATO troops killed by Afghans nearly doubled.
It's worse for Afghans. Afghan National Security Forces are victims of a greater number of these insider attacks, a Department of Defense spokesman told CNN Friday.
And consider some of the events of 2012: The year began with a video showing Marines urinating on dead Afghans. Published photos showed U.S. troops posing with corpses and U.S. soldiers burned Qurans at Bagram Air Force Base, apparently an act committed out of ignorance that it offended Islam. Protests ensued.
Then there's U.S. Army Staff Sgt. Robert Bales, accused of rampaging through an Afghan village, murdering 17 Afghan civilians, including women and children.
Obama has said he wants to stick with a plan that removes all combat troops from Afghanistan by the end of 2014.
Who's in control?
First, Karzai isn't eligible to run for re-election in 2014. Because the country has a constitution and a working government, it's likely that at least some of the points he and Obama agree to could be carried out when he's out of power. But no one can say for sure, analysts note.
So far, who would run for president after Karzai is unclear, though some intriguing names have been bandied around.
On the ground, U.S. officials have said anywhere between zero to 20,000 U.S. forces could remain in Afghanistan past 2014. Post-NATO, the figures could be anywhere from zero to 9,000.
Not only will they perhaps have to operate in the tense green-on-blue environment, U.S. trainers who are teaching Afghan military enlistees how to fight say they are under enormous pressure to meet numbers at the sacrifice of quality, experts say.
Gayle Lemmon, an American journalist who has spent years off and on in Afghanistan, most recently in December 2011, said a U.S. contractor who is training Afghan recruits complained to her that he doesn't have to thoroughly do his job.
"There has been a huge amount of pressure and put as many bodies in Afghani uniform as possible to meet 2013 deadlines," she said. "He thought he had OK people but he didn't have time to pick out who was best and train the ones who needed extra help."
The "overwhelming majority" of them are coming from "ordinary Afghans signing up for the military," experienced war correspondent Dexter Filkins has reported.
What's the tab?
On Friday, Karzai gave the Pentagon a wish list of hardware such as drones and helicopters that he said would help him continue to fight terrorists.
No dollar amount has been decided. Estimates range from $1 billion to $10 billion a year -- and that includes military expenses, hardware and training, the whole deal that Afghanistan couldn't afford on its own.
"These are really funny numbers because no one knows the extent of what the U.S. is willing to offer," Lemmon notes.
Whatever amount Obama administration floats will have to win approval from Congress.
Former U.S. Ambassador to Afghanistan Ronald Neumann told CNN Friday that he thinks the total bill is going to depend on military presence. At a minimum, he figures, the United States will spend $5 billion in aid and military, not counting what would be spent for embassy costs.
Those numbers cannot be calculated in a vacuum either. As a discussion at the Brookings Institute involving the former U.S. ambassador to Afghanistan noted, Afghanistan is facing a major economic downturn after 2014.
A lot of money that has gone into Afghanistan has been wasted, numerous reports have shown. In 2011, one non-partisan group told Congress that the United States was wasting $12 million a day among contracts issued to support American efforts in Iraq and Afghanistan, CNN reported.
Even Karzai, prompted by a question from a reporter, said Friday "We have corruption."
Who is the U.S. talking with and why?
Last May, Obama made a surprise visit to Afghanistan, where he gave a speech about the end of the war.
He said, "We're pursuing a negotiated peace" with the Taliban.
This might have shocked some Americans who thought the United States was smoking its enemies out of their holes.
To be clear, al Qaeda and the Taliban are two different entities, though there are ties. Al Qaeda is a terrorist group created by Osama bin Laden. The Taliban has provided shelter and support to al Qaeda.
In its newest incarnation, the Taliban has new, and some younger-generation, members who say they want to find peace with the United States.
In short, this is a complicated topic, as Foreign Policy detailed in December.
Former Ambassador Neumann said it's wrong to call it a negotiation.
Instead, he said, it's "a group of multiple players we are only talking to. We are trying to see if there's negotiating room."
On the Afghan side, a November poll by the independent San Francisco-based group Asia Foundation found that more than half of Afghans felt that their country was moving in the right direction. That includes agreeing with the negotiation of government officials and those trying to work toward peace to talk with and find common ground with militants.
Will the U.S. public stay interested?
There were complaints during the U.S. presidential election that Obama and Republican challenger Mitt Romney did not talk enough about Afghanistan.
But polls have shown that most Americans are tired of the war. A CNN/ORC International poll in September showed that only 3% named Afghanistan as one of the most important issues facing the United States. Earlier in 2012, CNN polling indicated that only 25% of Americans favored the war, and 55% said the United States should remove all of its troops before 2014.
Defense Secretary Leon Panetta pushed back against that figure at the time, saying polls don't fight wars.
And this week he reiterated his opposition to taking the number of troops in Afghanistan down to a paltry sum, and said zero is out of the question for him. If the United States military doesn't have a strong presence there, the chances of talking -- or negotiating -- with the Taliban is diminished, he argued.
Neumann said he thinks the American public is disinterested in a war that has dragged on for so many years.
That's a hurtful thing to hear for military families who have endured so much.
Rebekah Sanderlin, a journalist and longtime military culture blogger, is disheartened by such talk. Her husband has done multiple tours in Afghanistan and is preparing to go back.
"It's offensive to me to hear that from people who haven't had skin in the game, that they are weary," she said. "We still have troops fighting, sacrificing time with their families. All of that is much harder when you don't feel like your country is behind you."